gov.nasa.arc.brahms.common.rt
Interface IActivityCtx

All Superinterfaces:
IBrahmsObjectCtx
All Known Subinterfaces:
IBroadcastActivityCtx, ICommunicateActivityCtx, ICompositeActivityCtx, IContainmentActivityCtx, ICreateAgentActivityCtx, ICreateAreaActivityCtx, ICreateObjectActivityCtx, IGestureActivityCtx, IGetActivityCtx, IJavaActivityCtx, IMoveActivityCtx, IPrimitiveActivityCtx, IPutActivityCtx
All Known Implementing Classes:
ActivityCtx, BroadcastActivityCtx, CommunicateActivityCtx, CompositeActivityCtx, ContainmentActivityCtx, CreateAgentActivityCtx, CreateAreaActivityCtx, CreateObjectActivityCtx, GestureActivityCtx, GetActivityCtx, JavaActivityCtx, MoveActivityCtx, PrimitiveActivityCtx, PutActivityCtx, VMActivityCtx, VMBroadcastActivityCtx, VMCommunicateActivityCtx, VMCompositeActivityCtx, VMContainmentActivityCtx, VMCreateAgentActivityCtx, VMCreateAreaActivityCtx, VMCreateObjectActivityCtx, VMGestureActivityCtx, VMGetActivityCtx, VMJavaActivityCtx, VMMoveActivityCtx, VMPrimitiveActivityCtx, VMPutActivityCtx

public interface IActivityCtx
extends IBrahmsObjectCtx

The IActivityCtx is the interface for activity contexts. An ActivityCtx maintains the context of an activity being or to be executed by an active instance. The context maintains the start and end times for an activity, the duration, priority, and status.

Version:
$Revision: 1.1 $ $Date: 2007/10/10 14:12:48 $ $Author: rvhoof $
Author:
Ron van Hoof

Method Summary
 DetectableCtx getCompletionCause()
          Returns the cause of the activities completion if not normal completion, throws an exception is no cause is set.
 ParameterCtx getDisplayText()
          Returns the activities display text.
 IWorkframeCtx getParentFrame()
          Returns the frame context in which this activity is executed, serving as the parent of the activity.
 IActiveInstanceCtx getPerformedBy()
          Returns the active instance performing the activity.
 ParameterCtx getPriority()
          Returns the activities priority.
 ActivityRef getReferencedBy()
          Returns the activity reference referencing this activity and causing the creation of this context.
 int getStatus()
          Returns the activities current status.
 void setCompletionCause(DetectableCtx detectable)
          Sets the cause of the activities completion if not normal completion, throws an exception is no cause is set.
 void setDisplayText(ParameterCtx p)
          Sets the activities display text.
 void setParentFrame(IWorkframeCtx parent)
          Sets the frame context in which this activity is executed, serving as the parent of the activity.
 void setPerformedBy(IActiveInstanceCtx ai)
          Sets the active instance performing the activity.
 void setReferencedBy(ActivityRef referencedBy)
          Sets the activity reference referencing this activity and causing the creation of this context.
 void setStatus(int status)
          Sets the activities current status.
 
Methods inherited from interface gov.nasa.arc.brahms.common.rt.IBrahmsObjectCtx
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setEndTime, setID, setStartTime
 

Method Detail

setReferencedBy

void setReferencedBy(ActivityRef referencedBy)
Sets the activity reference referencing this activity and causing the creation of this context.

Parameters:
referencedBy - the ActivityRef referencing this activity

getReferencedBy

ActivityRef getReferencedBy()
Returns the activity reference referencing this activity and causing the creation of this context.

Returns:
ActivityRef the activity reference referencing this activity

setParentFrame

void setParentFrame(IWorkframeCtx parent)
                    throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets the frame context in which this activity is executed, serving as the parent of the activity.

Parameters:
parent - the IWorkframeCtx in which the activity is executed
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - in case of an internal error

getParentFrame

IWorkframeCtx getParentFrame()
                             throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the frame context in which this activity is executed, serving as the parent of the activity.

Returns:
IWorkframeCtx the frame context in which the activity is executed, null if not set
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - in case of an internal error

setPerformedBy

void setPerformedBy(IActiveInstanceCtx ai)
                    throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets the active instance performing the activity.

Parameters:
ai - the active instance performing the activity.
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if a null active instance is specified

getPerformedBy

IActiveInstanceCtx getPerformedBy()
                                  throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the active instance performing the activity.

Returns:
IActiveInstanceCtx the active instance performing the activity
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no active instance is specified

setDisplayText

void setDisplayText(ParameterCtx p)
                    throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets the activities display text. The display text is set through a parameter context containing either the actual value or a reference to a variable containing the display text value.

Parameters:
p - the ParameterCtx defining the display text of the activity
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if a null display text is defined

getDisplayText

ParameterCtx getDisplayText()
                            throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the activities display text. The display text is set through a parameter context containing either the actual value or a reference to a variable containing the display text value.

Returns:
ParameterCtx the display text of the activity
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no display text is defined

getPriority

ParameterCtx getPriority()
                         throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the activities priority. The priority is set through a parameter context containing either the actual value or a reference to a variable containing the priority value.

Returns:
ParameterCtx the priority of the activity
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no priority is defined

setStatus

void setStatus(int status)
               throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets the activities current status.

Parameters:
status - the status of the activity
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if status is an invalid status
See Also:
IRuntimeConstants

getStatus

int getStatus()
              throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the activities current status.

Returns:
int the status of the activity
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if activity has no status or invalid status
See Also:
IRuntimeConstants

setCompletionCause

void setCompletionCause(DetectableCtx detectable)
                        throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets the cause of the activities completion if not normal completion, throws an exception is no cause is set. The cause can only be a detectable (aborting or completing a workframe).

Parameters:
detectable - the DetectableCtx referencing the detectable causing the completion
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if detectable is null

getCompletionCause

DetectableCtx getCompletionCause()
                                 throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the cause of the activities completion if not normal completion, throws an exception is no cause is set.

Returns:
DetectableCtx the detectable causing the completion
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no cause is set for the activity


Copyright © 1997-2012 All Rights Reserved.