|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.nasa.arc.brahms.common.rt.BrahmsObjectCtx
gov.nasa.arc.brahms.common.rt.ActivityCtx
gov.nasa.arc.brahms.vm.rt.VMActivityCtx
gov.nasa.arc.brahms.vm.rt.VMPrimitiveActivityCtx
gov.nasa.arc.brahms.vm.rt.VMContainmentActivityCtx
public abstract class VMContainmentActivityCtx
The VMContainmentActivityCtx is the generic context for the VMPutActivityCtx and VMGetActivityCtx.
| 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 | |
|---|---|
protected |
VMContainmentActivityCtx(ContainmentActivity act,
java.lang.String id)
Constructor, creates a new context for the specified VMContainmentActivity. |
| Method Summary | |
|---|---|
void |
addItem(ParameterCtx item)
Adds the specified item as an item picked up or dropped off through this activity. |
protected abstract void |
doActivityAction(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Performs the containment action, put or get, depending on the activity. |
int |
getItemCount()
Return the number of items associated with the activity. |
java.util.Enumeration |
getItems()
Returns a list of all the items (ParameterCtx). |
ParameterCtx |
getWhen()
Returns when the activity action is to take place (start or end). |
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 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 |
removeItem(ParameterCtx item)
Removes the specified item as an item picked up or dropped off through this activity. |
| Methods inherited from class gov.nasa.arc.brahms.vm.rt.VMPrimitiveActivityCtx |
|---|
addResource, getDuration, getElapsedTime, getMaxDuration, getMinDuration, getRandom, getResourceCount, getResources, removeResource, sendAbortEvent, sendCompleteEvent, sendContinueEvent, sendContinueFromImpasseEvent, sendEndEvent, sendImpasseEvent, sendInterruptEvent, sendStartEvent, setElapsedTime |
| Methods inherited from class gov.nasa.arc.brahms.vm.rt.VMActivityCtx |
|---|
getDisplayText, getParameterCtx, getPriority, handleDiscreteEvent, handleDiscreteEvent, onAbort, onComplete, onContinue, onContinueFromImpasse, onImpasse, onInterrupt, resolveParameters |
| 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.IPrimitiveActivityCtx |
|---|
addResource, getDuration, getElapsedTime, getMaxDuration, getMinDuration, getRandom, getResourceCount, getResources, removeResource, setElapsedTime |
| Methods inherited from interface gov.nasa.arc.brahms.common.rt.IActivityCtx |
|---|
getCompletionCause, getDisplayText, getParentFrame, getPerformedBy, getPriority, getReferencedBy, getStatus, setCompletionCause, setDisplayText, setParentFrame, setPerformedBy, setReferencedBy, setStatus |
| Methods inherited from interface gov.nasa.arc.brahms.common.rt.IBrahmsObjectCtx |
|---|
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setEndTime, setID, setStartTime |
| Constructor Detail |
|---|
protected VMContainmentActivityCtx(ContainmentActivity act,
java.lang.String id)
act - the VMContainmentActivity for which to create a contextid - the unique identifier for the activity context| Method Detail |
|---|
public void addItem(ParameterCtx item)
throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addItem in interface IContainmentActivityCtxitem - the item (ParameterCtx) to be added
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if item is null
public void removeItem(ParameterCtx item)
throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
removeItem in interface IContainmentActivityCtxitem - the item (ParameterCtx) to be removed
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if item is null, no items
are available, or the item is not found
public java.util.Enumeration getItems()
throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getItems in interface IContainmentActivityCtxgov.nasa.arc.brahms.common.exceptions.BrahmsException - if there are no itemspublic int getItemCount()
getItemCount in interface IContainmentActivityCtx
public ParameterCtx getWhen()
throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getWhen in interface IContainmentActivityCtxgov.nasa.arc.brahms.common.exceptions.BrahmsException - if the when value is not definedprotected abstract void doActivityAction(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
evt - the DiscreteEvent that triggered the execution of the codeprotected boolean onStart(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
onStart in class VMActivityCtxevt - the DiscreteEvent that initiated the start of the activity
protected void onEnd(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
onEnd in class VMActivityCtxevt - the DiscreteEvent that initiated the end of the activity
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||