Class JingleReason
- java.lang.Object
-
- org.jivesoftware.smackx.jingle.element.JingleReason
-
- All Implemented Interfaces:
Element
,FullyQualifiedElement
,NamedElement
,XmlLangElement
- Direct Known Subclasses:
JingleReason.AlternativeSession
public class JingleReason extends java.lang.Object implements FullyQualifiedElement
The Jingle 'reason' element.- See Also:
- XEP-0166 ยง 7.4
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JingleReason.AlternativeSession
static class
JingleReason.Reason
-
Field Summary
Fields Modifier and Type Field Description static JingleReason
Busy
static JingleReason
Cancel
static JingleReason
ConnectivityError
static JingleReason
Decline
static java.lang.String
ELEMENT
static JingleReason
Expired
static JingleReason
FailedApplication
static JingleReason
FailedTransport
static JingleReason
GeneralError
static JingleReason
Gone
static JingleReason
IncompatibleParameters
static JingleReason
MediaError
static java.lang.String
NAMESPACE
protected JingleReason.Reason
reason
static JingleReason
SecurityError
static JingleReason
Success
static java.lang.String
TEXT_ELEMENT
static JingleReason
Timeout
static JingleReason
UnsupportedApplications
static JingleReason
UnsupportedTransports
-
Constructor Summary
Constructors Constructor Description JingleReason(JingleReason.Reason reason)
JingleReason(JingleReason.Reason reason, java.lang.String text, ExtensionElement element)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JingleReason.AlternativeSession
AlternativeSession(java.lang.String sessionId)
JingleReason.Reason
asEnum()
ExtensionElement
getElement()
An optional element that provides more detailed machine-readable information about the reason for the action.java.lang.String
getElementName()
Returns the root element name.java.lang.String
getNamespace()
Returns the root element XML namespace.java.lang.String
getText()
An optional text that provides human-readable information about the reason for the action.XmlStringBuilder
toXML(XmlEnvironment enclosingXmlEnvironment)
-
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
-
ELEMENT
public static final java.lang.String ELEMENT
- See Also:
- Constant Field Values
-
NAMESPACE
public static final java.lang.String NAMESPACE
- See Also:
- Constant Field Values
-
TEXT_ELEMENT
public static final java.lang.String TEXT_ELEMENT
- See Also:
- Constant Field Values
-
Busy
public static final JingleReason Busy
-
Cancel
public static final JingleReason Cancel
-
ConnectivityError
public static final JingleReason ConnectivityError
-
Decline
public static final JingleReason Decline
-
Expired
public static final JingleReason Expired
-
FailedApplication
public static final JingleReason FailedApplication
-
FailedTransport
public static final JingleReason FailedTransport
-
GeneralError
public static final JingleReason GeneralError
-
Gone
public static final JingleReason Gone
-
IncompatibleParameters
public static final JingleReason IncompatibleParameters
-
MediaError
public static final JingleReason MediaError
-
SecurityError
public static final JingleReason SecurityError
-
Success
public static final JingleReason Success
-
Timeout
public static final JingleReason Timeout
-
UnsupportedApplications
public static final JingleReason UnsupportedApplications
-
UnsupportedTransports
public static final JingleReason UnsupportedTransports
-
reason
protected final JingleReason.Reason reason
-
-
Constructor Detail
-
JingleReason
public JingleReason(JingleReason.Reason reason)
-
JingleReason
public JingleReason(JingleReason.Reason reason, java.lang.String text, ExtensionElement element)
-
-
Method Detail
-
AlternativeSession
public static JingleReason.AlternativeSession AlternativeSession(java.lang.String sessionId)
-
getElementName
public java.lang.String getElementName()
Description copied from interface:NamedElement
Returns the root element name.- Specified by:
getElementName
in interfaceNamedElement
- Returns:
- the element name.
-
getNamespace
public java.lang.String getNamespace()
Description copied from interface:FullyQualifiedElement
Returns the root element XML namespace.- Specified by:
getNamespace
in interfaceFullyQualifiedElement
- Returns:
- the namespace.
-
getText
public java.lang.String getText()
An optional text that provides human-readable information about the reason for the action.- Returns:
- a human-readable text with information regarding this reason or
null
. - Since:
- 4.4.5
-
getElement
public ExtensionElement getElement()
An optional element that provides more detailed machine-readable information about the reason for the action.- Returns:
- an element with machine-readable information about this reason or
null
. - Since:
- 4.4.5
-
toXML
public XmlStringBuilder toXML(XmlEnvironment enclosingXmlEnvironment)
-
asEnum
public JingleReason.Reason asEnum()
-
-