org.apache.tinkerpop.gremlin.driver.ser

## Class GraphSONMessageSerializerV3d0

- java.lang.Object
- - org.apache.tinkerpop.gremlin.driver.ser.AbstractMessageSerializer<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>
  - - org.apache.tinkerpop.gremlin.driver.ser.AbstractGraphSONMessageSerializerV2d0
    - - org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0

- All Implemented Interfaces:
    MessageSerializer<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>, MessageTextSerializer<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>

      public final class GraphSONMessageSerializerV3d0
      extends AbstractGraphSONMessageSerializerV2d0
      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.driver.ser.AbstractGraphSONMessageSerializerV2d0

      `AbstractGraphSONMessageSerializerV2d0.GremlinServerModule, AbstractGraphSONMessageSerializerV2d0.JsonBuilderJacksonSerializer, AbstractGraphSONMessageSerializerV2d0.RequestMessageDeserializer, AbstractGraphSONMessageSerializerV2d0.RequestMessageSerializer, AbstractGraphSONMessageSerializerV2d0.ResponseMessageDeserializer, AbstractGraphSONMessageSerializerV2d0.ResponseMessageSerializer`

  - ### Field Summary

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

      `mapper`

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

      `TOKEN_IO_REGISTRIES`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GraphSONMessageSerializerV3d0()` Creates a default GraphSONMessageSerializer.
    `GraphSONMessageSerializerV3d0(GraphSONMapper.Builder mapperBuilder)` Create a GraphSONMessageSerializer with a provided `GraphSONMapper.Builder`.
    `GraphSONMessageSerializerV3d0(GraphSONMapper mapper)` Deprecated.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `RequestMessage` | `deserializeRequest(String msg)`
    `ResponseMessage` | `deserializeResponse(String msg)`
    `String[]` | `mimeTypesSupported()` The list of mime types that the serializer supports.
    `String` | `serializeRequestAsString(RequestMessage requestMessage)`
    `String` | `serializeResponseAsString(ResponseMessage responseMessage)`

    - ### Methods inherited from class org.apache.tinkerpop.gremlin.driver.ser.AbstractGraphSONMessageSerializerV2d0

      `configure, deserializeRequest, deserializeResponse, getMapper, serializeRequestAsBinary, serializeResponseAsBinary`

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

      `configure, deserializeRequest, deserializeResponse, getMapper, serializeRequestAsBinary, serializeResponseAsBinary`

- - ### Constructor Detail

    - #### GraphSONMessageSerializerV3d0

          public GraphSONMessageSerializerV3d0()

      Creates a default GraphSONMessageSerializer.

      By default this will internally instantiate a `GraphSONMapper` and register a `GremlinServerModule` and `GraphSONXModuleV3d0` to the mapper.

      See Also:
        `GraphSONMessageSerializerV3d0(GraphSONMapper.Builder)`

    - #### GraphSONMessageSerializerV3d0

          @Deprecated
          public GraphSONMessageSerializerV3d0(GraphSONMapper mapper)

      Deprecated.
      Create a GraphSONMessageSerializer from a `GraphSONMapper`. Deprecated, use `GraphSONMessageSerializerV3d0(GraphSONMapper.Builder)` instead.

    - #### GraphSONMessageSerializerV3d0

          public GraphSONMessageSerializerV3d0(GraphSONMapper.Builder mapperBuilder)

      Create a GraphSONMessageSerializer with a provided `GraphSONMapper.Builder`. Note that to make this mapper usable in the context of request messages and responses, this method will automatically register a `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.
      Specified by:
        `mimeTypesSupported` in interface `MessageSerializer<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>`

    - #### deserializeResponse

          public ResponseMessage deserializeResponse(String msg)
                                              throws SerializationException

      Specified by:
        `deserializeResponse` in interface `MessageTextSerializer<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>`
      Throws:
        `SerializationException`

    - #### serializeResponseAsString

          public String serializeResponseAsString(ResponseMessage responseMessage)
                                           throws SerializationException

      Specified by:
        `serializeResponseAsString` in interface `MessageTextSerializer<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>`
      Throws:
        `SerializationException`

    - #### deserializeRequest

          public RequestMessage deserializeRequest(String msg)
                                            throws SerializationException

      Specified by:
        `deserializeRequest` in interface `MessageTextSerializer<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>`
      Throws:
        `SerializationException`

    - #### serializeRequestAsString

          public String serializeRequestAsString(RequestMessage requestMessage)
                                          throws SerializationException

      Specified by:
        `serializeRequestAsString` in interface `MessageTextSerializer<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>`
      Throws:
        `SerializationException`

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