Class AbstractChannelizer
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
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler,Channelizer
- Direct Known Subclasses:
HttpChannelizer
public abstract class AbstractChannelizer
extends io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
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)
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Authenticatorprotected Authorizerprotected io.netty.channel.group.ChannelGroupprotected static final List<Settings.SerializerSettings>protected GraphManagerprotected static final Stringprotected GremlinExecutorprotected ExecutorServicestatic final Stringstatic final Stringstatic final Stringprotected static final Stringstatic final Stringstatic final Stringstatic final Stringprotected static final Stringprotected ScheduledExecutorServiceprotected final Map<String,MessageSerializer<?>> protected Settingsprotected Optional<io.netty.handler.ssl.SslContext> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidconfigure(io.netty.channel.ChannelPipeline pipeline) This method is called from withininitChannel(SocketChannel)just after the SSL handler is put in the pipeline.protected AbstractAuthenticationHandlercreateAuthenticationHandler(Settings settings) voidinit(ServerGremlinExecutor serverGremlinExecutor) This method is called just after theChannelizeris initialized.voidinitChannel(io.netty.channel.socket.SocketChannel ch) It is best not to override this method as it sets up some core parts to the server.Methods inherited from class io.netty.channel.ChannelInitializer
channelRegistered, exceptionCaught, handlerAdded, handlerRemovedMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRead, channelReadComplete, channelUnregistered, channelWritabilityChanged, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemovedMethods inherited from interface org.apache.tinkerpop.gremlin.server.Channelizer
createIdleDetectionMessage, supportsIdleMonitor
-
Field Details
-
DEFAULT_SERIALIZERS
-
settings
-
gremlinExecutor
-
sslContext
-
graphManager
-
gremlinExecutorService
-
scheduledExecutorService
-
PIPELINE_AUTHENTICATOR
- See Also:
-
PIPELINE_AUTHORIZER
- See Also:
-
PIPELINE_REQUEST_HANDLER
- See Also:
-
PIPELINE_HTTP_RESPONSE_ENCODER
- See Also:
-
PIPELINE_HTTP_AGGREGATOR
- See Also:
-
PIPELINE_HTTP_USER_AGENT_HANDLER
- See Also:
-
PIPELINE_SSL
- See Also:
-
PIPELINE_HTTP_REQUEST_DECODER
- See Also:
-
GREMLIN_ENDPOINT
- See Also:
-
serializers
-
channels
protected io.netty.channel.group.ChannelGroup channels -
authenticator
-
authorizer
-
-
Constructor Details
-
AbstractChannelizer
public AbstractChannelizer()
-
-
Method Details
-
configure
public abstract void configure(io.netty.channel.ChannelPipeline pipeline) This method is called from withininitChannel(SocketChannel)just after the SSL handler is put in the pipeline. Modify the pipeline as needed here. -
init
Description copied from interface:ChannelizerThis method is called just after theChannelizeris initialized.- Specified by:
initin interfaceChannelizer
-
initChannel
It is best not to override this method as it sets up some core parts to the server. Prefer implementing theconfigure(ChannelPipeline)methods to alter the pipeline.- Specified by:
initChannelin classio.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>- Throws:
Exception
-
createAuthenticationHandler
-