gov.nasa.arc.brahms.common.rt
Class ImpasseCtx

java.lang.Object
  extended by gov.nasa.arc.brahms.common.rt.BrahmsObjectCtx
      extended by gov.nasa.arc.brahms.common.rt.FrameStateCtx
          extended by gov.nasa.arc.brahms.common.rt.ImpasseCtx
All Implemented Interfaces:
IBrahmsObjectCtx, IRuntimeConstants, java.io.Serializable

public class ImpasseCtx
extends FrameStateCtx

The ImpasseCtx manages information about the impassed state of a frame. The impassed state can only be entered by a workframe and is entered by a workframe when the condition of an activated detectable is not met and its action is impasse. This context maintains when the frame enters the impassed state and when the frame leaves the impassed state. This context also defines the detectable causing the impasse and the belief causing the impasse to be resolved.

Version:
14 August 2000
Author:
Ron van Hoof
See Also:
FrameStateCtx, Serialized Form

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
ImpasseCtx(IFrameCtx frame)
          Constructor, creates a new ImpasseCtx for the specified frame
 
Method Summary
 ITriggerCtx getCause()
          Returns the cause of the impasse state.
 IBeliefCtx getResolvedBy()
          Returns the belief resolving the impasse.
 int getState()
          Returns the state identifier
 java.lang.String getStateName()
          Returns the name of the state
 void setCause(ITriggerCtx cause)
          Sets the cause of the impasse state.
 void setResolvedBy(IBeliefCtx belief)
          Sets the belief resolving the impasse.
 
Methods inherited from class gov.nasa.arc.brahms.common.rt.FrameStateCtx
getFrame, getNextFrameState, getPreviousFrameState, setFrame, setNextFrameState, setPreviousFrameState
 
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
 

Constructor Detail

ImpasseCtx

public ImpasseCtx(IFrameCtx frame)
           throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Constructor, creates a new ImpasseCtx for the specified frame

Parameters:
frame - the IFrameCtx that is set to impassed
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if frame specified is null
Method Detail

getState

public int getState()
Returns the state identifier

Overrides:
getState in class FrameStateCtx
Returns:
int the state id

getStateName

public java.lang.String getStateName()
Returns the name of the state

Overrides:
getStateName in class FrameStateCtx
Returns:
String the name of the state

setCause

public void setCause(ITriggerCtx cause)
              throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets the cause of the impasse state. The cause can only be the trigger of an impasse detectable.

Parameters:
cause - the trigger causing the impasse
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if the cause is null

getCause

public ITriggerCtx getCause()
                     throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the cause of the impasse state. The cause can only be the trigger of an impasse detectable.

Returns:
ITriggerCtx the trigger causing the impasse
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no cause is specified

setResolvedBy

public void setResolvedBy(IBeliefCtx belief)
                   throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets the belief resolving the impasse.

Parameters:
belief - the IBeliefCtx for the belief resolving the impasse
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if the belief is null

getResolvedBy

public IBeliefCtx getResolvedBy()
                         throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the belief resolving the impasse.

Returns:
IBeliefCtx the belief resolving the impasse
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no belief is specified


Copyright © 1997-2012 All Rights Reserved.