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
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConnectionHandshakeChannelInitializer(boolean initiateHandshake) protectedConnectionHandshakeChannelInitializer(Duration handshakeTimeout, boolean initiateHandshake) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidprotected abstract voidhandshakeFailed(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) protected voidMethods inherited from class io.netty.channel.ChannelInitializer
channelRegistered, exceptionCaught, handlerAdded, handlerRemovedMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRead, channelReadComplete, channelUnregistered, channelWritabilityChanged, userEventTriggeredMethods 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:
initChannelin classio.netty.channel.ChannelInitializer<DrasylChannel>- Throws:
Exception
-
handshakeCompleted
- Throws:
Exception
-
handshakeFailed
protected abstract void handshakeFailed(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)
-