|
||||||||||
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.ActivityCtx gov.nasa.arc.brahms.vm.rt.VMActivityCtx
public class VMActivityCtx
The VMActivityCtx is an ActivityCtx with extensions for use in the virtual machine. An ActivityCtx maintains the context of an activity being or to be executed by an active instance. The context maintains the start and end times for an activity, the duration, priority, and status.
Field Summary |
---|
Fields inherited from interface gov.nasa.arc.brahms.common.rt.IRuntimeConstants |
---|
ABORTED, ACTIVE, 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 | |
---|---|
|
VMActivityCtx(Activity act)
Constructor, creates a new context for the specified Activity. |
protected |
VMActivityCtx(Activity act,
java.lang.String id)
Constructor, creates a new context for the specified Activity. |
Method Summary | |
---|---|
ParameterCtx |
getDisplayText()
Returns the activities display text. |
ParameterCtx |
getParameterCtx(Parameter p)
Returns the context of the parameter with the specified name. |
ParameterCtx |
getPriority()
Returns the activities priority. |
boolean |
handleDiscreteEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Process the specified discrete event. |
boolean |
handleDiscreteEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt,
gov.nasa.arc.brahms.vm.events.IDiscreteEventHandlerFactory ehf)
Handles the specified discrete event by selecting the appropriate event handler from the specified event handler factory. |
protected void |
onAbort(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Aborts the activity, an early termination of the activity caused by a detectable's abort trigger. |
protected void |
onComplete(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Completes the activity, an early termination of the activity caused by a detectable's complete trigger. |
protected void |
onContinue(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Continues the activity from an interrupt. |
protected void |
onContinueFromImpasse(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Continues the activity from an impasse. |
protected void |
onEnd(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Ends the activity, handling any completion initializations and executing any actions that are to be executed at the end of the activity as specified for the activity. |
protected void |
onImpasse(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Impasses the activity. |
protected void |
onInterrupt(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Interrupts the activity. |
protected boolean |
onStart(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Starts the activity, handling any startup initialization and executing any actions that are to be executed at the start of the activity as specified for the activity. |
void |
resolveParameters()
Resolves all parameters specified for the activity. |
protected void |
sendAbortEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Sends an abort event to the event notifier. |
protected void |
sendCompleteEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Sends a complete event to the event notifier. |
protected void |
sendContinueEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Sends a continue event to the event notifier. |
protected void |
sendContinueFromImpasseEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Sends a continue from impasse event to the event notifier. |
protected void |
sendEndEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Sends an end event to the event notifier. |
protected void |
sendImpasseEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Sends an impasse event to the event notifier. |
protected void |
sendInterruptEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Sends an interrupt event to the event notifier. |
protected void |
sendStartEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Sends a start event to the event notifier. |
Methods inherited from class gov.nasa.arc.brahms.common.rt.ActivityCtx |
---|
getCompletionCause, getParentFrame, getPerformedBy, getReferencedBy, getState, getStatus, setCompletionCause, setDisplayText, setParentFrame, setPerformedBy, setPriority, setReferencedBy, setState, setState, setStatus, toString |
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, wait, wait, wait |
Methods inherited from interface gov.nasa.arc.brahms.common.rt.IBrahmsObjectCtx |
---|
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setEndTime, setID, setStartTime |
Constructor Detail |
---|
public VMActivityCtx(Activity act)
act
- the Activity for which to create a contextprotected VMActivityCtx(Activity act, java.lang.String id)
act
- the Activity for which to create a contextMethod Detail |
---|
public final ParameterCtx getParameterCtx(Parameter p) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
p
- the Parameter for which the context is requested
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no parameter with the specified name
is defined for this activitypublic final void resolveParameters() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if an internal error occurspublic ParameterCtx getDisplayText() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getDisplayText
in interface IActivityCtx
getDisplayText
in class ActivityCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no display text is definedpublic ParameterCtx getPriority() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getPriority
in interface IActivityCtx
getPriority
in class ActivityCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no priority is definedpublic boolean handleDiscreteEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt, gov.nasa.arc.brahms.vm.events.IDiscreteEventHandlerFactory ehf)
handleDiscreteEvent
in interface gov.nasa.arc.brahms.vm.events.IDiscreteEventData
evt
- the DiscreteEvent to be handledehf
- the EventHandlerFactory containing handlers from which this
DiscreteEventData selects the appropriate handler
public boolean handleDiscreteEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
handleDiscreteEvent
in interface gov.nasa.arc.brahms.vm.events.IDiscreteEventHandler
evt
- the DiscreteEvent to be processed.
protected boolean onStart(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
evt
- the DiscreteEvent that initiated the start of the activity
protected void onEnd(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
evt
- the DiscreteEvent that initiated the end of the activityprotected void onInterrupt(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
evt
- the DiscreteEvent that initiated the interruptionprotected void onContinue(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
evt
- the DiscreteEvent that initiated the continuationprotected void onImpasse(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
evt
- the DiscreteEvent that initiated the impasseprotected void onContinueFromImpasse(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
evt
- the DiscreteEvent that initiated the continuationprotected void onAbort(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
evt
- the DiscreteEvent that initiated the abortprotected void onComplete(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
evt
- the DiscreteEvent that initiated the completeprotected void sendStartEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Note that this method is created for the different implementations by the sub classes of VMActivityCtx.
evt
- the DiscreteEvent that triggered the state changeprotected void sendEndEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Note that this method is created for the different implementations by the sub classes of VMActivityCtx.
evt
- the DiscreteEvent that triggered the state changeprotected void sendInterruptEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Note that this method is created for the different implementations by the sub classes of VMActivityCtx.
evt
- the DiscreteEvent that triggered the state changeprotected void sendContinueEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Note that this method is created for the different implementations by the sub classes of VMActivityCtx.
evt
- the DiscreteEvent that triggered the state changeprotected void sendImpasseEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Note that this method is created for the different implementations by the sub classes of VMActivityCtx.
evt
- the DiscreteEvent that triggered the state changeprotected void sendContinueFromImpasseEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Note that this method is created for the different implementations by the sub classes of VMActivityCtx.
evt
- the DiscreteEvent that triggered the state changeprotected void sendCompleteEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Note that this method is created for the different implementations by the sub classes of VMActivityCtx.
evt
- the DiscreteEvent that triggered the state changeprotected void sendAbortEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Note that this method is created for the different implementations by the sub classes of VMActivityCtx.
evt
- the DiscreteEvent that triggered the state change
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |