Class GraphBinaryMessageSerializerV1
- java.lang.Object
- 
- org.apache.tinkerpop.gremlin.util.ser.AbstractMessageSerializer<GraphBinaryMapper>
- 
- org.apache.tinkerpop.gremlin.util.ser.GraphBinaryMessageSerializerV1
 
 
- 
- All Implemented Interfaces:
- MessageSerializer<GraphBinaryMapper>,- MessageTextSerializer<GraphBinaryMapper>
 
 public class GraphBinaryMessageSerializerV1 extends AbstractMessageSerializer<GraphBinaryMapper> implements MessageTextSerializer<GraphBinaryMapper> 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringTOKEN_BUILDERstatic StringTOKEN_CUSTOMstatic StringTOKEN_SERIALIZE_RESULT_TO_STRING- 
Fields inherited from class org.apache.tinkerpop.gremlin.util.ser.AbstractMessageSerializerTOKEN_IO_REGISTRIES
 - 
Fields inherited from interface org.apache.tinkerpop.gremlin.util.MessageSerializerlogger
 
- 
 - 
Constructor SummaryConstructors Constructor Description GraphBinaryMessageSerializerV1()Creates a new instance of the message serializer using the default type serializers.GraphBinaryMessageSerializerV1(TypeSerializerRegistry registry)GraphBinaryMessageSerializerV1(TypeSerializerRegistry.Builder builder)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(Map<String,Object> config, Map<String,Graph> graphs)Configure the serializer with mapper settings as required.RequestMessagedeserializeRequest(io.netty.buffer.ByteBuf msg)Deserialize a NettyByteBufinto aRequestMessage.RequestMessagedeserializeRequest(String msg)ResponseMessagedeserializeResponse(io.netty.buffer.ByteBuf msg)Deserialize a NettyByteBufinto aResponseMessage.ResponseMessagedeserializeResponse(String msg)GraphBinaryMappergetMapper()Gets the "mapper" that performs the underlying serialization work.String[]mimeTypesSupported()The list of mime types that the serializer supports.io.netty.buffer.ByteBufserializeRequestAsBinary(RequestMessage requestMessage, io.netty.buffer.ByteBufAllocator allocator)Serialize aResponseMessageto a NettyByteBuf.StringserializeRequestAsString(RequestMessage requestMessage, io.netty.buffer.ByteBufAllocator allocator)io.netty.buffer.ByteBufserializeResponseAsBinary(ResponseMessage responseMessage, io.netty.buffer.ByteBufAllocator allocator)Serialize aResponseMessageto a NettyByteBuf.StringserializeResponseAsString(ResponseMessage responseMessage, io.netty.buffer.ByteBufAllocator allocator)- 
Methods inherited from class org.apache.tinkerpop.gremlin.util.ser.AbstractMessageSerializeraddIoRegistries, getListStringFromConfig, tryInstanceMethod
 
- 
 
- 
- 
- 
Field Detail- 
TOKEN_CUSTOMpublic static final String TOKEN_CUSTOM - See Also:
- Constant Field Values
 
 - 
TOKEN_BUILDERpublic static final String TOKEN_BUILDER - See Also:
- Constant Field Values
 
 - 
TOKEN_SERIALIZE_RESULT_TO_STRINGpublic static final String TOKEN_SERIALIZE_RESULT_TO_STRING - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
GraphBinaryMessageSerializerV1public GraphBinaryMessageSerializerV1() Creates a new instance of the message serializer using the default type serializers.
 - 
GraphBinaryMessageSerializerV1public GraphBinaryMessageSerializerV1(TypeSerializerRegistry registry) 
 - 
GraphBinaryMessageSerializerV1public GraphBinaryMessageSerializerV1(TypeSerializerRegistry.Builder builder) 
 
- 
 - 
Method Detail- 
getMapperpublic GraphBinaryMapper getMapper() Description copied from interface:MessageSerializerGets the "mapper" that performs the underlying serialization work.- Specified by:
- getMapperin interface- MessageSerializer<GraphBinaryMapper>
 
 - 
configurepublic void configure(Map<String,Object> config, Map<String,Graph> graphs) Description copied from interface:MessageSerializerConfigure the serializer with mapper settings as required. The default implementation does not perform any function and it is up to the interface implementation to determine how the configuration will be executed and what its requirements are. An implementation may choose to use the list of available graphs to help initialize a serializer. The implementation should account for the possibility of a null value being provided for that parameter.- Specified by:
- configurein interface- MessageSerializer<GraphBinaryMapper>
 
 - 
serializeResponseAsBinarypublic io.netty.buffer.ByteBuf serializeResponseAsBinary(ResponseMessage responseMessage, io.netty.buffer.ByteBufAllocator allocator) throws SerializationException Description copied from interface:MessageSerializerSerialize aResponseMessageto a NettyByteBuf.- Specified by:
- serializeResponseAsBinaryin interface- MessageSerializer<GraphBinaryMapper>
- Parameters:
- responseMessage- The response message to serialize to bytes.
- allocator- The Netty allocator for the- ByteBufto return back.
- Throws:
- SerializationException
 
 - 
serializeRequestAsBinarypublic io.netty.buffer.ByteBuf serializeRequestAsBinary(RequestMessage requestMessage, io.netty.buffer.ByteBufAllocator allocator) throws SerializationException Description copied from interface:MessageSerializerSerialize aResponseMessageto a NettyByteBuf.- Specified by:
- serializeRequestAsBinaryin interface- MessageSerializer<GraphBinaryMapper>
- Parameters:
- requestMessage- The request message to serialize to bytes.
- allocator- The Netty allocator for the- ByteBufto return back.
- Throws:
- SerializationException
 
 - 
deserializeRequestpublic RequestMessage deserializeRequest(io.netty.buffer.ByteBuf msg) throws SerializationException Description copied from interface:MessageSerializerDeserialize a NettyByteBufinto aRequestMessage.- Specified by:
- deserializeRequestin interface- MessageSerializer<GraphBinaryMapper>
- Throws:
- SerializationException
 
 - 
deserializeResponsepublic ResponseMessage deserializeResponse(io.netty.buffer.ByteBuf msg) throws SerializationException Description copied from interface:MessageSerializerDeserialize a NettyByteBufinto aResponseMessage.- Specified by:
- deserializeResponsein interface- MessageSerializer<GraphBinaryMapper>
- Throws:
- SerializationException
 
 - 
mimeTypesSupportedpublic String[] mimeTypesSupported() Description copied from interface:MessageSerializerThe list of mime types that the serializer supports. They should be ordered in preferred ordered where the greatest fidelity match is first.- Specified by:
- mimeTypesSupportedin interface- MessageSerializer<GraphBinaryMapper>
 
 - 
serializeResponseAsStringpublic String serializeResponseAsString(ResponseMessage responseMessage, io.netty.buffer.ByteBufAllocator allocator) throws SerializationException - Specified by:
- serializeResponseAsStringin interface- MessageTextSerializer<GraphBinaryMapper>
- Throws:
- SerializationException
 
 - 
serializeRequestAsStringpublic String serializeRequestAsString(RequestMessage requestMessage, io.netty.buffer.ByteBufAllocator allocator) throws SerializationException - Specified by:
- serializeRequestAsStringin interface- MessageTextSerializer<GraphBinaryMapper>
- Throws:
- SerializationException
 
 - 
deserializeRequestpublic RequestMessage deserializeRequest(String msg) throws SerializationException - Specified by:
- deserializeRequestin interface- MessageTextSerializer<GraphBinaryMapper>
- Throws:
- SerializationException
 
 - 
deserializeResponsepublic ResponseMessage deserializeResponse(String msg) throws SerializationException - Specified by:
- deserializeResponsein interface- MessageTextSerializer<GraphBinaryMapper>
- Throws:
- SerializationException
 
 
- 
 
-