public abstract class AbstractChannelizer extends io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel> implements Channelizer
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.Modifier and Type | Field and Description |
---|---|
protected Authenticator |
authenticator |
protected Authorizer |
authorizer |
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 |
static String |
PIPELINE_AUTHORIZER |
static String |
PIPELINE_HTTP_AGGREGATOR |
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<io.netty.handler.ssl.SslContext> |
sslContext |
Constructor and Description |
---|
AbstractChannelizer() |
Modifier and Type | Method and Description |
---|---|
abstract void |
configure(io.netty.channel.ChannelPipeline pipeline)
This method is called from within
initChannel(SocketChannel) just after the SSL handler is put in the pipeline. |
protected AbstractAuthenticationHandler |
createAuthenticationHandler(Settings settings) |
void |
finalize(io.netty.channel.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(io.netty.channel.socket.SocketChannel ch) |
channelRegistered, exceptionCaught, handlerAdded, handlerRemoved
channelActive, channelInactive, channelRead, channelReadComplete, channelUnregistered, channelWritabilityChanged, userEventTriggered
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createIdleDetectionMessage, supportsIdleMonitor
protected static final List<Settings.SerializerSettings> DEFAULT_SERIALIZERS
protected Settings settings
protected GremlinExecutor gremlinExecutor
protected Optional<io.netty.handler.ssl.SslContext> sslContext
protected GraphManager graphManager
protected ExecutorService gremlinExecutorService
protected ScheduledExecutorService scheduledExecutorService
public static final String PIPELINE_AUTHENTICATOR
public static final String PIPELINE_AUTHORIZER
public static final String PIPELINE_REQUEST_HANDLER
public static final String PIPELINE_HTTP_RESPONSE_ENCODER
public static final String PIPELINE_HTTP_AGGREGATOR
public static final String PIPELINE_WEBSOCKET_SERVER_COMPRESSION
protected static final String PIPELINE_SSL
protected static final String PIPELINE_OP_SELECTOR
protected static final String PIPELINE_OP_EXECUTOR
protected static final String PIPELINE_HTTP_REQUEST_DECODER
protected static final String GREMLIN_ENDPOINT
protected final Map<String,MessageSerializer<?>> serializers
protected Authenticator authenticator
protected Authorizer authorizer
public abstract void configure(io.netty.channel.ChannelPipeline pipeline)
initChannel(SocketChannel)
just after the SSL handler is put in the pipeline.
Modify the pipeline as needed here.public void finalize(io.netty.channel.ChannelPipeline pipeline)
public void init(ServerGremlinExecutor serverGremlinExecutor)
Channelizer
Channelizer
is initialized.init
in interface Channelizer
public void initChannel(io.netty.channel.socket.SocketChannel ch) throws Exception
initChannel
in class io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
Exception
protected AbstractAuthenticationHandler createAuthenticationHandler(Settings settings)
Copyright © 2013–2022 Apache Software Foundation. All rights reserved.