Smack

org.jivesoftware.smackx.packet
Class MultipleAddresses

java.lang.Object
  extended by org.jivesoftware.smackx.packet.MultipleAddresses
All Implemented Interfaces:
PacketExtension

public class MultipleAddresses
extends Object
implements PacketExtension

Packet extension that contains the list of addresses that a packet should be sent or was sent.

Author:
Gaston Dombiak

Nested Class Summary
static class MultipleAddresses.Address
           
 
Field Summary
static String BCC
           
static String CC
           
static String NO_REPLY
           
static String REPLY_ROOM
           
static String REPLY_TO
           
static String TO
           
 
Constructor Summary
MultipleAddresses()
           
 
Method Summary
 void addAddress(String type, String jid, String node, String desc, boolean delivered, String uri)
          Adds a new address to which the packet is going to be sent or was sent.
 List getAddressesOfType(String type)
          Returns the list of addresses that matches the specified type.
 String getElementName()
          Returns the root element name.
 String getNamespace()
          Returns the root element XML namespace.
 void setNoReply()
          Indicate that the packet being sent should not be replied.
 String toXML()
          Returns the XML representation of the PacketExtension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BCC

public static final String BCC
See Also:
Constant Field Values

CC

public static final String CC
See Also:
Constant Field Values

NO_REPLY

public static final String NO_REPLY
See Also:
Constant Field Values

REPLY_ROOM

public static final String REPLY_ROOM
See Also:
Constant Field Values

REPLY_TO

public static final String REPLY_TO
See Also:
Constant Field Values

TO

public static final String TO
See Also:
Constant Field Values
Constructor Detail

MultipleAddresses

public MultipleAddresses()
Method Detail

addAddress

public void addAddress(String type,
                       String jid,
                       String node,
                       String desc,
                       boolean delivered,
                       String uri)
Adds a new address to which the packet is going to be sent or was sent.

Parameters:
type - on of the static type (BCC, CC, NO_REPLY, REPLY_ROOM, etc.)
jid - the JID address of the recipient.
node - used to specify a sub-addressable unit at a particular JID, corresponding to a Service Discovery node.
desc - used to specify human-readable information for this address.
delivered - true when the packet was already delivered to this address.
uri - used to specify an external system address, such as a sip:, sips:, or im: URI.

setNoReply

public void setNoReply()
Indicate that the packet being sent should not be replied.


getAddressesOfType

public List getAddressesOfType(String type)
Returns the list of addresses that matches the specified type. Examples of address type are: TO, CC, BCC, etc..

Parameters:
type - Examples of address type are: TO, CC, BCC, etc.
Returns:
the list of addresses that matches the specified type.

getElementName

public String getElementName()
Description copied from interface: PacketExtension
Returns the root element name.

Specified by:
getElementName in interface PacketExtension
Returns:
the element name.

getNamespace

public String getNamespace()
Description copied from interface: PacketExtension
Returns the root element XML namespace.

Specified by:
getNamespace in interface PacketExtension
Returns:
the namespace.

toXML

public String toXML()
Description copied from interface: PacketExtension
Returns the XML representation of the PacketExtension.

Specified by:
toXML in interface PacketExtension
Returns:
the packet extension as XML.

Smack

Copyright © 2003-2007 Jive Software.