Class Channelizer.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.driver.Channelizer.AbstractChannelizer
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
,Channelizer
- Direct Known Subclasses:
Channelizer.HttpChannelizer
- Enclosing interface:
- Channelizer
public abstract static class Channelizer.AbstractChannelizer extends io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel> implements Channelizer
Base implementation of the client sideChannelizer
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
-
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.driver.Channelizer
Channelizer.AbstractChannelizer, Channelizer.HttpChannelizer
-
-
Field Summary
Fields Modifier and Type Field Description protected Cluster
cluster
protected org.apache.tinkerpop.gremlin.driver.Connection
connection
protected static String
PIPELINE_GREMLIN_HANDLER
protected static String
PIPELINE_HTTP_AGGREGATOR
protected static String
PIPELINE_HTTP_CODEC
protected static String
PIPELINE_HTTP_DECODER
protected static String
PIPELINE_HTTP_DECOMPRESSION_HANDLER
protected static String
PIPELINE_HTTP_ENCODER
protected static String
PIPELINE_IDLE_CONNECTION_HANDLER
protected static String
PIPELINE_IDLE_STATE_HANDLER
protected static String
PIPELINE_SSL_HANDLER
protected io.netty.handler.ssl.SslHandler
sslHandler
-
Constructor Summary
Constructors Constructor Description AbstractChannelizer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close(io.netty.channel.Channel channel)
Called onConnection.closeAsync()
to perform anChannelizer
specific functions.abstract void
configure(io.netty.channel.ChannelPipeline pipeline)
void
connected()
Called after the channel connects.void
finalize(io.netty.channel.ChannelPipeline pipeline)
void
init(org.apache.tinkerpop.gremlin.driver.Connection connection)
Initializes theChannelizer
.protected void
initChannel(io.netty.channel.socket.SocketChannel socketChannel)
boolean
supportsSsl()
-
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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.tinkerpop.gremlin.driver.Channelizer
getScheme
-
-
-
-
Field Detail
-
connection
protected org.apache.tinkerpop.gremlin.driver.Connection connection
-
cluster
protected Cluster cluster
-
sslHandler
protected io.netty.handler.ssl.SslHandler sslHandler
-
PIPELINE_GREMLIN_HANDLER
protected static final String PIPELINE_GREMLIN_HANDLER
- See Also:
- Constant Field Values
-
PIPELINE_SSL_HANDLER
protected static final String PIPELINE_SSL_HANDLER
- See Also:
- Constant Field Values
-
PIPELINE_IDLE_STATE_HANDLER
protected static final String PIPELINE_IDLE_STATE_HANDLER
- See Also:
- Constant Field Values
-
PIPELINE_IDLE_CONNECTION_HANDLER
protected static final String PIPELINE_IDLE_CONNECTION_HANDLER
- See Also:
- Constant Field Values
-
PIPELINE_HTTP_CODEC
protected static final String PIPELINE_HTTP_CODEC
- See Also:
- Constant Field Values
-
PIPELINE_HTTP_AGGREGATOR
protected static final String PIPELINE_HTTP_AGGREGATOR
- See Also:
- Constant Field Values
-
PIPELINE_HTTP_ENCODER
protected static final String PIPELINE_HTTP_ENCODER
- See Also:
- Constant Field Values
-
PIPELINE_HTTP_DECODER
protected static final String PIPELINE_HTTP_DECODER
- See Also:
- Constant Field Values
-
PIPELINE_HTTP_DECOMPRESSION_HANDLER
protected static final String PIPELINE_HTTP_DECOMPRESSION_HANDLER
- See Also:
- Constant Field Values
-
-
Method Detail
-
supportsSsl
public boolean supportsSsl()
-
configure
public abstract void configure(io.netty.channel.ChannelPipeline pipeline)
-
finalize
public void finalize(io.netty.channel.ChannelPipeline pipeline)
-
close
public void close(io.netty.channel.Channel channel)
Description copied from interface:Channelizer
Called onConnection.closeAsync()
to perform anChannelizer
specific functions. Note that theConnection
already callsChannel.close()
so there is no need to call that method here. An implementation will typically use this method to send aChannelizer
specific message to the server to notify of shutdown coming from the client side.- Specified by:
close
in interfaceChannelizer
-
init
public void init(org.apache.tinkerpop.gremlin.driver.Connection connection)
Description copied from interface:Channelizer
Initializes theChannelizer
. Called just after construction.- Specified by:
init
in interfaceChannelizer
-
initChannel
protected void initChannel(io.netty.channel.socket.SocketChannel socketChannel)
- Specified by:
initChannel
in classio.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
-
connected
public void connected()
Description copied from interface:Channelizer
Called after the channel connects. TheChannelizer
may need to perform some functions, such as a handshake.- Specified by:
connected
in interfaceChannelizer
-
-