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,- UnifiedChannelizer,- WebSocketChannelizer,- WsAndHttpChannelizer
 
 public abstract class AbstractChannelizer extends io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel> implements Channelizer A base implementation for theChannelizerwhich 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 aRequestMessageand outgoing data is converted from aResponseMessageto whatever expected format is needed by the pipeline.- Author:
- Stephen Mallette (http://stephen.genoprime.com)
 
- 
- 
Field Summary
 - 
Constructor SummaryConstructors Constructor Description AbstractChannelizer()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract 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)voidfinalize(io.netty.channel.ChannelPipeline pipeline)This method is called after the pipeline is completely configured.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.ChannelInitializerchannelRegistered, exceptionCaught, handlerAdded, handlerRemoved
 - 
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapterchannelActive, channelInactive, channelRead, channelReadComplete, channelUnregistered, channelWritabilityChanged, userEventTriggered
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.apache.tinkerpop.gremlin.server.ChannelizercreateIdleDetectionMessage, supportsIdleMonitor
 
- 
 
- 
- 
- 
Field Detail- 
DEFAULT_SERIALIZERSprotected static final List<Settings.SerializerSettings> DEFAULT_SERIALIZERS 
 - 
settingsprotected Settings settings 
 - 
gremlinExecutorprotected GremlinExecutor gremlinExecutor 
 - 
sslContextprotected Optional<io.netty.handler.ssl.SslContext> sslContext 
 - 
graphManagerprotected GraphManager graphManager 
 - 
gremlinExecutorServiceprotected ExecutorService gremlinExecutorService 
 - 
scheduledExecutorServiceprotected ScheduledExecutorService scheduledExecutorService 
 - 
PIPELINE_AUTHENTICATORpublic static final String PIPELINE_AUTHENTICATOR - See Also:
- Constant Field Values
 
 - 
PIPELINE_AUTHORIZERpublic static final String PIPELINE_AUTHORIZER - See Also:
- Constant Field Values
 
 - 
PIPELINE_REQUEST_HANDLERpublic static final String PIPELINE_REQUEST_HANDLER - See Also:
- Constant Field Values
 
 - 
PIPELINE_HTTP_RESPONSE_ENCODERpublic static final String PIPELINE_HTTP_RESPONSE_ENCODER - See Also:
- Constant Field Values
 
 - 
PIPELINE_HTTP_AGGREGATORpublic static final String PIPELINE_HTTP_AGGREGATOR - See Also:
- Constant Field Values
 
 - 
PIPELINE_WEBSOCKET_SERVER_COMPRESSIONpublic static final String PIPELINE_WEBSOCKET_SERVER_COMPRESSION - See Also:
- Constant Field Values
 
 - 
PIPELINE_HTTP_USER_AGENT_HANDLERpublic static final String PIPELINE_HTTP_USER_AGENT_HANDLER - See Also:
- Constant Field Values
 
 - 
PIPELINE_SSLprotected static final String PIPELINE_SSL - See Also:
- Constant Field Values
 
 - 
PIPELINE_OP_SELECTORprotected static final String PIPELINE_OP_SELECTOR - See Also:
- Constant Field Values
 
 - 
PIPELINE_OP_EXECUTORprotected static final String PIPELINE_OP_EXECUTOR - See Also:
- Constant Field Values
 
 - 
PIPELINE_HTTP_REQUEST_DECODERprotected static final String PIPELINE_HTTP_REQUEST_DECODER - See Also:
- Constant Field Values
 
 - 
GREMLIN_ENDPOINTprotected static final String GREMLIN_ENDPOINT - See Also:
- Constant Field Values
 
 - 
serializersprotected final Map<String,MessageSerializer<?>> serializers 
 - 
channelsprotected io.netty.channel.group.ChannelGroup channels 
 - 
authenticatorprotected Authenticator authenticator 
 - 
authorizerprotected Authorizer authorizer 
 
- 
 - 
Method Detail- 
configurepublic 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.
 - 
finalizepublic void finalize(io.netty.channel.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.
 - 
initpublic void init(ServerGremlinExecutor serverGremlinExecutor) Description copied from interface:ChannelizerThis method is called just after theChannelizeris initialized.- Specified by:
- initin interface- Channelizer
 
 - 
initChannelpublic void initChannel(io.netty.channel.socket.SocketChannel ch) throws ExceptionIt is best not to override this method as it sets up some core parts to the server. Prefer implementing theconfigure(ChannelPipeline)andfinalize(ChannelPipeline)methods to alter the pipeline.- Specified by:
- initChannelin class- io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
- Throws:
- Exception
 
 - 
createAuthenticationHandlerprotected AbstractAuthenticationHandler createAuthenticationHandler(Settings settings) 
 
- 
 
-