| java.lang.Object org.cougaar.core.adaptivity.OperatingModePolicy org.cougaar.core.adaptivity.InterAgentOperatingModePolicy
All known Subclasses: org.cougaar.logistics.plugin.manager.FallingBehindPolicy,
InterAgentOperatingModePolicy | public class InterAgentOperatingModePolicy extends OperatingModePolicy implements Relay.Source,Relay.Target,java.io.Serializable(Code) | | A remotely-controlled OperatingModePolicy. Allows a policy manager in one
agent to control a Policy of the in another. It is instantiated in
the controlling agent and transferred
to the controlled agent using the Relay logic providers. A copy
of the instance is published in the controlled agent's blackboard
and used like any other OperatingModePolicy.
|
appliesToThisAgent | public boolean appliesToThisAgent()(Code) | | appliesToThisAgent - return true if InterAgentOperatingModePolicy applies to
this Agent.
Default behaviour is to assume that InterAgentOperatingModePolicy does not
apply to the originating Agent.
|
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 targetAddress)(Code) | | Set the message address of the target. This implementation
presumes that there is but one target.
Parameters: targetAddress - the address of the target agent. |
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.
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.
|
|
|