|
ADK CVS | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objecttryllian.afc.task.TaskState
State information for tasks. There is always one state associated with a task.
There are six basic states.
| Field Summary | |
static int |
ACTIVE
The task is performing. |
static int |
FAILED
The task has failed. |
static int |
GOING_TO_FAIL
The task has decided to fail, but no events are sent yet. |
static int |
GOING_TO_SUCCEED
The task has decided to succeed, but no events are sent yet. |
static int |
JUST_CREATED
The task has been created but it has not received any events yet. |
static int |
JUST_STARTED
The task is just (being) started. |
static int |
SUCCEEDED
The task has completed with success. |
| Constructor Summary | |
TaskState()
Creates a new TaskState. |
|
| Method Summary | |
boolean |
isActive()
Returns true if the task is in the ACTIVE state or in the
JUST_STARTED state, which is considered a substate of ACTIVE. |
boolean |
isFailed()
Returns true if the task is in the FAILED state. |
boolean |
isFinished()
Returns true if the task is either in the state SUCCEEDED
or FAILED. |
boolean |
isGoingToFail()
Returns true if the task is in the GOING_TO_FAIL state. |
boolean |
isGoingToFinish()
Returns true if the task is either in the state
GOING_TO_SUCCEED or GOING_TO_FAIL. |
boolean |
isGoingToSucceed()
Returns true if the task is in the GOING_TO_SUCCEED
state. |
boolean |
isIdle()
Returns true if the task is either in the state
JUST_CREATED or 'finished'. |
boolean |
isJustCreated()
Returns true if the task is in the JUST_CREATED state. |
boolean |
isJustStarted()
Returns true if the task is in the JUST_STARTED state. |
boolean |
isNoLongerActive()
Returns true if it is past the ACTIVE state. |
boolean |
isSucceeded()
Returns true if the task is in the SUCCEEDED state. |
protected void |
stateChanged(int oldState,
int newState)
This method is called when the state changes. |
void |
switchTo(int newState)
Changes the state. |
java.lang.String |
toString()
Returns a human-readable string of the state. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int JUST_CREATED
public static final int JUST_STARTED
Task#taskStarted() and of
TaskListener.taskStarted(TaskEvent).for listeners to this task.
public static final int ACTIVE
public static final int GOING_TO_SUCCEED
public static final int GOING_TO_FAIL
public static final int SUCCEEDED
public static final int FAILED
| Constructor Detail |
public TaskState()
| Method Detail |
public void switchTo(int newState)
newState - one of the class's state constants.
java.lang.IllegalArgumentException - if the state transition is invalid.
protected void stateChanged(int oldState,
int newState)
public boolean isJustCreated()
true if the task is in the JUST_CREATED state.
public boolean isJustStarted()
true if the task is in the JUST_STARTED state.
public boolean isActive()
true if the task is in the ACTIVE state or in the
JUST_STARTED state, which is considered a substate of ACTIVE.
public boolean isSucceeded()
true if the task is in the SUCCEEDED state.
public boolean isFailed()
true if the task is in the FAILED state.
public boolean isGoingToSucceed()
true if the task is in the GOING_TO_SUCCEED
state.
public boolean isGoingToFail()
true if the task is in the GOING_TO_FAIL state.
public boolean isFinished()
true if the task is either in the state SUCCEEDED
or FAILED.
public boolean isGoingToFinish()
true if the task is either in the state
GOING_TO_SUCCEED or GOING_TO_FAIL.
public boolean isIdle()
true if the task is either in the state
JUST_CREATED or 'finished'.
public boolean isNoLongerActive()
true if it is past the ACTIVE state.
public java.lang.String toString()
|
Copyright 2005, Tryllian Solutions B.V. | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||