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_REGISTRIES
logger
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, tryInstanceMethod
public 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()
MessageSerializer
public void configure(Map<String,Object> config, Map<String,Graph> graphs)
MessageSerializer
public io.netty.buffer.ByteBuf serializeResponseAsBinary(ResponseMessage responseMessage, io.netty.buffer.ByteBufAllocator allocator) throws SerializationException
MessageSerializer
ResponseMessage
to a Netty ByteBuf
.responseMessage
- The response message to serialize to bytes.allocator
- The Netty allocator for the ByteBuf
to return back.SerializationException
public io.netty.buffer.ByteBuf serializeRequestAsBinary(RequestMessage requestMessage, io.netty.buffer.ByteBufAllocator allocator) throws SerializationException
MessageSerializer
ResponseMessage
to a Netty ByteBuf
.requestMessage
- The request message to serialize to bytes.allocator
- The Netty allocator for the ByteBuf
to return back.SerializationException
public RequestMessage deserializeRequest(io.netty.buffer.ByteBuf msg) throws SerializationException
MessageSerializer
ByteBuf
into a RequestMessage
.SerializationException
public ResponseMessage deserializeResponse(io.netty.buffer.ByteBuf msg) throws SerializationException
MessageSerializer
ByteBuf
into a ResponseMessage
.SerializationException
public String[] mimeTypesSupported()
MessageSerializer
Copyright © 2013–2022 Apache Software Foundation. All rights reserved.