|
||||||||||
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.DetectCtx
public class DetectCtx
The DetectCtx is a detectable action that maintains the information about when the detection took place, what fact was detected and what belief was created as a result of the detection.
IDetectCtx
,
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 | |
---|---|
DetectCtx(IDetectableCtx parent)
Constructor, creates a new context for a detect action for the specified detectable. |
Method Summary | |
---|---|
void |
addUsedVariable(IVariableCtx var)
Adds the specified variable as a variable used by this detectable. |
IBeliefCtx |
getCreatedBelief()
Returns the belief created by the detectable in this detect action. |
IFactCtx |
getDetectedFact()
Returns the fact detected by the detectable in this detect action. |
IDetectableCtx |
getParent()
Returns the detectable context for which this detection was executed. |
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 |
setCreatedBelief(IBeliefCtx belief)
Sets the belief that was created as a result of the fact detection. |
void |
setDetectedFact(IFactCtx fact)
Sets the fact that is detected by the detectable in this detect action instance. |
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 DetectCtx(IDetectableCtx parent)
parent
- the parent IDetectableCtxMethod 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 void setDetectedFact(IFactCtx fact) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
setDetectedFact
in interface IDetectCtx
fact
- the detected fact
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if the specified fact is nullpublic IFactCtx getDetectedFact() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getDetectedFact
in interface IDetectCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if the detected fact is nullpublic void setCreatedBelief(IBeliefCtx belief) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
setCreatedBelief
in interface IDetectCtx
belief
- the created belief
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if the specified belief is nullpublic IBeliefCtx getCreatedBelief() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getCreatedBelief
in interface IDetectCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if the created belief is nullpublic void addUsedVariable(IVariableCtx var) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addUsedVariable
in interface IDetectCtx
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 IDetectCtx
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 IDetectCtx
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 |