public class MultipleAddresses extends Object implements PacketExtension
Modifier and Type | Class and Description |
---|---|
static class |
MultipleAddresses.Address |
Modifier and Type | Field and Description |
---|---|
static String |
BCC |
static String |
CC |
static String |
ELEMENT |
static String |
NAMESPACE |
static String |
NO_REPLY |
static String |
REPLY_ROOM |
static String |
REPLY_TO |
static String |
TO |
Constructor and Description |
---|
MultipleAddresses() |
Modifier and Type | Method and Description |
---|---|
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<MultipleAddresses.Address> |
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.
|
public static final String NAMESPACE
public static final String ELEMENT
public static final String BCC
public static final String CC
public static final String NO_REPLY
public static final String REPLY_ROOM
public static final String REPLY_TO
public static final String TO
public MultipleAddresses()
public void addAddress(String type, String jid, String node, String desc, boolean delivered, String uri)
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.public void setNoReply()
public List<MultipleAddresses.Address> getAddressesOfType(String type)
type
- Examples of address type are: TO, CC, BCC, etc.public String getElementName()
PacketExtension
getElementName
in interface PacketExtension
public String getNamespace()
PacketExtension
getNamespace
in interface PacketExtension
public String toXML()
PacketExtension
toXML
in interface PacketExtension