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 extension from the packet.
|
String |
getElementName()
Returns the root element name.
|
String |
getNamespace()
Returns the root element XML namespace.
|
getJson, toXML
public static final String ELEMENT
public static final String NAMESPACE
public GcmPacketExtension(String json)
public String getNamespace()
ExtensionElement
public String getElementName()
NamedElement
public static GcmPacketExtension from(Stanza packet)
packet
-