| java.lang.Object org.cougaar.core.adaptivity.OMCBase org.cougaar.core.adaptivity.InterAgentCondition
InterAgentCondition | public class InterAgentCondition extends OMCBase implements Relay.Source,Relay.Target,Condition,UniqueObject(Code) | | The Condition part of a remotely-controlled Condition. This is the
Relay.Target that receives updates from the InterAgentOperatingMode
Relay.Source. An instance of this class is instantiated on the
target's blackboard and acts as any other Condition such as
providing an input to the adaptivity engine.
|
getContent | public Object getContent()(Code) | | Get an object representing the value of this Relay suitable
for transmission. This implementation uses itself to represent
its Content.
|
getResponse | public Object getResponse()(Code) | | Get the current response for this target. Null indicates that
this target has no response. This implementation never has a
response so it always returns null.
|
getSource | public MessageAddress getSource()(Code) | | Get the address of the Agent holding the Source copy of
this Relay.
|
getTargets | public Set getTargets()(Code) | | Get all the addresses of the target agents to which this Relay
should be sent. For this implementation this is always a
singleton set contain just one target.
|
setTarget | public void setTarget(MessageAddress target)(Code) | | Set the message address of the target. This implementation
presumes that there is but one target.
Parameters: target - the address of the target agent. |
setUID | public void setUID(UID uid)(Code) | | Set the UID (unique identifier) of this UniqueObject. Used only
during initialization.
Parameters: uid - the UID to be given to this |
updateContent | public int updateContent(Object content, Relay.Token token)(Code) | | Update with new content. The only part of the source content used
is the value of the operating mode. This will accept an InterAgentOperatingMode
or an InterAgentCondition as the content. Anything else will cause a ClassCastException.
true if the update changed the Relay. The LP shouldpublishChange the Relay. This implementation returns true onlyif the new value differs from the current value. |
updateResponse | public int updateResponse(MessageAddress target, Object response)(Code) | | Set the response that was sent from a target. For LP use only.
This implemenation does nothing because responses are not needed
or used.
|
|
|