org.apache.tinkerpop.gremlin.driver.ser

## Class AbstractGraphSONMessageSerializerV2d0

- java.lang.Object
- - org.apache.tinkerpop.gremlin.driver.ser.AbstractMessageSerializer
  - - org.apache.tinkerpop.gremlin.driver.ser.AbstractGraphSONMessageSerializerV2d0

- All Implemented Interfaces:
    MessageSerializer
  Direct Known Subclasses:
    GraphSONMessageSerializerGremlinV2d0, GraphSONMessageSerializerV2d0

      public abstract class AbstractGraphSONMessageSerializerV2d0
      extends AbstractMessageSerializer

  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `AbstractGraphSONMessageSerializerV2d0.GremlinServerModule`
    `static class` | `AbstractGraphSONMessageSerializerV2d0.JsonBuilderJacksonSerializer`
    `static class` | `AbstractGraphSONMessageSerializerV2d0.RequestMessageDeserializer`
    `static class` | `AbstractGraphSONMessageSerializerV2d0.RequestMessageSerializer`
    `static class` | `AbstractGraphSONMessageSerializerV2d0.ResponseMessageDeserializer`
    `static class` | `AbstractGraphSONMessageSerializerV2d0.ResponseMessageSerializer`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ObjectMapper` | `mapper`
    `protected <any>` | `mapTypeReference`
    `protected static String` | `TOKEN_USE_MAPPER_FROM_GRAPH` Deprecated. As of release 3.2.6, replaced by functionality provided by `AbstractMessageSerializer.TOKEN_IO_REGISTRIES`.

    - ### Fields inherited from class org.apache.tinkerpop.gremlin.driver.ser.AbstractMessageSerializer

      `TOKEN_IO_REGISTRIES`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractGraphSONMessageSerializerV2d0()`
    `AbstractGraphSONMessageSerializerV2d0(GraphSONMapper mapper)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `configure(Map<String,Object> config, Map<String,Graph> graphs)` Configure the serializer with mapper settings as required.
    `RequestMessage` | `deserializeRequest(ByteBuf msg)` Deserialize a Netty `ByteBuf` into a `RequestMessage`.
    `ResponseMessage` | `deserializeResponse(ByteBuf msg)` Deserialize a Netty `ByteBuf` into a `ResponseMessage`.
    `ByteBuf` | `serializeRequestAsBinary(RequestMessage requestMessage, ByteBufAllocator allocator)` Serialize a `ResponseMessage` to a Netty `ByteBuf`.
    `ByteBuf` | `serializeResponseAsBinary(ResponseMessage responseMessage, ByteBufAllocator allocator)` Serialize a `ResponseMessage` to a Netty `ByteBuf`.

    - ### 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`

- - ### Field Detail

    - #### mapper

          protected ObjectMapper mapper

    - #### TOKEN_USE_MAPPER_FROM_GRAPH

          @Deprecated
          protected static final String TOKEN_USE_MAPPER_FROM_GRAPH

      Deprecated. As of release 3.2.6, replaced by functionality provided by `AbstractMessageSerializer.TOKEN_IO_REGISTRIES`.
      See Also:
        TINKERPOP-1694, Constant Field Values

    - #### mapTypeReference

          protected final <any> mapTypeReference

  - ### Constructor Detail

    - #### AbstractGraphSONMessageSerializerV2d0

          public AbstractGraphSONMessageSerializerV2d0()

    - #### AbstractGraphSONMessageSerializerV2d0

          public AbstractGraphSONMessageSerializerV2d0(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 ByteBuf serializeResponseAsBinary(ResponseMessage responseMessage,
                                                   ByteBufAllocator allocator)
                                            throws SerializationException

      Description copied from interface: `MessageSerializer`
      Serialize a `ResponseMessage` to a Netty `ByteBuf`.
      Parameters:
        `responseMessage` - The response message to serialize to bytes.
        `allocator` - The Netty allocator for the `ByteBuf` to return back.
      Throws:
        `SerializationException`

    - #### serializeRequestAsBinary

          public ByteBuf serializeRequestAsBinary(RequestMessage requestMessage,
                                                  ByteBufAllocator allocator)
                                           throws SerializationException

      Description copied from interface: `MessageSerializer`
      Serialize a `ResponseMessage` to a Netty `ByteBuf`.
      Parameters:
        `requestMessage` - The request message to serialize to bytes.
        `allocator` - The Netty allocator for the `ByteBuf` to return back.
      Throws:
        `SerializationException`

    - #### deserializeRequest

          public RequestMessage deserializeRequest(ByteBuf msg)
                                            throws SerializationException

      Description copied from interface: `MessageSerializer`
      Deserialize a Netty `ByteBuf` into a `RequestMessage`.
      Throws:
        `SerializationException`

    - #### deserializeResponse

          public ResponseMessage deserializeResponse(ByteBuf msg)
                                              throws SerializationException

      Description copied from interface: `MessageSerializer`
      Deserialize a Netty `ByteBuf` into a `ResponseMessage`.
      Throws:
        `SerializationException`

Copyright © 2013–2019 Apache Software Foundation. All rights reserved.