|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.nasa.arc.brahms.common.rt.BrahmsObjectCtx gov.nasa.arc.brahms.common.rt.ConditionCtx gov.nasa.arc.brahms.common.rt.TransferDefinitionCtx
public class TransferDefinitionCtx
The TransferDefinitionCtx is the context for a transfer definition defining in what communication or broadcast activity the transfer took place, the direction of the transfer, the communicated beliefs, the beliefs created by the transfer definition, the parameters used by the transfer definition and the variables bound by this transfer definition.
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 | |
---|---|
TransferDefinitionCtx(TransferDefinition transferDefinition)
Constructor, creates a new transfer definition context for the specified transfer definition |
Method Summary | |
---|---|
void |
addBoundVariable(VariableCtx var)
Adds the specified variable as a variable bound by this transfer definition. |
void |
addCreatedBelief(IBeliefCtx belief)
Adds the specified belief as a belief created by this transfer definition. |
void |
addTransferredBelief(IBeliefCtx belief)
Adds the specified belief as a belief transferred by this transfer definition. |
void |
addTransferredCommunicativeAct(IObjectInstanceCtx ca)
Adds the specified CommunicativeAct as a CommunicativeAct transferred by this transfer definition. |
void |
addUsedParameter(ParameterCtx p)
Adds the specified parameter as a parameter used by this transfer definition. |
java.util.Enumeration |
getBoundVariables()
Returns a list of all the variables bound by this transfer definition. |
java.util.Enumeration |
getCreatedBeliefs()
Returns a list of all the beliefs created by this transfer definition. |
int |
getDirection()
Returns the direction of the communication for this transfer definition |
IBroadcastActivityCtx |
getParent()
Returns the parent communicate or broadcast activity context in which this transfer definition is used. |
java.util.Enumeration |
getTransferredBeliefs()
Returns a list of all the beliefs transferred throught this transfer definition. |
java.util.Enumeration |
getTransferredCommunicativeActs()
Returns a list of all the CommunicativeActs transferred through this transfer definition. |
java.util.Enumeration |
getUsedParameters()
Returns a list of all the parameters used by this transfer definition. |
boolean |
isTransferredBeliefs()
Indicates whether the transfer definition context was used to transfer beliefs instead of CommunicativeActs. |
boolean |
isTransferredCommunicativeActs()
Indicates whether the transfer definition context was used to transfer CommunicativeActs instead of beliefs. |
void |
removeBoundVariable(VariableCtx var)
Removes the specified variable as a variable bound by this transfer definition. |
void |
removeCreatedBelief(IBeliefCtx belief)
Removes the specified belief as a belief created by this transfer definition. |
void |
removeTransferredBelief(IBeliefCtx belief)
Removes the specified belief as a belief transferred by this transfer definition. |
void |
removeUsedParameter(ParameterCtx p)
Removes the specified parameter as a parameter used by this transfer definition. |
void |
setDirection(int direction)
Sets the direction of the communication for this transfer definition |
void |
setParent(IBroadcastActivityCtx parent)
Sets the parent communicate or broadcast activity context in which this transfer definition is used. |
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 |
Methods inherited from interface gov.nasa.arc.brahms.common.rt.IBrahmsObjectCtx |
---|
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setEndTime, setID, setStartTime |
Constructor Detail |
---|
public TransferDefinitionCtx(TransferDefinition transferDefinition)
transferDefinition
- the TransferDefinition for which this is a contextMethod Detail |
---|
public void setParent(IBroadcastActivityCtx parent) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
setParent
in interface ITransferDefinitionCtx
parent
- the CommunicateActivityCtx in which the transfer definition is used
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if a null parent is specifiedpublic IBroadcastActivityCtx getParent() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getParent
in interface ITransferDefinitionCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no parent is specifiedpublic void setDirection(int direction) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
setDirection
in interface ITransferDefinitionCtx
direction
- the direction of the transfer
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if an invalid direction is specifiedIRuntimeConstants.FROM
,
IRuntimeConstants.TO
public int getDirection() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getDirection
in interface ITransferDefinitionCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no direction is specifiedIRuntimeConstants.FROM
,
IRuntimeConstants.TO
public boolean isTransferredCommunicativeActs()
isTransferredCommunicativeActs
in interface ITransferDefinitionCtx
public void addTransferredCommunicativeAct(IObjectInstanceCtx ca) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addTransferredCommunicativeAct
in interface ITransferDefinitionCtx
ca
- the CommunicativeAct (IObjectInstanceCtx) to be added
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if ca is nullpublic java.util.Enumeration getTransferredCommunicativeActs() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getTransferredCommunicativeActs
in interface ITransferDefinitionCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if there are no transferred CommunicativeActspublic boolean isTransferredBeliefs()
isTransferredBeliefs
in interface ITransferDefinitionCtx
public void addTransferredBelief(IBeliefCtx belief) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addTransferredBelief
in interface ITransferDefinitionCtx
belief
- the belief (IBeliefCtx) to be added
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if belief is nullpublic void removeTransferredBelief(IBeliefCtx belief) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
removeTransferredBelief
in interface ITransferDefinitionCtx
belief
- the belief (IBeliefCtx) to be removed
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if belief is null, no transferred beliefs
are present, or the belief is not foundpublic java.util.Enumeration getTransferredBeliefs() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getTransferredBeliefs
in interface ITransferDefinitionCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if there are no transferred beliefspublic void addCreatedBelief(IBeliefCtx belief) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addCreatedBelief
in interface ITransferDefinitionCtx
belief
- the belief (IBeliefCtx) to be added
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if belief is nullpublic void removeCreatedBelief(IBeliefCtx belief) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
removeCreatedBelief
in interface ITransferDefinitionCtx
belief
- the belief to be removed
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if belief is null, no beliefs
are present, or the belief is not foundpublic java.util.Enumeration getCreatedBeliefs() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getCreatedBeliefs
in interface ITransferDefinitionCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if there are no beliefspublic void addUsedParameter(ParameterCtx p) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addUsedParameter
in interface ITransferDefinitionCtx
p
- the parameter (ParameterCtx) to be added
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if parameter is nullpublic void removeUsedParameter(ParameterCtx p) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
removeUsedParameter
in interface ITransferDefinitionCtx
p
- the parameter (ParameterCtx) to be removed
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if parameter is null, no parameters
are present, or the parameter is not foundpublic java.util.Enumeration getUsedParameters() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getUsedParameters
in interface ITransferDefinitionCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if there are no parameterspublic void addBoundVariable(VariableCtx var) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addBoundVariable
in interface ITransferDefinitionCtx
var
- the variable (VariableCtx) to be added
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if var is nullpublic void removeBoundVariable(VariableCtx var) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
removeBoundVariable
in interface ITransferDefinitionCtx
var
- the variable (VariableCtx) to be removed
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if variable is null, no variables
are present, or the variable is not foundpublic java.util.Enumeration getBoundVariables() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getBoundVariables
in interface ITransferDefinitionCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if there are no variables
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |