public class GcmPacketExtension extends AbstractJsonPacketExtension
This extension is semantically the same as JsonPacketExtension, but with
a different element and namespace. It is used to exchange message stanzas with a JSON payload as extension element.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ELEMENT |
static java.lang.String |
NAMESPACE |
| Constructor and Description |
|---|
GcmPacketExtension(java.lang.String json) |
| Modifier and Type | Method and Description |
|---|---|
static GcmPacketExtension |
from(Stanza packet)
Retrieve the GCM stanza(/packet) extension from the packet.
|
java.lang.String |
getElementName()
Returns the root element name.
|
java.lang.String |
getNamespace()
Returns the root element XML namespace.
|
getJson, toXMLpublic static final java.lang.String ELEMENT
public static final java.lang.String NAMESPACE
public GcmPacketExtension(java.lang.String json)
public java.lang.String getNamespace()
ExtensionElementpublic java.lang.String getElementName()
NamedElementpublic static GcmPacketExtension from(Stanza packet)
packet -