Package org.drasyl.channel
Class ConnectionHandshakeChannelInitializer
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelInitializer<DrasylChannel>
org.drasyl.channel.ConnectionHandshakeChannelInitializer
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
- Direct Known Subclasses:
DrasylNodeChannelInitializer
public abstract class ConnectionHandshakeChannelInitializer
extends io.netty.channel.ChannelInitializer<DrasylChannel>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
ConnectionHandshakeChannelInitializer
(boolean initiateHandshake) protected
ConnectionHandshakeChannelInitializer
(Duration handshakeTimeout, boolean initiateHandshake) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
protected abstract void
handshakeFailed
(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) protected void
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
-
DEFAULT_HANDSHAKE_TIMEOUT
-
handshakeTimeout
-
initiateHandshake
protected final boolean initiateHandshake
-
-
Constructor Details
-
ConnectionHandshakeChannelInitializer
protected ConnectionHandshakeChannelInitializer(Duration handshakeTimeout, boolean initiateHandshake) -
ConnectionHandshakeChannelInitializer
protected ConnectionHandshakeChannelInitializer(boolean initiateHandshake)
-
-
Method Details
-
initChannel
- Specified by:
initChannel
in classio.netty.channel.ChannelInitializer<DrasylChannel>
- Throws:
Exception
-
handshakeCompleted
- Throws:
Exception
-
handshakeFailed
protected abstract void handshakeFailed(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)
-