Package org.ldaptive.transport.netty
Class NettyConnection.ValidatorHandler
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- org.ldaptive.transport.netty.NettyConnection.ValidatorHandler
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
- Enclosing class:
- NettyConnection
private class NettyConnection.ValidatorHandler extends io.netty.channel.ChannelInboundHandlerAdapterSchedules a connection validator to run based on its strategy. If the validator fails an exception caught is fired in the pipeline.
-
-
Field Summary
Fields Modifier and Type Field Description private ConnectionValidatorconnectionValidatorConnection validator.private io.netty.util.concurrent.ScheduledFuture<?>sfFuture to track execution status.
-
Constructor Summary
Constructors Constructor Description ValidatorHandler(ConnectionValidator validator)Creates a new validator handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchannelActive(io.netty.channel.ChannelHandlerContext ctx)voidchannelInactive(io.netty.channel.ChannelHandlerContext ctx)-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Field Detail
-
connectionValidator
private final ConnectionValidator connectionValidator
Connection validator.
-
sf
private io.netty.util.concurrent.ScheduledFuture<?> sf
Future to track execution status.
-
-
Constructor Detail
-
ValidatorHandler
ValidatorHandler(ConnectionValidator validator)
Creates a new validator handler.- Parameters:
validator- to execute
-
-
Method Detail
-
channelActive
public void channelActive(io.netty.channel.ChannelHandlerContext ctx)
- Specified by:
channelActivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelActivein classio.netty.channel.ChannelInboundHandlerAdapter
-
channelInactive
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
- Specified by:
channelInactivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelInactivein classio.netty.channel.ChannelInboundHandlerAdapter
-
-