org.apache.tinkerpop.gremlin.server.channel

## Class UnifiedChannelizer

- java.lang.Object
- - io.netty.channel.ChannelHandlerAdapter
  - - io.netty.channel.ChannelInboundHandlerAdapter
    - - io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
      - - org.apache.tinkerpop.gremlin.server.AbstractChannelizer
        - - org.apache.tinkerpop.gremlin.server.channel.UnifiedChannelizer

- All Implemented Interfaces:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler, Channelizer

      public class UnifiedChannelizer
      extends AbstractChannelizer

  A `Channelizer` that supports websocket and HTTP requests and does so with the most streamlined processing model for Gremlin Server introduced with 3.5.0.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

      `io.netty.channel.ChannelHandler.Sharable`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static String` | `PIPELINE_UNIFIED`

    - ### Fields inherited from class org.apache.tinkerpop.gremlin.server.AbstractChannelizer

      `authenticator, authorizer, DEFAULT_SERIALIZERS, graphManager, GREMLIN_ENDPOINT, gremlinExecutor, gremlinExecutorService, PIPELINE_AUTHENTICATOR, PIPELINE_AUTHORIZER, PIPELINE_HTTP_AGGREGATOR, PIPELINE_HTTP_REQUEST_DECODER, PIPELINE_HTTP_RESPONSE_ENCODER, PIPELINE_OP_EXECUTOR, PIPELINE_OP_SELECTOR, PIPELINE_REQUEST_HANDLER, PIPELINE_SSL, PIPELINE_WEBSOCKET_SERVER_COMPRESSION, scheduledExecutorService, serializers, settings, sslContext`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UnifiedChannelizer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `configure(io.netty.channel.ChannelPipeline pipeline)` This method is called from within `AbstractChannelizer.initChannel(SocketChannel)` just after the SSL handler is put in the pipeline.
    `Object` | `createIdleDetectionMessage()` Create a message to send to seemingly dead clients to see if they respond back.
    `void` | `finalize(io.netty.channel.ChannelPipeline pipeline)` This method is called after the pipeline is completely configured.
    `UnifiedHandler` | `getUnifiedHandler()`
    `void` | `init(ServerGremlinExecutor serverGremlinExecutor)` This method is called just after the `Channelizer` is initialized.
    `boolean` | `supportsIdleMonitor()` Determines if the channelizer supports a method for keeping the connection alive and auto-closing zombie channels.

    - ### Methods inherited from class org.apache.tinkerpop.gremlin.server.AbstractChannelizer

      `createAuthenticationHandler, initChannel`

    - ### Methods inherited from class io.netty.channel.ChannelInitializer

      `channelRegistered, exceptionCaught, handlerAdded, handlerRemoved`

    - ### Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

      `channelActive, channelInactive, channelRead, channelReadComplete, channelUnregistered, channelWritabilityChanged, userEventTriggered`

    - ### Methods inherited from class io.netty.channel.ChannelHandlerAdapter

      `ensureNotSharable, isSharable`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface io.netty.channel.ChannelHandler

      `exceptionCaught, handlerAdded, handlerRemoved`

- - ### Field Detail

    - #### PIPELINE_UNIFIED

          protected static final String PIPELINE_UNIFIED

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### UnifiedChannelizer

          public UnifiedChannelizer()

  - ### Method Detail

    - #### 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`
      Overrides:
        `init` in class `AbstractChannelizer`

    - #### configure

          public void configure(io.netty.channel.ChannelPipeline pipeline)

      Description copied from class: `AbstractChannelizer`
      This method is called from within `AbstractChannelizer.initChannel(SocketChannel)` just after the SSL handler is put in the pipeline. Modify the pipeline as needed here.
      Specified by:
        `configure` in class `AbstractChannelizer`

    - #### finalize

          public void finalize(io.netty.channel.ChannelPipeline pipeline)

      Description copied from class: `AbstractChannelizer`
      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.
      Overrides:
        `finalize` in class `AbstractChannelizer`

    - #### getUnifiedHandler

          public UnifiedHandler getUnifiedHandler()

    - #### supportsIdleMonitor

          public boolean supportsIdleMonitor()

      Description copied from interface: `Channelizer`
      Determines if the channelizer supports a method for keeping the connection alive and auto-closing zombie channels.

    - #### createIdleDetectionMessage

          public Object createIdleDetectionMessage()

      Description copied from interface: `Channelizer`
      Create a message to send to seemingly dead clients to see if they respond back. The message sent will be dependent on the implementation. For example, a websocket implementation would create a "ping" message. This method will only be used if `Channelizer.supportsIdleMonitor()` is `true`.

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