Package org.jivesoftware.smack.packet
Class Message.Body
- java.lang.Object
-
- org.jivesoftware.smack.packet.Message.Body
-
- All Implemented Interfaces:
Element
,ExtensionElement
,FullyQualifiedElement
,NamedElement
,XmlLangElement
- Enclosing class:
- Message
public static final class Message.Body extends java.lang.Object implements ExtensionElement
Represents a message body, its language and the content of the message.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.String
getElementName()
Returns the root element name.java.lang.String
getLanguage()
Returns the xml:lang of this XML element, or null if one has not been set.java.lang.String
getMessage()
Returns the message content.java.lang.String
getNamespace()
Returns the root element XML namespace.int
hashCode()
XmlStringBuilder
toXML(XmlEnvironment enclosingXmlEnvironment)
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jivesoftware.smack.packet.FullyQualifiedElement
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
-
QNAME
public static final javax.xml.namespace.QName QNAME
-
-
Method Detail
-
getLanguage
public java.lang.String getLanguage()
Description copied from interface:XmlLangElement
Returns the xml:lang of this XML element, or null if one has not been set.- Specified by:
getLanguage
in interfaceFullyQualifiedElement
- Specified by:
getLanguage
in interfaceXmlLangElement
- Returns:
- the xml:lang of this XML element, or null.
-
getMessage
public java.lang.String getMessage()
Returns the message content.- Returns:
- the content of the message.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
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.
-
toXML
public XmlStringBuilder toXML(XmlEnvironment enclosingXmlEnvironment)
-
-