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

All Superinterfaces:
IBrahmsObjectCtx, IConditionCtx
All Known Implementing Classes:
TransferDefinitionCtx, VMTransferDefinitionCtx

public interface ITransferDefinitionCtx
extends IConditionCtx

The ITransferDefinitionCtx is the interface for 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.

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

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 through 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 interface gov.nasa.arc.brahms.common.rt.IBrahmsObjectCtx
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setEndTime, setID, setStartTime
 

Method Detail

setParent

void setParent(IBroadcastActivityCtx parent)
               throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets the parent communicate or broadcast activity context in which this transfer definition is used.

Parameters:
parent - the CommunicateActivityCtx in which the transfer definition is used
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if a null parent is specified

getParent

IBroadcastActivityCtx getParent()
                                throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the parent communicate or broadcast activity context in which this transfer definition is used.

Returns:
IBroadcastActivityCtx the parent communicate or broadcast activity context in which the transfer definition is used
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no parent is specified

setDirection

void setDirection(int direction)
                  throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets the direction of the communication for this transfer definition

Parameters:
direction - the direction of the transfer
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if an invalid direction is specified
See Also:
IRuntimeConstants.FROM, IRuntimeConstants.TO

getDirection

int getDirection()
                 throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the direction of the communication for this transfer definition

Returns:
int the direction
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no direction is specified
See Also:
IRuntimeConstants.FROM, IRuntimeConstants.TO

isTransferredCommunicativeActs

boolean isTransferredCommunicativeActs()
Indicates whether the transfer definition context was used to transfer CommunicativeActs instead of beliefs.

Returns:
boolean true if used to transfer CommunicativeActs, false if beliefs

addTransferredCommunicativeAct

void addTransferredCommunicativeAct(IObjectInstanceCtx ca)
                                    throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified CommunicativeAct as a CommunicativeAct transferred by this transfer definition.

Parameters:
ca - the CommunicativeAct (IObjectInstanceCtx) to be added
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if ca is null

getTransferredCommunicativeActs

java.util.Enumeration getTransferredCommunicativeActs()
                                                      throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns a list of all the CommunicativeActs transferred through this transfer definition.

Returns:
Enumeration an enumeration of IObjectInstanceCtx
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if there are no transferred CommunicativeActs

isTransferredBeliefs

boolean isTransferredBeliefs()
Indicates whether the transfer definition context was used to transfer beliefs instead of CommunicativeActs.

Returns:
boolean true if used to transfer beliefs, false if CommunicativeActs

addTransferredBelief

void addTransferredBelief(IBeliefCtx belief)
                          throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified belief as a belief transferred by this transfer definition.

Parameters:
belief - the belief (IBeliefCtx) to be added
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if belief is null

removeTransferredBelief

void removeTransferredBelief(IBeliefCtx belief)
                             throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Removes the specified belief as a belief transferred by this transfer definition.

Parameters:
belief - the belief (IBeliefCtx) to be removed
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if belief is null, no transferred beliefs are present, or the belief is not found

getTransferredBeliefs

java.util.Enumeration getTransferredBeliefs()
                                            throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns a list of all the beliefs transferred through this transfer definition.

Returns:
Enumeration an enumeration of IBeliefCtx
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if there are no transferred beliefs

addCreatedBelief

void addCreatedBelief(IBeliefCtx belief)
                      throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified belief as a belief created by this transfer definition.

Parameters:
belief - the belief (IBeliefCtx) to be added
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if belief is null

removeCreatedBelief

void removeCreatedBelief(IBeliefCtx belief)
                         throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Removes the specified belief as a belief created by this transfer definition.

Parameters:
belief - the belief to be removed
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if belief is null, no beliefs are present, or the belief is not found

getCreatedBeliefs

java.util.Enumeration getCreatedBeliefs()
                                        throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns a list of all the beliefs created by this transfer definition.

Returns:
Enumeration an enumeration of IBeliefCtx
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if there are no beliefs

addUsedParameter

void addUsedParameter(ParameterCtx p)
                      throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified parameter as a parameter used by this transfer definition.

Parameters:
p - the parameter (ParameterCtx) to be added
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if parameter is null

removeUsedParameter

void removeUsedParameter(ParameterCtx p)
                         throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Removes the specified parameter as a parameter used by this transfer definition.

Parameters:
p - the parameter (ParameterCtx) to be removed
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if parameter is null, no parameters are present, or the parameter is not found

getUsedParameters

java.util.Enumeration getUsedParameters()
                                        throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns a list of all the parameters used by this transfer definition.

Returns:
Enumeration an enumeration of ParameterCtx
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if there are no parameters

addBoundVariable

void addBoundVariable(VariableCtx var)
                      throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified variable as a variable bound by this transfer definition.

Parameters:
var - the variable (VariableCtx) to be added
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if var is null

removeBoundVariable

void removeBoundVariable(VariableCtx var)
                         throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Removes the specified variable as a variable bound by this transfer definition.

Parameters:
var - the variable (VariableCtx) to be removed
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if variable is null, no variables are present, or the variable is not found

getBoundVariables

java.util.Enumeration getBoundVariables()
                                        throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns a list of all the variables bound by this transfer definition.

Returns:
Enumeration an enumeration of VariableCtx
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if there are no variables


Copyright © 1997-2012 All Rights Reserved.