org.apache.tinkerpop.gremlin.driver.ser

## Class AbstractMessageSerializer<M>

- java.lang.Object
- - org.apache.tinkerpop.gremlin.driver.ser.AbstractMessageSerializer<M>

- All Implemented Interfaces:
    MessageSerializer<M>
  Direct Known Subclasses:
    AbstractGraphSONMessageSerializerV1d0, AbstractGraphSONMessageSerializerV2d0, AbstractGryoMessageSerializerV1d0, AbstractGryoMessageSerializerV3d0, GraphBinaryMessageSerializerV1

      public abstract class AbstractMessageSerializer<M>
      extends Object
      implements MessageSerializer<M>

  Base `MessageSerializer` that serializers can implement to get some helper methods around configuring a `Mapper.Builder`.
  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `TOKEN_IO_REGISTRIES`

    - ### Fields inherited from interface org.apache.tinkerpop.gremlin.driver.MessageSerializer

      `logger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractMessageSerializer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addIoRegistries(Map<String,Object> config, Mapper.Builder builder)` Reads a list of fully qualified class names from the value of the `TOKEN_IO_REGISTRIES` configuration key.
    `protected List<String>` | `getListStringFromConfig(String token, Map<String,Object> config)` Gets a `List` of strings from the configuration object.
    `protected Method` | `tryInstanceMethod(Class clazz)`

    - ### 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, mimeTypesSupported, serializeRequestAsBinary, serializeResponseAsBinary`

- - ### Field Detail

    - #### TOKEN_IO_REGISTRIES

          public static final String TOKEN_IO_REGISTRIES

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### AbstractMessageSerializer

          public AbstractMessageSerializer()

  - ### Method Detail

    - #### addIoRegistries

          protected void addIoRegistries(Map<String,Object> config,
                                         Mapper.Builder builder)

      Reads a list of fully qualified class names from the value of the `TOKEN_IO_REGISTRIES` configuration key. These classes should equate to `IoRegistry` implementations that will be assigned to the `Mapper.Builder`. The assumption is that the `IoRegistry` either has a static `instance()` method or has a zero-arg constructor from which it can be instantiated.

    - #### tryInstanceMethod

          protected Method tryInstanceMethod(Class clazz)

    - #### getListStringFromConfig

          protected List<String> getListStringFromConfig(String token,
                                                         Map<String,Object> config)

      Gets a `List` of strings from the configuration object.

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