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

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.CompleteCtx
All Implemented Interfaces:
IBrahmsObjectCtx, IRuntimeConstants, java.io.Serializable

public class CompleteCtx
extends FrameStateCtx

The CompleteCtx manages information about the completed state of a frame. The completed state is entered by a frame when the a frame completes the actions defined for the frame or when the frame is terminated by a detectable (only possible in workframes). This context maintains when the frame enters the completed state and when the frame leaves the completed state. This context also defines the detectable causing the completion if the frame is terminated due to a detectable's action.

Version:
16 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
CompleteCtx(IFrameCtx frame)
          Constructor, creates a new CompleteCtx for the specified frame
 
Method Summary
 ITriggerCtx getCause()
          Returns the cause for the completion state.
 int getState()
          Returns the state identifier
 java.lang.String getStateName()
          Returns the name of the state
 void setCause(ITriggerCtx cause)
          Sets the cause for the completion state.
 
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

CompleteCtx

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

Parameters:
frame - the IFrameCtx that is set to completed
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)
Sets the cause for the completion state. The cause is optional and can only be a trigger with as action abort or complete.

Parameters:
cause - the ITriggerCtx referencing the trigger causing the completion

getCause

public ITriggerCtx getCause()
Returns the cause for the completion state. The cause is optional. If no cause is specified null is returned. The cause can only be a trigger (with action abort or complete).

Returns:
ITriggerCtx the cause for the completion state


Copyright © 1997-2012 All Rights Reserved.