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 String |
ELEMENT |
static String |
NAMESPACE |
| Constructor and Description |
|---|
GcmPacketExtension(String json) |
| Modifier and Type | Method and Description |
|---|---|
static GcmPacketExtension |
from(Stanza packet)
Retrieve the GCM stanza(/packet) extension from the packet.
|
String |
getElementName()
Returns the root element name.
|
String |
getNamespace()
Returns the root element XML namespace.
|
getJson, toXMLpublic static final String ELEMENT
public static final String NAMESPACE
public GcmPacketExtension(String json)
public String getNamespace()
ExtensionElementpublic String getElementName()
NamedElementpublic static GcmPacketExtension from(Stanza packet)
packet -