Class TextPlainMessageSerializer
- java.lang.Object
- 
- org.apache.tinkerpop.gremlin.server.util.TextPlainMessageSerializer
 
- 
- All Implemented Interfaces:
- MessageSerializer<Function<Object,String>>,- MessageTextSerializer<Function<Object,String>>
 
 public class TextPlainMessageSerializer extends Object implements MessageTextSerializer<Function<Object,String>> A highly use-case specific serializer that only has context for HTTP where results simply need to be converted to string in a line by line fashion for text based returns.
- 
- 
Field Summary- 
Fields inherited from interface org.apache.tinkerpop.gremlin.util.MessageSerializerlogger
 
- 
 - 
Constructor SummaryConstructors Constructor Description TextPlainMessageSerializer()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)Function<Object,String>getMapper()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 java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.apache.tinkerpop.gremlin.util.MessageSerializerconfigure
 
- 
 
- 
- 
- 
Method Detail- 
getMapperpublic Function<Object,String> getMapper() Description copied from interface:MessageSerializerGets the "mapper" that performs the underlying serialization work.- Specified by:
- getMapperin interface- MessageSerializer<Function<Object,String>>
 
 - 
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<Function<Object,String>>
- 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<Function<Object,String>>
- 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<Function<Object,String>>
- 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<Function<Object,String>>
- 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<Function<Object,String>>
 
 - 
serializeResponseAsStringpublic String serializeResponseAsString(ResponseMessage responseMessage, io.netty.buffer.ByteBufAllocator allocator) throws SerializationException - Specified by:
- serializeResponseAsStringin interface- MessageTextSerializer<Function<Object,String>>
- Throws:
- SerializationException
 
 - 
serializeRequestAsStringpublic String serializeRequestAsString(RequestMessage requestMessage, io.netty.buffer.ByteBufAllocator allocator) throws SerializationException - Specified by:
- serializeRequestAsStringin interface- MessageTextSerializer<Function<Object,String>>
- Throws:
- SerializationException
 
 - 
deserializeRequestpublic RequestMessage deserializeRequest(String msg) throws SerializationException - Specified by:
- deserializeRequestin interface- MessageTextSerializer<Function<Object,String>>
- Throws:
- SerializationException
 
 - 
deserializeResponsepublic ResponseMessage deserializeResponse(String msg) throws SerializationException - Specified by:
- deserializeResponsein interface- MessageTextSerializer<Function<Object,String>>
- Throws:
- SerializationException
 
 
- 
 
-