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.ChannelInboundHandlerAdapter
Schedules a connection validator to run based on it's strategy. If the validator fails an exception caught is fired
in the pipeline.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConnectionValidator
Connection validator.private io.netty.util.concurrent.ScheduledFuture
Future to track execution status. -
Constructor Summary
ConstructorsConstructorDescriptionValidatorHandler
(ConnectionValidator validator) Creates a new validator handler. -
Method Summary
Modifier and TypeMethodDescriptionvoid
channelActive
(io.netty.channel.ChannelHandlerContext ctx) void
channelInactive
(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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
Field Details
-
connectionValidator
Connection validator. -
sf
private io.netty.util.concurrent.ScheduledFuture sfFuture to track execution status.
-
-
Constructor Details
-
ValidatorHandler
ValidatorHandler(ConnectionValidator validator) Creates a new validator handler.- Parameters:
validator
- to execute
-
-
Method Details
-
channelActive
public void channelActive(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
channelActive
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelActive
in classio.netty.channel.ChannelInboundHandlerAdapter
-
channelInactive
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
channelInactive
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelInactive
in classio.netty.channel.ChannelInboundHandlerAdapter
-