Package org.jivesoftware.smackx.pubsub
Class SimplePayload
- java.lang.Object
-
- org.jivesoftware.smackx.pubsub.SimplePayload
-
- All Implemented Interfaces:
Element
,ExtensionElement
,FullyQualifiedElement
,NamedElement
,XmlLangElement
public class SimplePayload extends java.lang.Object implements ExtensionElement
The default payload representation forPayloadItem.getPayload()
. It simply stores the XML payload as a string.
-
-
Constructor Summary
Constructors Constructor Description SimplePayload(java.lang.String xmlPayload)
Construct aSimplePayload
object with the specified element name, namespace and content.SimplePayload(java.lang.String elementName, java.lang.String namespace, java.lang.CharSequence xmlPayload)
Deprecated.useSimplePayload(String)
insteas.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getElementName()
Returns the root element name.java.lang.String
getNamespace()
Returns the root element XML namespace.java.lang.String
toString()
java.lang.String
toXML(XmlEnvironment enclosingNamespace)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jivesoftware.smack.packet.FullyQualifiedElement
getLanguage, getQName
-
-
-
-
Constructor Detail
-
SimplePayload
public SimplePayload(java.lang.String xmlPayload)
Construct aSimplePayload
object with the specified element name, namespace and content. The content must be well formed XML.- Parameters:
xmlPayload
- The payload data
-
SimplePayload
@Deprecated public SimplePayload(java.lang.String elementName, java.lang.String namespace, java.lang.CharSequence xmlPayload)
Deprecated.useSimplePayload(String)
insteas.Construct aSimplePayload
object with the specified element name, namespace and content. The content must be well formed XML.- Parameters:
elementName
- The root element name (of the payload)namespace
- The namespace of the payload, null if there is nonexmlPayload
- The payload data
-
-
Method Detail
-
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 java.lang.String toXML(XmlEnvironment enclosingNamespace)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-