Class AbstractGraphSONMessageSerializerV1d0
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.driver.ser.AbstractMessageSerializer<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>
-
- org.apache.tinkerpop.gremlin.driver.ser.AbstractGraphSONMessageSerializerV1d0
-
- All Implemented Interfaces:
MessageSerializer<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>
- Direct Known Subclasses:
GraphSONMessageSerializerGremlinV1d0
,GraphSONMessageSerializerV1d0
public abstract class AbstractGraphSONMessageSerializerV1d0 extends AbstractMessageSerializer<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>
- Author:
- Stephen Mallette (http://stephen.genoprime.com)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractGraphSONMessageSerializerV1d0.GremlinServerModule
static class
AbstractGraphSONMessageSerializerV1d0.ResponseMessageSerializer
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper
mapper
protected org.apache.tinkerpop.shaded.jackson.core.type.TypeReference<Map<String,Object>>
mapTypeReference
-
Fields inherited from class org.apache.tinkerpop.gremlin.driver.ser.AbstractMessageSerializer
TOKEN_IO_REGISTRIES
-
-
Constructor Summary
Constructors Constructor Description AbstractGraphSONMessageSerializerV1d0()
AbstractGraphSONMessageSerializerV1d0(GraphSONMapper mapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 NettyByteBuf
into aRequestMessage
.ResponseMessage
deserializeResponse(io.netty.buffer.ByteBuf msg)
Deserialize a NettyByteBuf
into aResponseMessage
.org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper
getMapper()
Gets the "mapper" that performs the underlying serialization work.io.netty.buffer.ByteBuf
serializeRequestAsBinary(RequestMessage requestMessage, io.netty.buffer.ByteBufAllocator allocator)
Serialize aResponseMessage
to a NettyByteBuf
.io.netty.buffer.ByteBuf
serializeResponseAsBinary(ResponseMessage responseMessage, io.netty.buffer.ByteBufAllocator allocator)
Serialize aResponseMessage
to a NettyByteBuf
.-
Methods inherited from class org.apache.tinkerpop.gremlin.driver.ser.AbstractMessageSerializer
addIoRegistries, getListStringFromConfig, tryInstanceMethod
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.tinkerpop.gremlin.driver.MessageSerializer
mimeTypesSupported
-
-
-
-
Constructor Detail
-
AbstractGraphSONMessageSerializerV1d0
public AbstractGraphSONMessageSerializerV1d0()
-
AbstractGraphSONMessageSerializerV1d0
public AbstractGraphSONMessageSerializerV1d0(GraphSONMapper mapper)
-
-
Method Detail
-
configure
public void configure(Map<String,Object> config, Map<String,Graph> graphs)
Description copied from interface:MessageSerializer
Configure 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.
-
serializeResponseAsBinary
public io.netty.buffer.ByteBuf serializeResponseAsBinary(ResponseMessage responseMessage, io.netty.buffer.ByteBufAllocator allocator) throws SerializationException
Description copied from interface:MessageSerializer
Serialize aResponseMessage
to a NettyByteBuf
.- Parameters:
responseMessage
- The response message to serialize to bytes.allocator
- The Netty allocator for theByteBuf
to return back.- Throws:
SerializationException
-
serializeRequestAsBinary
public io.netty.buffer.ByteBuf serializeRequestAsBinary(RequestMessage requestMessage, io.netty.buffer.ByteBufAllocator allocator) throws SerializationException
Description copied from interface:MessageSerializer
Serialize aResponseMessage
to a NettyByteBuf
.- Parameters:
requestMessage
- The request message to serialize to bytes.allocator
- The Netty allocator for theByteBuf
to return back.- Throws:
SerializationException
-
deserializeRequest
public RequestMessage deserializeRequest(io.netty.buffer.ByteBuf msg) throws SerializationException
Description copied from interface:MessageSerializer
Deserialize a NettyByteBuf
into aRequestMessage
.- Throws:
SerializationException
-
deserializeResponse
public ResponseMessage deserializeResponse(io.netty.buffer.ByteBuf msg) throws SerializationException
Description copied from interface:MessageSerializer
Deserialize a NettyByteBuf
into aResponseMessage
.- Throws:
SerializationException
-
getMapper
public org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper getMapper()
Description copied from interface:MessageSerializer
Gets the "mapper" that performs the underlying serialization work.
-
-