com.opencloud.slee.resources.mm7
Class Recipient

java.lang.Object
  extended by com.opencloud.slee.resources.mm7.MM7Address
      extended by com.opencloud.slee.resources.mm7.Recipient
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public final class Recipient
extends MM7Address

Specialization of MM7Address that adds a recipient type.

See Also:
Serialized Form

Nested Class Summary
static class Recipient.Type
          Enum of recipient types.
 
Nested classes/interfaces inherited from class com.opencloud.slee.resources.mm7.MM7Address
MM7Address.AddressCoding
 
Constructor Summary
Recipient(java.io.DataInput in)
          Create a new recipient from a stream.
Recipient(Recipient.Type type, javax.slee.Address address)
          Create a new recipient.
Recipient(Recipient.Type type, javax.slee.Address address, boolean displayOnly)
          Create a new recipient.
Recipient(Recipient.Type type, javax.slee.Address address, boolean displayOnly, MM7Address.AddressCoding addressCoding, java.lang.String id)
          Create a new recipient.
Recipient(Recipient.Type type, MM7Address address)
          Create a new recipient.
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object o)
           
 void fromStream(java.io.DataInput in)
           
 Recipient.Type getType()
          Get the recipient type of this recipient.
 void toStream(java.io.DataOutput out)
           
 java.lang.String toString()
           
 
Methods inherited from class com.opencloud.slee.resources.mm7.MM7Address
getAddress, getAddressCoding, getID, hashCode, isDisplayOnly
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Recipient

public Recipient(Recipient.Type type,
                 javax.slee.Address address)
Create a new recipient. The recipient is assumed to be a routable address, ie. the displayOnly attribute is set to false.

Parameters:
type - the type of the recipient.
address - the address of the recipient.

Recipient

public Recipient(Recipient.Type type,
                 MM7Address address)
Create a new recipient.

Parameters:
type - the type of the recipient.
address - the address of the recipient.

Recipient

public Recipient(Recipient.Type type,
                 javax.slee.Address address,
                 boolean displayOnly)
Create a new recipient.

Parameters:
type - the type of the recipient.
address - the address of the recipient.
displayOnly - flag indicating whether the recipient is only for display purposes or is a routable address.

Recipient

public Recipient(Recipient.Type type,
                 javax.slee.Address address,
                 boolean displayOnly,
                 MM7Address.AddressCoding addressCoding,
                 java.lang.String id)
Create a new recipient.

Parameters:
type - the type of the recipient.
address - the address of the recipient.
displayOnly - the value of the display-only flag
addressCoding - the value of the address coding, or null if inapplicable
id - the value of id of the address, or null if inapplicable
displayOnly - flag indicating whether the recipient is only for display purposes or is a routable address.

Recipient

public Recipient(java.io.DataInput in)
          throws java.io.IOException
Create a new recipient from a stream.

Parameters:
in - the stream to read from
Throws:
java.io.IOException - if reading fails
Method Detail

getType

public Recipient.Type getType()
Get the recipient type of this recipient.

Returns:
a Recipient.Type singleton enum

toStream

public void toStream(java.io.DataOutput out)
              throws java.io.IOException
Overrides:
toStream in class MM7Address
Throws:
java.io.IOException

fromStream

public void fromStream(java.io.DataInput in)
                throws java.io.IOException
Overrides:
fromStream in class MM7Address
Throws:
java.io.IOException

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class MM7Address

toString

public java.lang.String toString()
Overrides:
toString in class MM7Address

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class MM7Address
Throws:
java.lang.CloneNotSupportedException