|
||||||||||
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.ConceptCtx gov.nasa.arc.brahms.common.rt.ActiveInstanceCtx gov.nasa.arc.brahms.vm.rt.VMActiveInstanceCtx gov.nasa.arc.brahms.vm.rt.VMObjectInstanceCtx
public class VMObjectInstanceCtx
The ObjectInstanceCtx is the runtime class for the objects with extension for use in the virtual machine. It manages the belief set, location, frame contexts with their various states and containment. The virtual machine maintains the object states through the object instance contexts.
IObjectInstanceCtx
,
Serialized FormField Summary |
---|
Fields inherited from class gov.nasa.arc.brahms.vm.rt.VMActiveInstanceCtx |
---|
m_bInitialized, m_llCIMessageQueue, m_llReceivedMessageConversationIds, m_oBeliefSet, m_oEngine, m_oIncomingMessageLock |
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 | |
---|---|
VMObjectInstanceCtx(ObjectInstance obj)
Constructor, creates a new context for the specified ObjectInstance. |
Method Summary | |
---|---|
void |
addAggregate(PartCtx aggregate)
Adds the specified aggregate as an aggregate for this object instance. |
protected gov.nasa.arc.brahms.vm.engine.IEngine |
createEngine(gov.nasa.arc.brahms.vm.controller.VMController vmc)
Creates a new engine for this active concept for use in a virtual machine |
java.util.Enumeration<PartCtx> |
getAggregates()
Returns a list of all the aggregates (PartCtx). |
int |
getMatchingStrategy(VMFrameCtx frame)
Determines whether the active instance attempts to match facts or beliefs when evaluating OA operands that occur in expressions in the body of the given frame context. |
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. |
void |
initializeAsCopy(gov.nasa.arc.brahms.vm.controller.VMController vmc)
Initializes the object as a local copy of a remote object. |
void |
removeAggregate(PartCtx aggregate)
Removes the specified aggregate as an aggregate for this object instance. |
void |
removeAllAggregates()
Removes all the aggregates from the list of aggregates. |
void |
reset()
Resets the concept removing its context and any references and additional components created to use this concept in a virtual machine. |
Methods inherited from class gov.nasa.arc.brahms.common.rt.ConceptCtx |
---|
addAttribute, addRelation, getAttribute, getRelation, initAttributeRelationCache, removeAttribute, removeRelation, resetAttributeRelationCache, 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 |
Methods inherited from interface gov.nasa.arc.brahms.vm.engine.IPriorityWorkManager |
---|
getCurrentWork |
Constructor Detail |
---|
public VMObjectInstanceCtx(ObjectInstance obj)
obj
- the ObjectInstance for which to create a contextMethod Detail |
---|
public void initializeAsCopy(gov.nasa.arc.brahms.vm.controller.VMController vmc) throws VMException
vmc
- the VMController controlling the virtual machine in which this
concept is to be used.
VMException
- if an error occurs in initializing the conceptprotected gov.nasa.arc.brahms.vm.engine.IEngine createEngine(gov.nasa.arc.brahms.vm.controller.VMController vmc) throws VMException
Note: This method always returns a new instance and does not verify whether one is already created.
createEngine
in class VMActiveInstanceCtx
vmc
- the virtual machine controller controlling the active instance
VMException
- if an error occurs in creating the enginepublic void addAggregate(PartCtx aggregate) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addAggregate
in interface IObjectInstanceCtx
aggregate
- the aggregate (PartCtx) to be added
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if aggregate is nullpublic void removeAggregate(PartCtx aggregate) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
removeAggregate
in interface IObjectInstanceCtx
aggregate
- the aggregate to be removed
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if aggregate is null, no aggregates
are available, or the aggregate is not foundpublic java.util.Enumeration<PartCtx> getAggregates() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getAggregates
in interface IObjectInstanceCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if there are no aggregatespublic void removeAllAggregates()
removeAllAggregates
in interface IObjectInstanceCtx
public void reset() throws VMException
reset
in interface IRuntimeConceptCtx
reset
in class VMActiveInstanceCtx
VMException
- if in error occurs in resetting the active instancepublic 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 int getMatchingStrategy(VMFrameCtx frame) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getMatchingStrategy
in class VMActiveInstanceCtx
frame
- a VMFrameCtx where an expression is being evaluated
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if an error occurs in determining the strategygov.nasa.arc.brahms.vm.data.FACTS
,
gov.nasa.arc.brahms.vm.data.BELIEFS
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |