| java.lang.Object org.cougaar.core.mts.Message org.cougaar.mts.std.AttributedMessage
All known Subclasses: org.cougaar.mts.base.MessageReply,
AttributedMessage | public class AttributedMessage extends Message implements Externalizable,MessageAttributes,AttributeConstants(Code) | | An AttributedMessage is a Message with metadata, the latter
represented as HashMap with String keys. When a Message enters the
MTS it will be wrapped in an AttributedMessage, passed through the
MTS in that form, and then unwrapped and delivered at the point of
final delivery. AttributedMessages should not be construed as
envelopes. In particular, it's not appropriate to introduce
further levels of 'wrapping' beyond the initial one.
|
Constructor Summary | |
public | AttributedMessage() Only invoked by server-side RMI when it's creating one of these
to correspond to one that was sent as data. | public | AttributedMessage(Message contents) Make an AttributedMessage whose content is the given message
and whose source and destination are those of the contents. | public | AttributedMessage(Message contents, MessageAttributes initialAttributes) | public | AttributedMessage(AttributedMessage msg) Make an AttributedMessage whose content, source and destination
are copied from the argument, and whose initial set of
attributes is a snapshot of the argument's current set of
attributes. | public | AttributedMessage(AttributedMessage source, Class msgClass) | public | AttributedMessage(Message contents, AttributedMessage initialAttributes) Make an AttributedMessage whose content, source and destination
are copied from the first argument, and whose initial set of
attributes is a snapshot of the second argument's current set
of attributes. |
Method Summary | |
public void | addFilter(Object aspect) | public void | addLocalValue(String attribute, Object value) | public void | addValue(String attribute, Object value) | public void | clearAttributes() | public Attributes | cloneAttributes() | public Object | getAttribute(String attribute) | public String | getAttributesAsString() | public Message | getRawMessage() Returns the raw (unattributed) message. | String | logString() | public void | mergeAttributes(Attributes attributes) | public void | pushLocalValue(String attribute, Object value) | public void | pushValue(String attribute, Object value) | public void | readExternal(ObjectInput rawIn) First, read special metadata directly from the output stream.
Currently the only special metadata is the list of Aspect
classes for the filtering streams. | public void | removeAttribute(String attribute) | public void | removeLocalAttribute(String attribute) | public void | removeLocalValue(String attribute, Object value) | public void | removeValue(String attribute, Object value) | protected boolean | replyOnly() | public synchronized void | restoreSnapshot() | public void | setAttribute(String attribute, Object value) | public void | setLocalAttribute(String attribute, Object value) | public synchronized void | snapshotAttributes() | public String | toString() | public void | writeExternal(ObjectOutput rawOut) First, write special metadata directly to the output stream.
Currently the only special metadata is the list of Aspect
classes for the filtering streams. |
AttributedMessage | public AttributedMessage()(Code) | | Only invoked by server-side RMI when it's creating one of these
to correspond to one that was sent as data.
|
AttributedMessage | public AttributedMessage(Message contents)(Code) | | Make an AttributedMessage whose content is the given message
and whose source and destination are those of the contents.
The resulting AttributedMessage will have no attributes.
|
AttributedMessage | public AttributedMessage(AttributedMessage msg)(Code) | | Make an AttributedMessage whose content, source and destination
are copied from the argument, and whose initial set of
attributes is a snapshot of the argument's current set of
attributes.
|
AttributedMessage | public AttributedMessage(Message contents, AttributedMessage initialAttributes)(Code) | | Make an AttributedMessage whose content, source and destination
are copied from the first argument, and whose initial set of
attributes is a snapshot of the second argument's current set
of attributes.
|
clearAttributes | public void clearAttributes()(Code) | | |
getAttributesAsString | public String getAttributesAsString()(Code) | | |
getRawMessage | public Message getRawMessage()(Code) | | Returns the raw (unattributed) message.
|
readExternal | public void readExternal(ObjectInput rawIn) throws java.io.IOException, ClassNotFoundException(Code) | | First, read special metadata directly from the output stream.
Currently the only special metadata is the list of Aspect
classes for the filtering streams. Next, generate the nested
filtering streams, using those Aspects. Next, allow the Aspect
delegates to perform any preprocessing they might need to do.
Next, read the raw message and the raw attributes through the
nested filtering streams. Finally, allow the Attributes to do
postprocessing.
|
removeAttribute | public void removeAttribute(String attribute)(Code) | | |
removeLocalAttribute | public void removeLocalAttribute(String attribute)(Code) | | |
replyOnly | protected boolean replyOnly()(Code) | | |
restoreSnapshot | public synchronized void restoreSnapshot()(Code) | | |
snapshotAttributes | public synchronized void snapshotAttributes()(Code) | | |
writeExternal | public void writeExternal(ObjectOutput rawOut) throws java.io.IOException(Code) | | First, write special metadata directly to the output stream.
Currently the only special metadata is the list of Aspect
classes for the filtering streams. Next, generate the nested
filtering streams, using those Aspects. Next, allow the Aspect
delegates to perform any preprocessing they might need to do.
Next, write the raw message and the raw attributes through the
nested filtering streams. Finally, allow the Attributes to do
postprocessing.
|
|
|