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

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

public class InterruptCtx
extends FrameStateCtx

The InterruptCtx manages information about the interrupted state of a frame. The interrupted state can only be entered by a workframe and is entered by a workframe when another frame with a higher priority was scheduled for execution by the virtual machine. This context maintains when the frame enters the interrupted state and when the frame leaves the interrupted state. This context also defines the frame context that has the higher priority causing the current frame to be interrupted.

Version:
28 July 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
InterruptCtx(IFrameCtx frame)
          Constructor, creates a new InterruptCtx for the specified frame
 
Method Summary
 IFrameCtx getCause()
          Returns the cause for the interrupt, must be a frame context for a frame with a higher priority then the frame referenced by this frame state.
 int getState()
          Returns the state identifier
 java.lang.String getStateName()
          Returns the name of the state
 void setCause(IFrameCtx cause)
          Sets the cause for the interrupt, must be a frame context for a frame with a higher priority then the frame referenced by this frame 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

InterruptCtx

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

Parameters:
frame - the IFrameCtx that is set to interrupted
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(IFrameCtx cause)
              throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets the cause for the interrupt, must be a frame context for a frame with a higher priority then the frame referenced by this frame state.

Parameters:
cause - the IFrameCtx with the higher priority causing the interrupt
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if the cause is null

getCause

public IFrameCtx getCause()
                   throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the cause for the interrupt, must be a frame context for a frame with a higher priority then the frame referenced by this frame state.

Returns:
IFrameCtx the frame with the higher priority causing the interrupt
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no cause is specified


Copyright © 1997-2012 All Rights Reserved.