org.apache.tinkerpop.gremlin.server

## Class AbstractChannelizer

- java.lang.Object
- - <any>
  - - org.apache.tinkerpop.gremlin.server.AbstractChannelizer

- All Implemented Interfaces:
    Channelizer
  Direct Known Subclasses:
    HttpChannelizer, NioChannelizer, WebSocketChannelizer, WsAndHttpChannelizer

      public abstract class AbstractChannelizer
      extends <any>
      implements Channelizer

  A base implementation for the `Channelizer` which does a basic configuration of the pipeline, one that is generally common to virtually any Gremlin Server operation (i.e. where the server's purpose is to process Gremlin scripts).

  Implementers need only worry about determining how incoming data is converted to a `RequestMessage` and outgoing data is converted from a `ResponseMessage` to whatever expected format is needed by the pipeline.
  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Authenticator` | `authenticator`
    `protected static List<Settings.SerializerSettings>` | `DEFAULT_SERIALIZERS`
    `protected GraphManager` | `graphManager`
    `protected static String` | `GREMLIN_ENDPOINT`
    `protected GremlinExecutor` | `gremlinExecutor`
    `protected ExecutorService` | `gremlinExecutorService`
    `static String` | `PIPELINE_AUTHENTICATOR`
    `protected static String` | `PIPELINE_HTTP_REQUEST_DECODER`
    `static String` | `PIPELINE_HTTP_RESPONSE_ENCODER`
    `protected static String` | `PIPELINE_OP_EXECUTOR`
    `protected static String` | `PIPELINE_OP_SELECTOR`
    `static String` | `PIPELINE_REQUEST_HANDLER`
    `protected static String` | `PIPELINE_SSL`
    `static String` | `PIPELINE_WEBSOCKET_SERVER_COMPRESSION`
    `protected ScheduledExecutorService` | `scheduledExecutorService`
    `protected Map<String,MessageSerializer>` | `serializers`
    `protected Settings` | `settings`
    `protected Optional<SslContext>` | `sslContext`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractChannelizer()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `configure(ChannelPipeline pipeline)` This method is called from within `SocketChannel` just after the SSL handler is put in the pipeline.
    `protected AbstractAuthenticationHandler` | `createAuthenticationHandler(Settings.AuthenticationSettings config)`
    `void` | `finalize(ChannelPipeline pipeline)` This method is called after the pipeline is completely configured.
    `void` | `init(ServerGremlinExecutor serverGremlinExecutor)` This method is called just after the `Channelizer` is initialized.
    `void` | `initChannel(SocketChannel ch)`

    - ### 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.server.Channelizer

      `createIdleDetectionMessage, supportsIdleMonitor`

- - ### Field Detail

    - #### DEFAULT_SERIALIZERS

          protected static final List<Settings.SerializerSettings> DEFAULT_SERIALIZERS

    - #### settings

          protected Settings settings

    - #### gremlinExecutor

          protected GremlinExecutor gremlinExecutor

    - #### sslContext

          protected Optional<SslContext> sslContext

    - #### graphManager

          protected GraphManager graphManager

    - #### gremlinExecutorService

          protected ExecutorService gremlinExecutorService

    - #### scheduledExecutorService

          protected ScheduledExecutorService scheduledExecutorService

    - #### PIPELINE_AUTHENTICATOR

          public static final String PIPELINE_AUTHENTICATOR

      See Also:
        Constant Field Values

    - #### PIPELINE_REQUEST_HANDLER

          public static final String PIPELINE_REQUEST_HANDLER

      See Also:
        Constant Field Values

    - #### PIPELINE_HTTP_RESPONSE_ENCODER

          public static final String PIPELINE_HTTP_RESPONSE_ENCODER

      See Also:
        Constant Field Values

    - #### PIPELINE_WEBSOCKET_SERVER_COMPRESSION

          public static final String PIPELINE_WEBSOCKET_SERVER_COMPRESSION

      See Also:
        Constant Field Values

    - #### PIPELINE_SSL

          protected static final String PIPELINE_SSL

      See Also:
        Constant Field Values

    - #### PIPELINE_OP_SELECTOR

          protected static final String PIPELINE_OP_SELECTOR

      See Also:
        Constant Field Values

    - #### PIPELINE_OP_EXECUTOR

          protected static final String PIPELINE_OP_EXECUTOR

      See Also:
        Constant Field Values

    - #### PIPELINE_HTTP_REQUEST_DECODER

          protected static final String PIPELINE_HTTP_REQUEST_DECODER

      See Also:
        Constant Field Values

    - #### GREMLIN_ENDPOINT

          protected static final String GREMLIN_ENDPOINT

      See Also:
        Constant Field Values

    - #### serializers

          protected final Map<String,MessageSerializer> serializers

    - #### authenticator

          protected Authenticator authenticator

  - ### Constructor Detail

    - #### AbstractChannelizer

          public AbstractChannelizer()

  - ### Method Detail

    - #### configure

          public abstract void configure(ChannelPipeline pipeline)

      This method is called from within `SocketChannel` just after the SSL handler is put in the pipeline. Modify the pipeline as needed here.

    - #### finalize

          public void finalize(ChannelPipeline pipeline)

      This method is called after the pipeline is completely configured. It can be overridden to make any final changes to the pipeline before it goes into use.

    - #### init

          public void init(ServerGremlinExecutor serverGremlinExecutor)

      Description copied from interface: `Channelizer`
      This method is called just after the `Channelizer` is initialized.
      Specified by:
        `init` in interface `Channelizer`

    - #### initChannel

          public void initChannel(SocketChannel ch)
                           throws Exception

      Throws:
        `Exception`

    - #### createAuthenticationHandler

          protected AbstractAuthenticationHandler createAuthenticationHandler(Settings.AuthenticationSettings config)

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