Class DefaultClientChannelInitializer
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
org.drasyl.peer.connection.DefaultSessionInitializer
org.drasyl.peer.connection.client.ClientChannelInitializer
org.drasyl.peer.connection.client.DefaultClientChannelInitializer
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
Creates a newly configured
ChannelPipeline
for a ClientConnection to a node server.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
-
Field Summary
FieldsFields inherited from class org.drasyl.peer.connection.client.ClientChannelInitializer
target
Fields inherited from class org.drasyl.peer.connection.DefaultSessionInitializer
IDLE_EVENT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
afterPojoMarshalStage
(io.netty.channel.ChannelPipeline pipeline) protected void
customStage
(io.netty.channel.ChannelPipeline pipeline) AddsChannelHandler
to theChannelPipeline
, after the default initialization has taken place.protected void
exceptionStage
(io.netty.channel.ChannelPipeline pipeline) AddsChannelHandler
for exception handling to theChannelPipeline
.protected io.netty.handler.ssl.SslHandler
generateSslContext
(io.netty.channel.socket.SocketChannel ch) Generates aSslHandler
that can be added to theChannelPipeline
.Methods inherited from class org.drasyl.peer.connection.client.ClientChannelInitializer
beforeMarshalStage
Methods inherited from class org.drasyl.peer.connection.DefaultSessionInitializer
afterBufferStage, afterExceptionStage, afterFilterStage, afterIdleStage, afterMarshalStage, afterSslStage, beforeBufferStage, beforeExceptionStage, beforeFilterStage, beforeIdleStage, beforePojoMarshalStage, beforeSslStage, bufferStage, filterStage, idleStage, initChannel, marshalStage, pojoMarshalStage, sslStage
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
-
Field Details
-
DRASYL_HANDSHAKE_AFTER_WEBSOCKET_HANDSHAKE
- See Also:
-
-
Constructor Details
-
DefaultClientChannelInitializer
-
-
Method Details
-
afterPojoMarshalStage
protected void afterPojoMarshalStage(io.netty.channel.ChannelPipeline pipeline) - Overrides:
afterPojoMarshalStage
in classDefaultSessionInitializer
-
customStage
protected void customStage(io.netty.channel.ChannelPipeline pipeline) Description copied from class:DefaultSessionInitializer
AddsChannelHandler
to theChannelPipeline
, after the default initialization has taken place.- Specified by:
customStage
in classDefaultSessionInitializer
- Parameters:
pipeline
- theChannelPipeline
-
exceptionStage
protected void exceptionStage(io.netty.channel.ChannelPipeline pipeline) Description copied from class:DefaultSessionInitializer
AddsChannelHandler
for exception handling to theChannelPipeline
.- Overrides:
exceptionStage
in classDefaultSessionInitializer
- Parameters:
pipeline
- theChannelPipeline
-
generateSslContext
protected io.netty.handler.ssl.SslHandler generateSslContext(io.netty.channel.socket.SocketChannel ch) throws ClientException Description copied from class:DefaultSessionInitializer
Generates aSslHandler
that can be added to theChannelPipeline
. If this method returnsnull
, the SslHandler is not added to theChannelPipeline
.- Specified by:
generateSslContext
in classDefaultSessionInitializer
- Parameters:
ch
- theSocketChannel
to initialize aSslHandler
- Returns:
SslHandler
ornull
- Throws:
ClientException
-