Class GraphSONMessageSerializerV3
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.util.ser.AbstractMessageSerializer<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>
-
- org.apache.tinkerpop.gremlin.util.ser.AbstractGraphSONMessageSerializerV2
-
- org.apache.tinkerpop.gremlin.util.ser.GraphSONMessageSerializerV3
-
- All Implemented Interfaces:
MessageSerializer<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>
,MessageTextSerializer<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>
public final class GraphSONMessageSerializerV3 extends AbstractGraphSONMessageSerializerV2 implements MessageTextSerializer<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>
Serialize results to JSON with version 3.0.x schema and the extended module.- Author:
- Stephen Mallette (http://stephen.genoprime.com)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.tinkerpop.gremlin.util.ser.AbstractGraphSONMessageSerializerV2
AbstractGraphSONMessageSerializerV2.GremlinServerModule, AbstractGraphSONMessageSerializerV2.RequestMessageDeserializer, AbstractGraphSONMessageSerializerV2.RequestMessageSerializer, AbstractGraphSONMessageSerializerV2.ResponseMessageDeserializer, AbstractGraphSONMessageSerializerV2.ResponseMessageSerializer
-
-
Field Summary
-
Fields inherited from class org.apache.tinkerpop.gremlin.util.ser.AbstractGraphSONMessageSerializerV2
mapper
-
Fields inherited from class org.apache.tinkerpop.gremlin.util.ser.AbstractMessageSerializer
TOKEN_IO_REGISTRIES
-
-
Constructor Summary
Constructors Constructor Description GraphSONMessageSerializerV3()
Creates a default GraphSONMessageSerializer.GraphSONMessageSerializerV3(GraphSONMapper mapper)
Deprecated.GraphSONMessageSerializerV3(GraphSONMapper.Builder mapperBuilder)
Create a GraphSONMessageSerializer with a providedGraphSONMapper.Builder
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RequestMessage
deserializeRequest(String msg)
ResponseMessage
deserializeResponse(String msg)
String[]
mimeTypesSupported()
The list of mime types that the serializer supports.String
serializeRequestAsString(RequestMessage requestMessage, io.netty.buffer.ByteBufAllocator allocator)
String
serializeResponseAsString(ResponseMessage responseMessage, io.netty.buffer.ByteBufAllocator allocator)
-
Methods inherited from class org.apache.tinkerpop.gremlin.util.ser.AbstractGraphSONMessageSerializerV2
configure, deserializeRequest, deserializeResponse, getMapper, serializeRequestAsBinary, serializeResponseAsBinary
-
Methods inherited from class org.apache.tinkerpop.gremlin.util.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.util.MessageSerializer
configure, deserializeRequest, deserializeResponse, getMapper, serializeRequestAsBinary, serializeResponseAsBinary
-
-
-
-
Constructor Detail
-
GraphSONMessageSerializerV3
public GraphSONMessageSerializerV3()
Creates a default GraphSONMessageSerializer.By default this will internally instantiate a
GraphSONMapper
and register aAbstractGraphSONMessageSerializerV2.GremlinServerModule
andGraphSONXModuleV3
to the mapper.
-
GraphSONMessageSerializerV3
@Deprecated public GraphSONMessageSerializerV3(GraphSONMapper mapper)
Deprecated.Create a GraphSONMessageSerializer from aGraphSONMapper
. Deprecated, useGraphSONMessageSerializerV3(GraphSONMapper.Builder)
instead.
-
GraphSONMessageSerializerV3
public GraphSONMessageSerializerV3(GraphSONMapper.Builder mapperBuilder)
Create a GraphSONMessageSerializer with a providedGraphSONMapper.Builder
. Note that to make this mapper usable in the context of request messages and responses, this method will automatically register aAbstractGraphSONMessageSerializerV2.GremlinServerModule
to the provided mapper.
-
-
Method Detail
-
mimeTypesSupported
public String[] mimeTypesSupported()
Description copied from interface:MessageSerializer
The list of mime types that the serializer supports. They should be ordered in preferred ordered where the greatest fidelity match is first.- Specified by:
mimeTypesSupported
in interfaceMessageSerializer<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>
-
deserializeResponse
public ResponseMessage deserializeResponse(String msg) throws SerializationException
- Specified by:
deserializeResponse
in interfaceMessageTextSerializer<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>
- Throws:
SerializationException
-
serializeResponseAsString
public String serializeResponseAsString(ResponseMessage responseMessage, io.netty.buffer.ByteBufAllocator allocator) throws SerializationException
- Specified by:
serializeResponseAsString
in interfaceMessageTextSerializer<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>
- Throws:
SerializationException
-
deserializeRequest
public RequestMessage deserializeRequest(String msg) throws SerializationException
- Specified by:
deserializeRequest
in interfaceMessageTextSerializer<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>
- Throws:
SerializationException
-
serializeRequestAsString
public String serializeRequestAsString(RequestMessage requestMessage, io.netty.buffer.ByteBufAllocator allocator) throws SerializationException
- Specified by:
serializeRequestAsString
in interfaceMessageTextSerializer<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>
- Throws:
SerializationException
-
-