|
||||||||||
| 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.VMCreateAgentActivityCtx
public class VMCreateAgentActivityCtx
The VMCreateAgentActivityCtx is a create agent activity context with extensions for use in the virtual machine that maintains the context of a create agent activity being or to be executed by an active instance. The context maintains the start and end times for an activity, the duration, priority, status, randomness, duration, resources, group membership, number of agents, destination variable, name and location of the destination agent(s), and when the creation is to take place.
| 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 | |
|---|---|
|
VMCreateAgentActivityCtx(CreateAgentActivity act)
Constructor, creates a new context for the specified VMCreateAgentActivity. |
protected |
VMCreateAgentActivityCtx(CreateAgentActivity act,
java.lang.String id)
Constructor, creates a new context for the specified VMCreateAgentActivity. |
| Method Summary | |
|---|---|
void |
addBoundVariable(VariableCtx var)
Adds the specified variable as a variable bound by this activity. |
protected void |
createAgents(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Creates agent(s) using the parameters specified for the activity. |
java.util.Enumeration |
getBoundVariables()
Returns a list of all the variables used by this activity. |
ParameterCtx |
getDestination()
Returns the create agent's destination variable. |
ParameterCtx |
getDestinationLocation()
Returns the location for the created agent. |
ParameterCtx |
getDestinationName()
Returns the name for the created agent. |
java.util.Enumeration |
getMemberOf()
Returns a list of all the groups (ParameterCtx) the agent is to be made a member of. |
ParameterCtx |
getQuantity()
Returns the the number of agents (to be) created by this activity. |
ParameterCtx |
getWhen()
Returns when the create object 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 |
removeBoundVariable(VariableCtx var)
Removes the specified variable as a variable bound by this 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.vm.rt.VMPrimitiveActivityCtx |
|---|
addResource, getDuration, getElapsedTime, getMaxDuration, getMinDuration, getRandom, getResourceCount, getResources, removeResource, 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 |
|---|
public VMCreateAgentActivityCtx(CreateAgentActivity act)
act - the VMCreateAgentActivity for which to create a context
protected VMCreateAgentActivityCtx(CreateAgentActivity act,
java.lang.String id)
act - the VMCreateAgentActivity for which to create a contextid - the unique identifier for the activity context| Method Detail |
|---|
public java.util.Enumeration getMemberOf()
throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getMemberOf in interface ICreateAgentActivityCtxgov.nasa.arc.brahms.common.exceptions.BrahmsException - if there are no groups
public ParameterCtx getQuantity()
throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getQuantity in interface ICreateAgentActivityCtxgov.nasa.arc.brahms.common.exceptions.BrahmsException - if no quantity is specified
public ParameterCtx getWhen()
throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getWhen in interface ICreateAgentActivityCtxgov.nasa.arc.brahms.common.exceptions.BrahmsException - if the when value is not defined
public ParameterCtx getDestination()
throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getDestination in interface ICreateAgentActivityCtxgov.nasa.arc.brahms.common.exceptions.BrahmsException - if no destination is specified
public ParameterCtx getDestinationName()
throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getDestinationName in interface ICreateAgentActivityCtxgov.nasa.arc.brahms.common.exceptions.BrahmsException - if no destination name is specified
public ParameterCtx getDestinationLocation()
throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getDestinationLocation in interface ICreateAgentActivityCtxgov.nasa.arc.brahms.common.exceptions.BrahmsException - if no destination location is specified
public void addBoundVariable(VariableCtx var)
throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addBoundVariable in interface ICreateAgentActivityCtxvar - the variable (VariableCtx) to be added
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if var is null
public void removeBoundVariable(VariableCtx var)
throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
removeBoundVariable in interface ICreateAgentActivityCtxvar - the variable (VariableCtx) to be removed
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if variable is null, no variables
are present, or the variable is not found
public java.util.Enumeration getBoundVariables()
throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getBoundVariables in interface ICreateAgentActivityCtxgov.nasa.arc.brahms.common.exceptions.BrahmsException - if there are no variables
protected void createAgents(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
evt - the event that triggered the agent creation
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if an internal error occursprotected 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 activityprotected 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.
sendStartEvent in class VMPrimitiveActivityCtxevt - 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.
sendEndEvent in class VMPrimitiveActivityCtxevt - 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.
sendInterruptEvent in class VMPrimitiveActivityCtxevt - 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.
sendContinueEvent in class VMPrimitiveActivityCtxevt - 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.
sendImpasseEvent in class VMPrimitiveActivityCtxevt - 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.
sendContinueFromImpasseEvent in class VMPrimitiveActivityCtxevt - 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.
sendCompleteEvent in class VMPrimitiveActivityCtxevt - 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.
sendAbortEvent in class VMPrimitiveActivityCtxevt - the DiscreteEvent that triggered the state change
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||