|
||||||||||
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.TriggerCtx
public class TriggerCtx
The TriggerCtx is a detectable action or custom action that maintains the information about when the trigger or action part of the detectable was executed and what belief or event triggered the action.
ITriggerCtx
,
IDetectableCtx
,
Serialized FormField 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 | |
---|---|
TriggerCtx(IDetectableCtx parent)
Constructor, creates a new context for a trigger action for the specified detectable. |
|
TriggerCtx(java.lang.String activator)
Constructor, creates a new context for a trigger action specified by the activator string. |
Method Summary | |
---|---|
void |
addUsedVariable(IVariableCtx var)
Adds the specified variable as a variable used by this detectable. |
java.lang.String |
getActivator()
Returns the the activator for the trigger if the trigger was not related to a detectable. |
IDetectableCtx |
getParent()
Returns the detectable context for which this trigger was executed. |
IBeliefCtx |
getTriggeringBelief()
Returns the belief that triggered this trigger. |
java.util.Enumeration |
getUsedVariables()
Returns a list of all the variables used by this detectable. |
void |
removeUsedVariable(IVariableCtx var)
Removes the specified variable as a variable used by this detectable. |
void |
setTriggeringBelief(IBeliefCtx belief)
Sets the belief that activated this trigger. |
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 |
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 TriggerCtx(IDetectableCtx parent)
parent
- the parent IDetectableCtxpublic TriggerCtx(java.lang.String activator)
activator
- the activator for the triggerMethod Detail |
---|
public IDetectableCtx getParent() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getParent
in interface IDetectableActionCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- when no parent is specifiedpublic java.lang.String getActivator() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- when no activator is specifiedpublic void setTriggeringBelief(IBeliefCtx belief) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
setTriggeringBelief
in interface ITriggerCtx
belief
- the belief that triggered this trigger
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if a null belief is specifiedpublic IBeliefCtx getTriggeringBelief() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getTriggeringBelief
in interface ITriggerCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no triggering belief is specifiedpublic void addUsedVariable(IVariableCtx var) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addUsedVariable
in interface ITriggerCtx
var
- the variable (IVariableCtx) to be added
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if var is nullpublic void removeUsedVariable(IVariableCtx var) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
removeUsedVariable
in interface ITriggerCtx
var
- the variable (IVariableCtx) to be removed
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if variable is null, no variables
are present, or the variable is not foundpublic java.util.Enumeration getUsedVariables() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getUsedVariables
in interface ITriggerCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if there are no variables
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |