public class GraphBinaryMessageSerializerV1 extends AbstractMessageSerializer<GraphBinaryMapper>
| Modifier and Type | Field and Description |
|---|---|
static String |
TOKEN_BUILDER |
static String |
TOKEN_CUSTOM |
static String |
TOKEN_SERIALIZE_RESULT_TO_STRING |
TOKEN_IO_REGISTRIESlogger| Constructor and Description |
|---|
GraphBinaryMessageSerializerV1()
Creates a new instance of the message serializer using the default type serializers.
|
GraphBinaryMessageSerializerV1(TypeSerializerRegistry.Builder builder) |
GraphBinaryMessageSerializerV1(TypeSerializerRegistry registry) |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(Map<String,Object> config,
Map<String,Graph> graphs)
Configure the serializer with mapper settings as required.
|
RequestMessage |
deserializeRequest(io.netty.buffer.ByteBuf msg)
Deserialize a Netty
ByteBuf into a RequestMessage. |
ResponseMessage |
deserializeResponse(io.netty.buffer.ByteBuf msg)
Deserialize a Netty
ByteBuf into a ResponseMessage. |
GraphBinaryMapper |
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. |
io.netty.buffer.ByteBuf |
serializeResponseAsBinary(ResponseMessage responseMessage,
io.netty.buffer.ByteBufAllocator allocator)
Serialize a
ResponseMessage to a Netty ByteBuf. |
addIoRegistries, getListStringFromConfig, tryInstanceMethodpublic static final String TOKEN_CUSTOM
public static final String TOKEN_BUILDER
public static final String TOKEN_SERIALIZE_RESULT_TO_STRING
public GraphBinaryMessageSerializerV1()
public GraphBinaryMessageSerializerV1(TypeSerializerRegistry registry)
public GraphBinaryMessageSerializerV1(TypeSerializerRegistry.Builder builder)
public GraphBinaryMapper getMapper()
MessageSerializerpublic void configure(Map<String,Object> config, Map<String,Graph> graphs)
MessageSerializerpublic io.netty.buffer.ByteBuf serializeResponseAsBinary(ResponseMessage responseMessage, io.netty.buffer.ByteBufAllocator allocator) throws SerializationException
MessageSerializerResponseMessage to a Netty ByteBuf.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.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.SerializationExceptionpublic ResponseMessage deserializeResponse(io.netty.buffer.ByteBuf msg) throws SerializationException
MessageSerializerByteBuf into a ResponseMessage.SerializationExceptionpublic String[] mimeTypesSupported()
MessageSerializerCopyright © 2013–2022 Apache Software Foundation. All rights reserved.