org.cougaar.core.plugin.freeze
Class FreezeRelaySource
java.lang.Object
org.cougaar.core.util.SimpleUniqueObject
org.cougaar.core.plugin.freeze.FreezeRelaySource
- All Implemented Interfaces:
- java.io.Serializable, NotPersistable, Relay, Relay.Source, UniqueObject
public class FreezeRelaySource
- extends SimpleUniqueObject
- implements Relay.Source, NotPersistable
A source-side freeze Relay.
NOTE: This is part of the older mechanism for freezing the society. The
current mechanism uses FreezeServlet located on every agent in the society,
and depends on some external process to tell all agents to freeze. This older
mechanism has not been removed so that people can continue to use a single servlet
to freeze the entire society, but the FreezeServlet mechanism is preferred now.
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getTargets
public java.util.Set getTargets()
- Description copied from interface:
Relay.Source
- Get the addresses of the target agents to which this
Relay should be sent.
- Specified by:
getTargets in interface Relay.Source
getContent
public java.lang.Object getContent()
- Description copied from interface:
Relay.Source
- Get an object representing the value of this Relay
suitable for transmission. Caution!!! The content should, in
general not contain targets, source, responses,
factories or anything else that is not essential for specifying
the content. For implementations wishing to use the same class
for implementing Relay.Source, Relay.Target, and Relay.Content,
these non-essential items should be declared transient and
writeObject and readObject methods written to serialize these
items only for persistence, that is, only if the object streams
are instances of PersistenceOutputStream or
PersistenceInputStream.
Also, see the cautions for
getTargetFactory
- Specified by:
getContent in interface Relay.Source
getTargetFactory
public Relay.TargetFactory getTargetFactory()
- Description copied from interface:
Relay.Source
- Get a factory for creating the target.
Null indicates that the content can be directly cast into
the Target object. Be wary of aliasing of the content between
multiple agents in the same node. If the content is immutable,
there is no problem, but if the content can be changed by
either the source or target, the content should be cloned or
otherwise used to create a new target object.
- Specified by:
getTargetFactory in interface Relay.Source
updateResponse
public int updateResponse(MessageAddress target,
java.lang.Object response)
- Description copied from interface:
Relay.Source
- Update the source with the new response.
- Specified by:
updateResponse in interface Relay.Source
- Returns:
- NO_CHANGE if the update caused no change to the source
RESPONSE_CHANGED if the source is also a target and the
incoming response requires that a new outgoing response be sent
to the source.
CONTENT_CHANGED if the update has changed the content of
the source
RESPONSE_CHANGED|CONTENT_CHANGED if both changes occurred