Class AbstractGraphSONMessageSerializerV4
java.lang.Object
org.apache.tinkerpop.gremlin.util.ser.AbstractMessageSerializer<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>
org.apache.tinkerpop.gremlin.util.ser.AbstractGraphSONMessageSerializerV4
- All Implemented Interfaces:
MessageSerializer<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>
- Direct Known Subclasses:
GraphSONMessageSerializerV4,GraphSONUntypedMessageSerializerV4
public abstract class AbstractGraphSONMessageSerializerV4
extends AbstractMessageSerializer<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classNested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.util.MessageSerializer
MessageSerializer.MessageParts -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.tinkerpop.shaded.jackson.databind.ObjectMapperFields inherited from class org.apache.tinkerpop.gremlin.util.ser.AbstractMessageSerializer
TOKEN_IO_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigure the serializer with mapper settings as required.deserializeBinaryRequest(io.netty.buffer.ByteBuf msg) Deserialize a NettyByteBufinto aRequestMessage.deserializeBinaryResponse(io.netty.buffer.ByteBuf msg) Deserialize a NettyByteBufinto aRequestMessage.org.apache.tinkerpop.shaded.jackson.databind.ObjectMapperGets the "mapper" that performs the underlying serialization work.protected booleanisTyped()readChunk(io.netty.buffer.ByteBuf byteBuf, boolean isFirstChunk) io.netty.buffer.ByteBufserializeRequestAsBinary(RequestMessage requestMessage, io.netty.buffer.ByteBufAllocator allocator) Serialize aResponseMessageto a NettyByteBuf.io.netty.buffer.ByteBufserializeResponseAsBinary(ResponseMessage responseMessage, io.netty.buffer.ByteBufAllocator allocator) Serialize aResponseMessageto a NettyByteBuf.io.netty.buffer.ByteBufwriteChunk(Object aggregate, io.netty.buffer.ByteBufAllocator allocator) io.netty.buffer.ByteBufwriteErrorFooter(ResponseMessage responseMessage, io.netty.buffer.ByteBufAllocator allocator) io.netty.buffer.ByteBufwriteFooter(ResponseMessage responseMessage, io.netty.buffer.ByteBufAllocator allocator) io.netty.buffer.ByteBufwriteHeader(ResponseMessage responseMessage, io.netty.buffer.ByteBufAllocator allocator) Methods inherited from class org.apache.tinkerpop.gremlin.util.ser.AbstractMessageSerializer
addIoRegistries, getListStringFromConfig, tryInstanceMethodMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.tinkerpop.gremlin.util.MessageSerializer
mimeTypesSupported
-
Field Details
-
mapper
protected org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper mapper
-
-
Constructor Details
-
AbstractGraphSONMessageSerializerV4
public AbstractGraphSONMessageSerializerV4() -
AbstractGraphSONMessageSerializerV4
-
-
Method Details
-
getMapper
public org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper getMapper()Description copied from interface:MessageSerializerGets the "mapper" that performs the underlying serialization work. -
configure
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. -
serializeResponseAsBinary
public io.netty.buffer.ByteBuf serializeResponseAsBinary(ResponseMessage responseMessage, io.netty.buffer.ByteBufAllocator allocator) throws SerializationException Description copied from interface:MessageSerializerSerialize aResponseMessageto a NettyByteBuf.- Parameters:
responseMessage- The response message to serialize to bytes.allocator- The Netty allocator for theByteBufto return back.- Throws:
SerializationException
-
deserializeBinaryResponse
public ResponseMessage deserializeBinaryResponse(io.netty.buffer.ByteBuf msg) throws SerializationException Description copied from interface:MessageSerializerDeserialize a NettyByteBufinto aRequestMessage.- Throws:
SerializationException
-
isTyped
protected boolean isTyped() -
writeHeader
public io.netty.buffer.ByteBuf writeHeader(ResponseMessage responseMessage, io.netty.buffer.ByteBufAllocator allocator) throws SerializationException - Throws:
SerializationException
-
writeChunk
public io.netty.buffer.ByteBuf writeChunk(Object aggregate, io.netty.buffer.ByteBufAllocator allocator) throws SerializationException - Throws:
SerializationException
-
readChunk
-
serializeRequestAsBinary
public io.netty.buffer.ByteBuf serializeRequestAsBinary(RequestMessage requestMessage, io.netty.buffer.ByteBufAllocator allocator) throws SerializationException Description copied from interface:MessageSerializerSerialize aResponseMessageto a NettyByteBuf.- Parameters:
requestMessage- The request message to serialize to bytes.allocator- The Netty allocator for theByteBufto return back.- Throws:
SerializationException
-
deserializeBinaryRequest
public RequestMessage deserializeBinaryRequest(io.netty.buffer.ByteBuf msg) throws SerializationException Description copied from interface:MessageSerializerDeserialize a NettyByteBufinto aRequestMessage.- Throws:
SerializationException
-