Package io.ably.lib.types
Class MessageOperationSerializer
java.lang.Object
io.ably.lib.types.MessageOperationSerializer
MessageOperationSerializer: internal
Utility class to serialize message update/delete requests in different formats.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpCore.RequestBodyasJsonRequest(Message message, MessageOperation operation, ChannelOptions channelOptions) Creates a JSON request body for a message update/delete operation.static HttpCore.RequestBodyasMsgPackRequest(Message message, MessageOperation operation, ChannelOptions channelOptions) Creates a MessagePack request body for a message update/delete operation.
-
Constructor Details
-
MessageOperationSerializer
public MessageOperationSerializer()
-
-
Method Details
-
asJsonRequest
public static HttpCore.RequestBody asJsonRequest(Message message, MessageOperation operation, ChannelOptions channelOptions) throws AblyException Creates a JSON request body for a message update/delete operation.- Parameters:
-
message- The message containing the update/delete data -
operation- The MessageOperation metadata -
channelOptions- Channel options for encoding - Returns:
- HttpCore.RequestBody for the request
- Throws:
-
AblyException- If encoding fails
-
asMsgPackRequest
public static HttpCore.RequestBody asMsgPackRequest(Message message, MessageOperation operation, ChannelOptions channelOptions) throws AblyException Creates a MessagePack request body for a message update/delete operation.- Parameters:
-
message- The message containing the update/delete data -
operation- The MessageOperation metadata -
channelOptions- Channel options for encoding - Returns:
- HttpCore.RequestBody for the request
- Throws:
-
AblyException- If encoding fails
-