|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuws.job.JobPhase
public class JobPhase
An instance of this class represents the current execution phase of a given job, and it describes the transitions between the different phases.
ExecutionPhase,
AbstractJob,
Serialized Form| Field Summary | |
|---|---|
protected AbstractJob |
job
The job whose the current phase is represented by this class. |
protected ExecutionPhase |
phase
Current phase of the associated job. |
| Constructor Summary | |
|---|---|
JobPhase(AbstractJob j)
Builds the phase manager of the given job. |
|
| Method Summary | |
|---|---|
AbstractJob |
getJob()
Gets the job whose the execution phase is represented by this object. |
ExecutionPhase |
getPhase()
Gets the current phase of the job. |
boolean |
isExecuting()
Indicates whether the job is executing, considering its current phase. |
boolean |
isFinished()
Indicates whether the job is finished or not, considering its current phase. |
boolean |
isJobUpdatable()
Indicates whether the job attributes (except errors and results) can be updated, considering its current phase. |
protected void |
setAbortedPhase(boolean force)
Changes the current phase to ABORTED. |
protected void |
setCompletedPhase(boolean force)
Changes the current phase to COMPLETED. |
protected void |
setErrorPhase(boolean force)
Changes the current phase to ERROR. |
protected void |
setExecutingPhase(boolean force)
Changes the current phase to EXECUTING. |
protected void |
setHeldPhase(boolean force)
Changes the current phase to HELD. |
protected void |
setPendingPhase(boolean force)
Changes the current phase to PENDING. |
void |
setPhase(ExecutionPhase p)
Lets changing the current phase of the associated job considering the order of execution phases. |
void |
setPhase(ExecutionPhase p,
boolean force)
Lets changing the current phase of the associated job considering or not the order of execution phases. |
protected void |
setQueuedPhase(boolean force)
Changes the current phase to QUEUED. |
protected void |
setSuspendedPhase(boolean force)
Changes the current phase to SUSPENDED. |
protected void |
setUnknownPhase(boolean force)
Changes the current phase to UNKNOWN. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected ExecutionPhase phase
protected final AbstractJob job
| Constructor Detail |
|---|
public JobPhase(AbstractJob j)
throws UWSException
j - The job whose the execution phase must be represented by the built JobPhase instance.
UWSException - If the given job is null.| Method Detail |
|---|
public final AbstractJob getJob()
public final ExecutionPhase getPhase()
public final void setPhase(ExecutionPhase p)
throws UWSException
p - The new execution phase.
UWSException - If the given phase is null or if the phase transition is forbidden.setPhase(ExecutionPhase, boolean)
public void setPhase(ExecutionPhase p,
boolean force)
throws UWSException
p - The new phase.force - true to ignore the phases order, false otherwise.
UWSException - If the given phase is null or if the phase transition is forbidden.setPendingPhase(boolean),
setQueuedPhase(boolean),
setExecutingPhase(boolean),
setCompletedPhase(boolean),
setAbortedPhase(boolean),
setErrorPhase(boolean),
setHeldPhase(boolean),
setSuspendedPhase(boolean),
setUnknownPhase(boolean)
protected void setPendingPhase(boolean force)
throws UWSException
PENDING.
force - true to ignore the phases order, false otherwise.
UWSException - If this phase transition is forbidden (by default: IF force=false AND currentPhase != PENDING or UNKNOWN).
protected void setQueuedPhase(boolean force)
throws UWSException
QUEUED.
force - true to ignore the phases order, false otherwise.
UWSException - If this phase transition is forbidden (by default: IF force=false AND currentPhase != QUEUED or HELD or PENDING or UNKNOWN).
protected void setExecutingPhase(boolean force)
throws UWSException
EXECUTING.
force - true to ignore the phases order, false otherwise.
UWSException - If this phase transition is forbidden (by default: IF force=false AND currentPhase != EXECUTING or SUSPENDED or QUEUED or UNKNOWN).
protected void setCompletedPhase(boolean force)
throws UWSException
COMPLETED.
force - true to ignore the phases order, false otherwise.
UWSException - If this phase transition is forbidden (by default: IF force=false AND currentPhase != COMPLETED or EXECUTING or UNKNOWN).
protected void setAbortedPhase(boolean force)
throws UWSException
ABORTED.
force - true to ignore the phases order, false otherwise.
UWSException - If this phase transition is forbidden (by default: IF force=false AND currentPhase = COMPLETED or ERROR).
protected void setErrorPhase(boolean force)
throws UWSException
ERROR.
force - true to ignore the phases order, false otherwise.
UWSException - If this phase transition is forbidden (by default: IF force=false AND currentPhase = COMPLETED or ABORTED).
protected void setHeldPhase(boolean force)
throws UWSException
HELD.
force - true to ignore the phases order, false otherwise.
UWSException - If this phase transition is forbidden (by default: IF force=false AND currentPhase != HELD or PENDING or UNKNOWN).
protected void setSuspendedPhase(boolean force)
throws UWSException
SUSPENDED.
force - true to ignore the phases order, false otherwise.
UWSException - By default, never !
protected void setUnknownPhase(boolean force)
throws UWSException
UNKNOWN.
force - true to ignore the phases order, false otherwise.
UWSException - By default, never !public boolean isJobUpdatable()
Indicates whether the job attributes (except errors and results) can be updated, considering its current phase.
Note: By default, it returns TRUE only if the current phase is equals to PENDING !
public boolean isFinished()
Indicates whether the job is finished or not, considering its current phase.
Note: By default, it returns TRUE only if the current phase is either COMPLETED,
ABORTED or ERROR !
public boolean isExecuting()
Indicates whether the job is executing, considering its current phase.
Note: By default, it returns TRUE only if the current phase is EXECUTING !
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||