org.cougaar.core.mts
Class MessageAddressWithAttributes

java.lang.Object
  extended by org.cougaar.core.mts.MessageAddress
      extended by org.cougaar.core.mts.MessageAddressWithAttributes
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class MessageAddressWithAttributes
extends MessageAddress

A wrapped MessageAddress with added MessageAttributes.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.cougaar.core.mts.MessageAddress
MULTICAST_COMMUNITY, MULTICAST_LOCAL, MULTICAST_SOCIETY, NULL_SYNC
 
Constructor Summary
  MessageAddressWithAttributes()
           
protected MessageAddressWithAttributes(MessageAddress delegate, MessageAttributes attributes)
           
protected MessageAddressWithAttributes(MessageAttributes attributes)
          Deprecated. Why would you want a MessageAddress that only has attributes?
protected MessageAddressWithAttributes(java.lang.String addr, MessageAttributes attrs)
           
 
Method Summary
 MessageAddress getDelegate()
           
static MessageAddress getMessageAddressWithAttributes(MessageAddress ma, MessageAttributes mas)
           
static MessageAddress getMessageAddressWithAttributes(MessageAttributes mas)
          Deprecated. Why would you want a MessageAddress that only has attributes?
static MessageAddress getMessageAddressWithAttributes(java.lang.String address, MessageAttributes mas)
           
 MessageAttributes getMessageAttributes()
           
 MessageAddress getPrimary()
          Return the primary address associated with this MessageAddress, suitable for hashing.
 void readExternal(java.io.ObjectInput in)
           
 java.lang.String toAddress()
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class org.cougaar.core.mts.MessageAddress
equals, getAddress, getMessageAddress, getMessageAddress, getMessageAddress, getMessageAddress, getMessageAddress, getMessageAddress, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MessageAddressWithAttributes

public MessageAddressWithAttributes()

MessageAddressWithAttributes

protected MessageAddressWithAttributes(MessageAddress delegate,
                                       MessageAttributes attributes)

MessageAddressWithAttributes

protected MessageAddressWithAttributes(MessageAttributes attributes)
Deprecated. Why would you want a MessageAddress that only has attributes?


MessageAddressWithAttributes

protected MessageAddressWithAttributes(java.lang.String addr,
                                       MessageAttributes attrs)
Method Detail

getPrimary

public final MessageAddress getPrimary()
Description copied from class: MessageAddress
Return the primary address associated with this MessageAddress, suitable for hashing.

For example, if an address has MessageAttributes, getPrimary() will return the Address without the attributes.

Overrides:
getPrimary in class MessageAddress
Returns:
The MessageAddress without the MessageAtributes

getDelegate

public final MessageAddress getDelegate()
Returns:
The Parent MessageAddress. This is usually the same as the result of getPrimary();

toAddress

public final java.lang.String toAddress()
Specified by:
toAddress in class MessageAddress
Returns:
a string representation of this address, which may not be human readable or parsable.

getMessageAttributes

public final MessageAttributes getMessageAttributes()
Overrides:
getMessageAttributes in class MessageAddress
Returns:
the attributes associated with the address, or null

getMessageAddressWithAttributes

public static final MessageAddress getMessageAddressWithAttributes(MessageAddress ma,
                                                                   MessageAttributes mas)

getMessageAddressWithAttributes

public static final MessageAddress getMessageAddressWithAttributes(java.lang.String address,
                                                                   MessageAttributes mas)

getMessageAddressWithAttributes

public static final MessageAddress getMessageAddressWithAttributes(MessageAttributes mas)
Deprecated. Why would you want a MessageAddress that only has attributes?


writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.lang.ClassNotFoundException,
                         java.io.IOException
Throws:
java.lang.ClassNotFoundException
java.io.IOException