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 Object implements ExtensionElement
The default payload representation forPayloadItem.getPayload()
. It simply stores the XML payload as a string.
-
-
Constructor Summary
Constructors Constructor Description SimplePayload(String xmlPayload)
Construct aSimplePayload
object with the specified element name, namespace and content.SimplePayload(String elementName, String namespace, CharSequence xmlPayload)
Deprecated.useSimplePayload(String)
insteas.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getElementName()
Returns the root element name.String
getNamespace()
Returns the root element XML namespace.String
toString()
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(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(String elementName, String namespace, 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 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 String toXML(XmlEnvironment enclosingNamespace)
-
-