public interface MessageSerializer
Iterator
as returned from the ScriptEngine
or an incoming RequestMessage
.
MessageSerializer
instances are instantiated to a cache via ServiceLoader
and indexed based on
the mime types they support. If a mime type is supported more than once, the last MessageSerializer
instance loaded for that mime type is assigned. If a mime type is not found the default
GraphSONMessageSerializerV1d0
is used to return the results.Modifier and Type | Field and Description |
---|---|
static Logger |
logger |
Modifier and Type | Method and Description |
---|---|
default void |
configure(Map<String,Object> config,
Map<String,Graph> graphs)
Configure the serializer with mapper settings as required.
|
org.apache.tinkerpop.gremlin.driver.message.RequestMessage |
deserializeRequest(ByteBuf msg)
Deserialize a Netty
ByteBuf into a RequestMessage . |
org.apache.tinkerpop.gremlin.driver.message.ResponseMessage |
deserializeResponse(ByteBuf msg)
Deserialize a Netty
ByteBuf into a ResponseMessage . |
String[] |
mimeTypesSupported()
The list of mime types that the serializer supports.
|
ByteBuf |
serializeRequestAsBinary(org.apache.tinkerpop.gremlin.driver.message.RequestMessage requestMessage,
ByteBufAllocator allocator)
Serialize a
ResponseMessage to a Netty ByteBuf . |
ByteBuf |
serializeResponseAsBinary(org.apache.tinkerpop.gremlin.driver.message.ResponseMessage responseMessage,
ByteBufAllocator allocator)
Serialize a
ResponseMessage to a Netty ByteBuf . |
ByteBuf serializeResponseAsBinary(org.apache.tinkerpop.gremlin.driver.message.ResponseMessage responseMessage, ByteBufAllocator allocator) throws org.apache.tinkerpop.gremlin.driver.ser.SerializationException
ResponseMessage
to a Netty ByteBuf
.responseMessage
- The response message to serialize to bytes.allocator
- The Netty allocator for the ByteBuf
to return back.org.apache.tinkerpop.gremlin.driver.ser.SerializationException
ByteBuf serializeRequestAsBinary(org.apache.tinkerpop.gremlin.driver.message.RequestMessage requestMessage, ByteBufAllocator allocator) throws org.apache.tinkerpop.gremlin.driver.ser.SerializationException
ResponseMessage
to a Netty ByteBuf
.requestMessage
- The request message to serialize to bytes.allocator
- The Netty allocator for the ByteBuf
to return back.org.apache.tinkerpop.gremlin.driver.ser.SerializationException
org.apache.tinkerpop.gremlin.driver.message.RequestMessage deserializeRequest(ByteBuf msg) throws org.apache.tinkerpop.gremlin.driver.ser.SerializationException
ByteBuf
into a RequestMessage
.org.apache.tinkerpop.gremlin.driver.ser.SerializationException
org.apache.tinkerpop.gremlin.driver.message.ResponseMessage deserializeResponse(ByteBuf msg) throws org.apache.tinkerpop.gremlin.driver.ser.SerializationException
ByteBuf
into a ResponseMessage
.org.apache.tinkerpop.gremlin.driver.ser.SerializationException
String[] mimeTypesSupported()
default void configure(Map<String,Object> config, Map<String,Graph> graphs)
Copyright © 2013–2017 Apache Software Foundation. All rights reserved.