public class TextPlainMessageSerializer extends Object implements MessageTextSerializer<Function<Object,String>>
logger| Constructor and Description |
|---|
TextPlainMessageSerializer() |
| Modifier and Type | Method and Description |
|---|---|
RequestMessage |
deserializeRequest(io.netty.buffer.ByteBuf msg)
Deserialize a Netty
ByteBuf into a RequestMessage. |
RequestMessage |
deserializeRequest(String msg) |
ResponseMessage |
deserializeResponse(io.netty.buffer.ByteBuf msg)
Deserialize a Netty
ByteBuf into a ResponseMessage. |
ResponseMessage |
deserializeResponse(String msg) |
Function<Object,String> |
getMapper()
Gets the "mapper" that performs the underlying serialization work.
|
String[] |
mimeTypesSupported()
The list of mime types that the serializer supports.
|
io.netty.buffer.ByteBuf |
serializeRequestAsBinary(RequestMessage requestMessage,
io.netty.buffer.ByteBufAllocator allocator)
Serialize a
ResponseMessage to a Netty ByteBuf. |
String |
serializeRequestAsString(RequestMessage requestMessage,
io.netty.buffer.ByteBufAllocator allocator) |
io.netty.buffer.ByteBuf |
serializeResponseAsBinary(ResponseMessage responseMessage,
io.netty.buffer.ByteBufAllocator allocator)
Serialize a
ResponseMessage to a Netty ByteBuf. |
String |
serializeResponseAsString(ResponseMessage responseMessage,
io.netty.buffer.ByteBufAllocator allocator) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconfigurepublic Function<Object,String> getMapper()
MessageSerializergetMapper in interface MessageSerializer<Function<Object,String>>public io.netty.buffer.ByteBuf serializeResponseAsBinary(ResponseMessage responseMessage, io.netty.buffer.ByteBufAllocator allocator) throws SerializationException
MessageSerializerResponseMessage to a Netty ByteBuf.serializeResponseAsBinary in interface MessageSerializer<Function<Object,String>>responseMessage - The response message to serialize to bytes.allocator - The Netty allocator for the ByteBuf to return back.SerializationExceptionpublic io.netty.buffer.ByteBuf serializeRequestAsBinary(RequestMessage requestMessage, io.netty.buffer.ByteBufAllocator allocator) throws SerializationException
MessageSerializerResponseMessage to a Netty ByteBuf.serializeRequestAsBinary in interface MessageSerializer<Function<Object,String>>requestMessage - The request message to serialize to bytes.allocator - The Netty allocator for the ByteBuf to return back.SerializationExceptionpublic RequestMessage deserializeRequest(io.netty.buffer.ByteBuf msg) throws SerializationException
MessageSerializerByteBuf into a RequestMessage.deserializeRequest in interface MessageSerializer<Function<Object,String>>SerializationExceptionpublic ResponseMessage deserializeResponse(io.netty.buffer.ByteBuf msg) throws SerializationException
MessageSerializerByteBuf into a ResponseMessage.deserializeResponse in interface MessageSerializer<Function<Object,String>>SerializationExceptionpublic String[] mimeTypesSupported()
MessageSerializermimeTypesSupported in interface MessageSerializer<Function<Object,String>>public String serializeResponseAsString(ResponseMessage responseMessage, io.netty.buffer.ByteBufAllocator allocator) throws SerializationException
serializeResponseAsString in interface MessageTextSerializer<Function<Object,String>>SerializationExceptionpublic String serializeRequestAsString(RequestMessage requestMessage, io.netty.buffer.ByteBufAllocator allocator) throws SerializationException
serializeRequestAsString in interface MessageTextSerializer<Function<Object,String>>SerializationExceptionpublic RequestMessage deserializeRequest(String msg) throws SerializationException
deserializeRequest in interface MessageTextSerializer<Function<Object,String>>SerializationExceptionpublic ResponseMessage deserializeResponse(String msg) throws SerializationException
deserializeResponse in interface MessageTextSerializer<Function<Object,String>>SerializationExceptionCopyright © 2013–2023 Apache Software Foundation. All rights reserved.