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

java.lang.Object
  extended by gov.nasa.arc.brahms.common.rt.BrahmsObjectCtx
      extended by gov.nasa.arc.brahms.common.rt.ActivityCtx
          extended by gov.nasa.arc.brahms.common.rt.PrimitiveActivityCtx
              extended by gov.nasa.arc.brahms.common.rt.JavaActivityCtx
All Implemented Interfaces:
IActivityCtx, IBrahmsObjectCtx, IJavaActivityCtx, IPrimitiveActivityCtx, IRuntimeConstants, java.io.Serializable

public class JavaActivityCtx
extends PrimitiveActivityCtx
implements IJavaActivityCtx

A JavaActivityCtx maintains the context of a java activity being or to be executed by an active instance. The context maintains the start and end times for an activity, the duration, priority, status, randomness, duration, resources, what java class it used to execute the activity and when the activity was executed.

Version:
24 August 2000
Author:
Ron van Hoof
See Also:
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
JavaActivityCtx(JavaActivity act)
          Constructor, creates a new context for the specified JavaActivity.
 
Method Summary
 ParameterCtx getJavaClass()
          Returns the fully qualified name of the class that is to be used to perform the Java activity.
 ParameterCtx getWhen()
          Returns when the java activity is to take place (start or end).
 void setJavaClass(ParameterCtx javaClass)
          Sets the fully qualified name of the class that is to be used to perform the Java activity.
 void setWhen(ParameterCtx when)
          Sets when the java activity is to take place (start or end).
 
Methods inherited from class gov.nasa.arc.brahms.common.rt.PrimitiveActivityCtx
addResource, getDuration, getElapsedTime, getMaxDuration, getMinDuration, getRandom, getResourceCount, getResources, removeResource, setDuration, setElapsedTime, setMaxDuration, setMinDuration, setRandom
 
Methods inherited from class gov.nasa.arc.brahms.common.rt.ActivityCtx
getCompletionCause, getDisplayText, getParentFrame, getPerformedBy, getPriority, getReferencedBy, getState, getStatus, setCompletionCause, setDisplayText, setParentFrame, setPerformedBy, setPriority, setReferencedBy, setState, setState, setStatus, 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.IPrimitiveActivityCtx
addResource, getDuration, getElapsedTime, getMaxDuration, getMinDuration, getRandom, getResourceCount, getResources, removeResource, setElapsedTime
 
Methods inherited from interface gov.nasa.arc.brahms.common.rt.IActivityCtx
getCompletionCause, getDisplayText, getParentFrame, getPerformedBy, getPriority, getReferencedBy, getStatus, setCompletionCause, setDisplayText, setParentFrame, setPerformedBy, setReferencedBy, setStatus
 
Methods inherited from interface gov.nasa.arc.brahms.common.rt.IBrahmsObjectCtx
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setEndTime, setID, setStartTime
 

Constructor Detail

JavaActivityCtx

public JavaActivityCtx(JavaActivity act)
Constructor, creates a new context for the specified JavaActivity.

Parameters:
act - the JavaActivity for which to create a context
Method Detail

setJavaClass

public void setJavaClass(ParameterCtx javaClass)
                  throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets the fully qualified name of the class that is to be used to perform the Java activity. The name is set through a parameter contect containing either a String value with the name or a reference to a variable containing the name of the class.

Parameters:
javaClass - the ParameterCtx specifying the fully qualified name of the java class
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if the javaClass is null

getJavaClass

public ParameterCtx getJavaClass()
                          throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the fully qualified name of the class that is to be used to perform the Java activity. The name is set through a parameter contect containing either a String value with the name or a reference to a variable containing the name of the class.

Specified by:
getJavaClass in interface IJavaActivityCtx
Returns:
ParameterCtx the java class defining the java code to be executed
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if the when value is not defined

setWhen

public void setWhen(ParameterCtx when)
             throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets when the java activity is to take place (start or end). The when value is set through a parameter context containing either the actual value or a reference to a variable containing the when value.

Parameters:
when - the ParameterCtx defining when the java code is to be executed
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if a null when value is defined

getWhen

public ParameterCtx getWhen()
                     throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns when the java activity is to take place (start or end). The when value is set through a parameter context containing either the actual value or a reference to a variable containing the when value.

Specified by:
getWhen in interface IJavaActivityCtx
Returns:
ParameterCtx the when value defining when the java activity is to occur
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if the when value is not defined


Copyright © 1997-2012 All Rights Reserved.