Package io.ably.lib.types
Class PresenceSerializer
java.lang.Object
io.ably.lib.types.PresenceSerializer
PresenceSerializer: internal
Utility class to convert response bodies in different formats to PresenceMessage
and PresenceMessage arrays.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpCore.RequestBody
asJsonRequest
(PresenceMessage message) JSON encodestatic HttpCore.RequestBody
asJsonRequest
(PresenceMessage[] messages) static HttpCore.BodyHandler<PresenceMessage>
BodyHandlerstatic PresenceMessage[]
readMsgpack
(byte[] packed) static PresenceMessage[]
readMsgpackArray
(org.msgpack.core.MessageUnpacker unpacker) Msgpack decodestatic byte[]
writeMsgpackArray
(PresenceMessage[] messages) Msgpack encodestatic void
writeMsgpackArray
(PresenceMessage[] messages, org.msgpack.core.MessagePacker packer)
-
Constructor Details
-
PresenceSerializer
public PresenceSerializer()
-
-
Method Details
-
readMsgpackArray
public static PresenceMessage[] readMsgpackArray(org.msgpack.core.MessageUnpacker unpacker) throws IOException Msgpack decode- Throws:
IOException
-
readMsgpack
- Throws:
AblyException
-
writeMsgpackArray
Msgpack encode -
writeMsgpackArray
public static void writeMsgpackArray(PresenceMessage[] messages, org.msgpack.core.MessagePacker packer) -
asJsonRequest
JSON encode- Throws:
AblyException
-
asJsonRequest
-
getPresenceResponseHandler
BodyHandler
-