|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sourceforge.java.util.jobs.JobStatus
Represents the status of a IJob.
| Field Summary | |
private long |
duration
The IJob duration in milliseconds |
static int |
FINISHED
Constant to indicate a finished IJob |
private String |
name
The name of the IJob |
private int |
priority
The IJob priority |
static int |
RUNNING
Constant to indicate a running IJob |
private Date |
startTime
The time that the monitored IJob was started at |
private int |
status
The IJob status flag. |
private IJobStatusFormat |
statusFormat
The format object for the JobStatus |
private double |
totalWorkUnits
The total number of work units to be done |
static int |
UNKNOWN_TOTAL_WORK_UNITS
Flag to indicate an unknown amount of total work units |
static int |
WAITING
Constant to indicate a waiting IJob |
private double |
workUnitsDone
The number of work units done |
| Constructor Summary | |
JobStatus(String name)
Creates a new JobStatus instance.
|
|
| Method Summary | |
long |
getDuration()
Gets the duration of the monitored IJob in milliseconds.
|
String |
getName()
Gets the name of the IJob whose status is
monitored by this JobStatus.
|
int |
getPriority()
Gets the priority of this JobStatus object.
|
Date |
getStartTime()
Gets the start time of the monitored IJob.
|
int |
getStatus()
Gets the status of the monitored IJob.
|
IJobStatusFormat |
getStatusFormat()
Gets the IJobStatusFormat object of this
JobStatus
|
double |
getTotalWorkUnits()
Gets the number of total work units to be done in the monitored IJob.
|
double |
getWorkUnitsDone()
Gets the number of work units done in the monitored IJob.
|
void |
setDuration(long duration)
Sets the duration of the monitored IJob in milliseconds.
|
void |
setName(String name)
Sets the name for the IJob whose status is
monitored by this JobStatus.
|
void |
setPriority(int priority)
Sets the priority of this JobStatus object.
|
void |
setStartTime(Date startTime)
Sets the start time of the monitored IJob.
|
void |
setStatus(int status)
Sets the status for the monitored IJob.
|
void |
setStatusFormat(IJobStatusFormat format)
Sets the IJobStatusFormat object for this
JobStatus
|
void |
setTotalWorkUnits(double totalWorkUnits)
Sets the number of total work units to be done in the monitored IJob.
|
void |
setWorkUnitsDone(double workUnitsDone)
Sets the number of work units done in the monitored IJob.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int UNKNOWN_TOTAL_WORK_UNITS
Flag to indicate an unknown amount of total work units
public static final int RUNNING
Constant to indicate a running IJob
public static final int WAITING
Constant to indicate a waiting IJob
public static final int FINISHED
Constant to indicate a finished IJob
private int priority
The IJob priority
private String name
The name of the IJob
private double workUnitsDone
The number of work units done
private double totalWorkUnits
The total number of work units to be done
private Date startTime
The time that the monitored IJob was started at
private long duration
The IJob duration in milliseconds
private int status
The IJob status flag. A Job is waiting by default.
private IJobStatusFormat statusFormat
The format object for the JobStatus
| Constructor Detail |
public JobStatus(String name)
Creates a new JobStatus instance.
name - the name of the IJob whose status is
monitored by this JobStatus| Method Detail |
public void setPriority(int priority)
Sets the priority of this JobStatus object.
IJob.LOW_PRIORITY for
the lowest priority (1)IJob.NORM_PRIORITY for
default priority (5)IJob.HIGH_PRIORITY for
the highest priority (10)IJob.LOW_PRIORITY and
IJob.HIGH_PRIORITY.
Priorites beyons this interval will be rejected and don't change the
current priority.
priority - the priority to set for this JobStatus
objectpublic int getPriority()
Gets the priority of this JobStatus object.
IJob.LOW_PRIORITY for
the lowest priority (1)IJob.NORM_PRIORITY for
default priority (5)IJob.HIGH_PRIORITY for
the highest priority (10)IJob.LOW_PRIORITY and
IJob.HIGH_PRIORITY.
JobStatus objectpublic void setName(String name)
Sets the name for the IJob whose status is
monitored by this JobStatus.
name - the name for the IJob whose status is
monitored by this JobStatuspublic String getName()
Gets the name of the IJob whose status is
monitored by this JobStatus.
IJob whose status is
monitored by this JobStatuspublic void setWorkUnitsDone(double workUnitsDone)
Sets the number of work units done in the monitored IJob.
workUnitsDone - the number of work units done in the monitored
IJobpublic double getWorkUnitsDone()
Gets the number of work units done in the monitored IJob.
IJobpublic void setTotalWorkUnits(double totalWorkUnits)
Sets the number of total work units to be done in the monitored
IJob.
totalWorkUnits - the number of total work units to be done in the
monitored IJobpublic double getTotalWorkUnits()
Gets the number of total work units to be done in the monitored
IJob.
IJobpublic void setStatus(int status)
Sets the status for the monitored IJob.
status - the status to set for the monitored IJobpublic int getStatus()
Gets the status of the monitored IJob.
IJobpublic void setStartTime(Date startTime)
Sets the start time of the monitored IJob.
startTime - the start time of the monitored IJobpublic Date getStartTime()
Gets the start time of the monitored IJob.
IJobpublic void setDuration(long duration)
Sets the duration of the monitored IJob in milliseconds.
duration - the duration of the monitored IJob in
millisecondspublic long getDuration()
Gets the duration of the monitored IJob in milliseconds.
IJob in millisecondspublic void setStatusFormat(IJobStatusFormat format)
Sets the IJobStatusFormat object for this
JobStatus
format - the IJobStatusFormat object for this
JobStatuspublic IJobStatusFormat getStatusFormat()
Gets the IJobStatusFormat object of this
JobStatus
IJobStatusFormat object of this
JobStatus
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||