public class ReasonPacketExtension
extends java.lang.Object
implements org.jivesoftware.smack.packet.PacketExtension
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ELEMENT_NAME
The name of the "content" element.
|
static java.lang.String |
NAMESPACE
The name space (or rather lack thereof ) that the reason element
belongs to.
|
static java.lang.String |
TEXT_ELEMENT_NAME
The name of the text element.
|
Constructor and Description |
---|
ReasonPacketExtension(Reason reason,
java.lang.String text,
org.jivesoftware.smack.packet.PacketExtension packetExtension)
Creates a new ReasonPacketExtension instance with the specified
reason String.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getElementName()
Returns the root element name.
|
java.lang.String |
getNamespace()
Returns the root element XML namespace.
|
org.jivesoftware.smack.packet.PacketExtension |
getOtherExtension()
Returns an extra extension containing further info about this action or
null if no such extension has been specified.
|
Reason |
getReason()
Returns the reason string that this packet extension is transporting.
|
java.lang.String |
getText()
Returns human-readable information about the reason for the action or
null if no such information is currently available.
|
void |
setOtherExtension(org.jivesoftware.smack.packet.PacketExtension otherExtension)
Sets the extra extension containing further info about this action or
null if no such extension has been specified.
|
void |
setText(java.lang.String text)
Sets the human-readable information about the reason for the action or
null if no such information is currently available
|
java.lang.String |
toXML()
Returns the XML representation of the PacketExtension.
|
public static final java.lang.String NAMESPACE
public static final java.lang.String ELEMENT_NAME
public static final java.lang.String TEXT_ELEMENT_NAME
public ReasonPacketExtension(Reason reason, java.lang.String text, org.jivesoftware.smack.packet.PacketExtension packetExtension)
reason
- the reason string that we'd like to transport in this
packet extension, which may or may not be one of the static strings
defined here.text
- an element providing human-readable information about the
reason for the action or null if no such information is
currently available.packetExtension
- any other element that MAY be providing further
information or null if no such element has been specified.public Reason getReason()
public java.lang.String getText()
public void setText(java.lang.String text)
text
- the human-readable information about the reason for the
action or null if no such information is currently availablepublic org.jivesoftware.smack.packet.PacketExtension getOtherExtension()
public void setOtherExtension(org.jivesoftware.smack.packet.PacketExtension otherExtension)
otherExtension
- the extra extension containing further info about
this action or null if no such extension has been specifiedpublic java.lang.String getElementName()
getElementName
in interface org.jivesoftware.smack.packet.PacketExtension
public java.lang.String getNamespace()
getNamespace
in interface org.jivesoftware.smack.packet.PacketExtension
public java.lang.String toXML()
toXML
in interface org.jivesoftware.smack.packet.PacketExtension
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.