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

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.BroadcastActivityCtx
All Implemented Interfaces:
IActivityCtx, IBrahmsObjectCtx, IBroadcastActivityCtx, IPrimitiveActivityCtx, IRuntimeConstants, java.io.Serializable
Direct Known Subclasses:
CommunicateActivityCtx

public class BroadcastActivityCtx
extends PrimitiveActivityCtx
implements IBroadcastActivityCtx

The BroadcastActivityCtx maintains the context of a broadcast 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, with whom or what the broadcast is with, what the communication is about, the type of communication and when the communication is to occur during the activity. The virtual machine determines with whom or what the communication of the broadcast is with.

Version:
28 March 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
BroadcastActivityCtx(BroadcastActivity act)
          Constructor, creates a new context for the specified BroadcastActivity.
 
Method Summary
 void addAbout(TransferDefinitionCtx about)
          Adds the transfer definition specifying a piece of information that was communicated in the activity.
 void addWith(ParameterCtx ai)
          Adds the active instance with which is to be communicated.
 java.util.Enumeration getAbout()
          Returns the transfer definitions specifying the information that was communicated in the activity.
 ParameterCtx getType()
          Returns the communication type (face 2 face, e-mail, etc).
 ParameterCtx getWhen()
          Returns when the communication is to take place (start or end).
 java.util.Enumeration getWith()
          Returns the active instances with which is to be communicated.
 void removeAbout(TransferDefinitionCtx about)
          Removes the transfer definition specifying a piece of information that was communicated in the activity.
 void removeWith(ParameterCtx ai)
          Removes the active instance with which is to be communicated.
 void setType(ParameterCtx type)
          Sets the communication type (face 2 face, e-mail, etc).
 void setWhen(ParameterCtx when)
          Sets when the communication 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

BroadcastActivityCtx

public BroadcastActivityCtx(BroadcastActivity act)
Constructor, creates a new context for the specified BroadcastActivity.

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

setType

public void setType(ParameterCtx type)
             throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets the communication type (face 2 face, e-mail, etc). The type is set through a parameter context containing either the actual value or a reference to a variable containing the type value.

Parameters:
type - the ParameterCtx defining the communication type
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if a null type is defined

getType

public ParameterCtx getType()
                     throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the communication type (face 2 face, e-mail, etc). The type is set through a parameter context containing either the actual value or a reference to a variable containing the type value.

Specified by:
getType in interface IBroadcastActivityCtx
Returns:
ParameterCtx the communication type
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no type is defined

setWhen

public void setWhen(ParameterCtx when)
             throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets when the communication 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 the when the communication is to occur
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 communication 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 IBroadcastActivityCtx
Returns:
ParameterCtx the when value defining when the communication is to occur
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if the when value is not defined

addWith

public void addWith(ParameterCtx ai)
             throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the active instance with which is to be communicated.

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

removeWith

public void removeWith(ParameterCtx ai)
                throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Removes the active instance with which is to be communicated.

Parameters:
ai - the active instance to be removed
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if a null active instance is specified, or no active instances are specified or the active instance is not found

getWith

public java.util.Enumeration getWith()
                              throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the active instances with which is to be communicated.

Specified by:
getWith in interface IBroadcastActivityCtx
Returns:
Enumeration the ParameterCtx referecing active instances to communicate with
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no active instances are specified

addAbout

public void addAbout(TransferDefinitionCtx about)
              throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the transfer definition specifying a piece of information that was communicated in the activity.

Parameters:
about - the communicated transfer definition
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if a null transfer definition is specified

removeAbout

public void removeAbout(TransferDefinitionCtx about)
                 throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Removes the transfer definition specifying a piece of information that was communicated in the activity.

Parameters:
about - the communicated transfer definition
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if a null transfer definition is specified, or no transfer definitions are specified or the transfer definition is not found

getAbout

public java.util.Enumeration getAbout()
                               throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the transfer definitions specifying the information that was communicated in the activity.

Specified by:
getAbout in interface IBroadcastActivityCtx
Returns:
Enumeration the communicated TransferDefinitionCtx
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no transfer definitions are specified


Copyright © 1997-2012 All Rights Reserved.