public class GraphBinaryMessageSerializerV1 extends AbstractMessageSerializer
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(ByteBuf msg)
Deserialize a Netty
ByteBuf into a RequestMessage . |
ResponseMessage |
deserializeResponse(ByteBuf msg)
Deserialize a Netty
ByteBuf into a ResponseMessage . |
String[] |
mimeTypesSupported()
The list of mime types that the serializer supports.
|
ByteBuf |
serializeRequestAsBinary(RequestMessage requestMessage,
ByteBufAllocator allocator)
Serialize a
ResponseMessage to a Netty ByteBuf . |
ByteBuf |
serializeResponseAsBinary(ResponseMessage responseMessage,
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 void configure(Map<String,Object> config, Map<String,Graph> graphs)
MessageSerializer
public ByteBuf serializeResponseAsBinary(ResponseMessage responseMessage, 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 ByteBuf serializeRequestAsBinary(RequestMessage requestMessage, 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(ByteBuf msg) throws SerializationException
MessageSerializer
ByteBuf
into a RequestMessage
.SerializationException
public ResponseMessage deserializeResponse(ByteBuf msg) throws SerializationException
MessageSerializer
ByteBuf
into a ResponseMessage
.SerializationException
public String[] mimeTypesSupported()
MessageSerializer
Copyright © 2013–2020 Apache Software Foundation. All rights reserved.