Class MultipleAddresses
- java.lang.Object
-
- org.jivesoftware.smackx.address.packet.MultipleAddresses
-
- All Implemented Interfaces:
Element
,ExtensionElement
,FullyQualifiedElement
,NamedElement
,XmlLangElement
public class MultipleAddresses extends Object implements ExtensionElement
Stanza extension that contains the list of addresses that a stanza should be sent or was sent.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MultipleAddresses.Address
static class
MultipleAddresses.Type
-
Constructor Summary
Constructors Constructor Description MultipleAddresses()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAddress(MultipleAddresses.Type type, Jid jid, String node, String desc, boolean delivered, String uri)
Adds a new address to which the stanza is going to be sent or was sent.List<MultipleAddresses.Address>
getAddressesOfType(MultipleAddresses.Type 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 stanza being sent should not be replied.XmlStringBuilder
toXML(XmlEnvironment enclosingNamespace)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jivesoftware.smack.packet.FullyQualifiedElement
getLanguage, getQName
-
-
-
-
Field Detail
-
NAMESPACE
public static final String NAMESPACE
- See Also:
- Constant Field Values
-
ELEMENT
public static final String ELEMENT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MultipleAddresses
public MultipleAddresses()
-
-
Method Detail
-
addAddress
public void addAddress(MultipleAddresses.Type type, Jid jid, String node, String desc, boolean delivered, String uri)
Adds a new address to which the stanza 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 stanza 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 stanza being sent should not be replied.
-
getAddressesOfType
public List<MultipleAddresses.Address> getAddressesOfType(MultipleAddresses.Type 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:NamedElement
Returns the root element name.- Specified by:
getElementName
in interfaceNamedElement
- Returns:
- the element name.
-
getNamespace
public String getNamespace()
Description copied from interface:FullyQualifiedElement
Returns the root element XML namespace.- Specified by:
getNamespace
in interfaceFullyQualifiedElement
- Returns:
- the namespace.
-
toXML
public XmlStringBuilder toXML(XmlEnvironment enclosingNamespace)
-
-