public class PresenceMessage extends BaseMessage implements java.lang.Cloneable
| Modifier and Type | Class and Description |
|---|---|
static class |
PresenceMessage.Action
Presence Action: the event signified by a PresenceMessage
|
static class |
PresenceMessage.ActionSerializer |
static class |
PresenceMessage.Serializer |
| Modifier and Type | Field and Description |
|---|---|
PresenceMessage.Action |
action |
clientId, connectionId, data, encoding, id, timestamp| Constructor and Description |
|---|
PresenceMessage()
Default constructor
|
PresenceMessage(PresenceMessage.Action action,
java.lang.String clientId)
Construct a PresenceMessage from an Action and clientId
|
PresenceMessage(PresenceMessage.Action action,
java.lang.String clientId,
java.lang.Object data)
Generic constructor
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
static PresenceMessage |
fromEncoded(com.google.gson.JsonObject messageJsonObject,
ChannelOptions channelOptions)
Refer Spec TP4
An alternative constructor that take an PresenceMessage-JSON object and a channelOptions (optional), and return a PresenceMessage |
static PresenceMessage |
fromEncoded(java.lang.String messageJson,
ChannelOptions channelOptions)
Refer Spec TP4
An alternative constructor that takes a Stringified PresenceMessage-JSON and a channelOptions (optional), and return a PresenceMessage |
static PresenceMessage[] |
fromEncodedArray(com.google.gson.JsonArray presenceMsgArray,
ChannelOptions channelOptions)
Refer Spec TP4
An alternative constructor that takes a PresenceMessage JsonArray and a channelOptions (optional), and return array of PresenceMessages. |
static PresenceMessage[] |
fromEncodedArray(java.lang.String presenceMsgArray,
ChannelOptions channelOptions)
Refer Spec TP4
An alternative constructor that takes a Stringified PresenceMessages Array and a channelOptions (optional), and return array of PresenceMessages. |
java.lang.String |
memberKey()
Get the member key for the PresenceMessage.
|
java.lang.String |
toString()
Generate a String summary of this PresenceMessage
|
countFields, decode, decode, encode, getDetails, read, readLong, readString, toJsonObjectpublic PresenceMessage.Action action
public PresenceMessage()
public PresenceMessage(PresenceMessage.Action action, java.lang.String clientId)
action - clientId - public PresenceMessage(PresenceMessage.Action action, java.lang.String clientId, java.lang.Object data)
action - clientId - data - public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object clone()
clone in class java.lang.Objectpublic static PresenceMessage fromEncoded(com.google.gson.JsonObject messageJsonObject, ChannelOptions channelOptions) throws MessageDecodeException
messageJsonObject - channelOptions - MessageDecodeExceptionpublic static PresenceMessage fromEncoded(java.lang.String messageJson, ChannelOptions channelOptions) throws MessageDecodeException
messageJson - channelOptions - MessageDecodeExceptionpublic static PresenceMessage[] fromEncodedArray(com.google.gson.JsonArray presenceMsgArray, ChannelOptions channelOptions) throws MessageDecodeException
presenceMsgArray - channelOptions - MessageDecodeExceptionpublic static PresenceMessage[] fromEncodedArray(java.lang.String presenceMsgArray, ChannelOptions channelOptions) throws MessageDecodeException
presenceMsgArray - channelOptions - MessageDecodeExceptionpublic java.lang.String memberKey()