Package io.ably.lib.types
Class ProtocolMessage
- java.lang.Object
-
- io.ably.lib.types.ProtocolMessage
-
public class ProtocolMessage extends java.lang.ObjectA message sent and received over the Realtime protocol. A ProtocolMessage always relates to a single channel only, but can contain multiple individual Messages or PresenceMessages. ProtocolMessages are serially numbered on a connection. See the Ably client library developer documentation for further details on the members of a ProtocolMessage.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProtocolMessage.Actionstatic classProtocolMessage.ActionSerializerstatic classProtocolMessage.AuthDetailsContains the token string used to authenticate a client with Ably.static classProtocolMessage.Flag
-
Field Summary
Fields Modifier and Type Field Description ProtocolMessage.ActionactionProtocolMessage.AuthDetailsauthjava.lang.Stringchanneljava.lang.StringchannelSerialConnectionDetailsconnectionDetailsjava.lang.StringconnectionIdjava.lang.LongconnectionSerialintcountErrorInfoerrorintflagsjava.lang.StringidMessage[]messagesjava.lang.LongmsgSerialjava.util.Map<java.lang.String,java.lang.String>paramsPresenceMessage[]presencelongtimestamp
-
Constructor Summary
Constructors Constructor Description ProtocolMessage()ProtocolMessage(ProtocolMessage.Action action)ProtocolMessage(ProtocolMessage.Action action, java.lang.String channel)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanackRequired(ProtocolMessage msg)booleanhasFlag(ProtocolMessage.Flag flag)voidsetFlag(ProtocolMessage.Flag flag)voidsetFlags(int flags)
-
-
-
Field Detail
-
action
public ProtocolMessage.Action action
-
flags
public int flags
-
count
public int count
-
error
public ErrorInfo error
-
id
public java.lang.String id
-
channel
public java.lang.String channel
-
channelSerial
public java.lang.String channelSerial
-
connectionId
public java.lang.String connectionId
-
connectionSerial
public java.lang.Long connectionSerial
-
msgSerial
public java.lang.Long msgSerial
-
timestamp
public long timestamp
-
messages
public Message[] messages
-
presence
public PresenceMessage[] presence
-
connectionDetails
public ConnectionDetails connectionDetails
-
auth
public ProtocolMessage.AuthDetails auth
-
params
public java.util.Map<java.lang.String,java.lang.String> params
-
-
Constructor Detail
-
ProtocolMessage
public ProtocolMessage()
-
ProtocolMessage
public ProtocolMessage(ProtocolMessage.Action action)
-
ProtocolMessage
public ProtocolMessage(ProtocolMessage.Action action, java.lang.String channel)
-
-
Method Detail
-
ackRequired
public static boolean ackRequired(ProtocolMessage msg)
-
hasFlag
public boolean hasFlag(ProtocolMessage.Flag flag)
-
setFlag
public void setFlag(ProtocolMessage.Flag flag)
-
setFlags
public void setFlags(int flags)
-
-