|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.nasa.arc.brahms.common.rt.BrahmsObjectCtx gov.nasa.arc.brahms.common.rt.ActivityStateCtx
public class ActivityStateCtx
The state of the activities instantiated by the virtual machine is maintained using the ActivityStateCtx. An activity is at any point in time in one of the following states, active, interrupted, impassed, or completed, aborted. The ActivityStateCtx maintains information about the state of the activity, when the activiy entered the state and when the activity left the state. The ActivityStateCtx allows for keeping a linked list of the states an activity went through, where the last state in the list is the current state.
Field Summary | |
---|---|
static int |
ABORT
|
static int |
ACTIVE
|
static int |
COMPLETE
|
static int |
ENDACTIVITY
|
static int |
IMPASSE
|
static int |
INTERRUPT
|
Fields inherited from interface gov.nasa.arc.brahms.common.rt.IRuntimeConstants |
---|
ABORTED, ACTIVITY, AVAILABLE, COMPLETED, CONSEQUENCE, DETECTABLE, ENDED, ENGINE, EXTERNAL_AGENT, FROM, IMPASSED, INITIAL, INTERRUPTED, JAVA_PROPERTY, sABORTED, sACTIVE, sAVAILABLE, sCOMPLETED, sENDED, sIMPASSED, sINTERRUPTED, sUNAVAILABLE, TO, TRANSFER, UNAVAILABLE |
Constructor Summary | |
---|---|
ActivityStateCtx(IActivityCtx activity,
int state)
Constructor, creates a new ActivityStateCtx for the specified activity. |
Method Summary | |
---|---|
IActivityCtx |
getActivity()
Returns the activity for which this state is set |
ActivityStateCtx |
getNextState()
Returns the next activity state that follows this activity state for the same activity |
ActivityStateCtx |
getPreviousState()
Returns the previous activity state specifying the previous state of this activity state's activity |
int |
getState()
Returns the state represented by this state context |
long |
getStateDuration()
Returns the total duration of the state |
void |
setActivity(IActivityCtx activity)
Sets the activity for which this state is set. |
void |
setNextState(ActivityStateCtx state)
Sets the activity state to follow this activity state for the same activity |
void |
setPreviousState(ActivityStateCtx state)
Sets the previous activity state specifying the previous state of this activity state's activity |
Methods inherited from class gov.nasa.arc.brahms.common.rt.BrahmsObjectCtx |
---|
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setContextFor, setEndTime, setID, setStartTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ACTIVE
public static final int INTERRUPT
public static final int IMPASSE
public static final int COMPLETE
public static final int ABORT
public static final int ENDACTIVITY
Constructor Detail |
---|
public ActivityStateCtx(IActivityCtx activity, int state) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
activity
- the IActivityCtx for which this state is set
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if activity specified is nullACTIVE
,
INTERRUPT
,
IMPASSE
,
COMPLETE
,
ABORT
Method Detail |
---|
public int getState()
ACTIVE
,
INTERRUPT
,
IMPASSE
,
COMPLETE
,
ABORT
public void setActivity(IActivityCtx activity) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
activity
- the activity for which this state is set
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if the specified activity is nullpublic IActivityCtx getActivity() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no activity is specifiedpublic long getStateDuration()
public void setNextState(ActivityStateCtx state)
state
- the next ActivityStateCtxpublic ActivityStateCtx getNextState()
public void setPreviousState(ActivityStateCtx state)
state
- the previous ActivityStateCtxpublic ActivityStateCtx getPreviousState()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |