Package org.ldaptive.transport.netty
Class NettyConnection.AddRemoveHandler
java.lang.Object
org.ldaptive.transport.netty.NettyConnection.AddRemoveHandler
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
- Enclosing class:
- NettyConnection
private static final class NettyConnection.AddRemoveHandler
extends Object
implements io.netty.channel.ChannelHandler
Invokes a latch when this handler is added or removed from a 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 CountDownLatchLatch to count down when this handler is added.private final CountDownLatchLatch to count down when this handler is removed. -
Constructor Summary
ConstructorsConstructorDescriptionAddRemoveHandler(CountDownLatch addedLatch, CountDownLatch removedLatch) Creates a new add remove handler. -
Method Summary
Modifier and TypeMethodDescriptionvoidexceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) voidhandlerAdded(io.netty.channel.ChannelHandlerContext ctx) voidhandlerRemoved(io.netty.channel.ChannelHandlerContext ctx)
-
Field Details
-
handlerAddedLatch
Latch to count down when this handler is added. -
handlerRemovedLatch
Latch to count down when this handler is removed.
-
-
Constructor Details
-
AddRemoveHandler
AddRemoveHandler(CountDownLatch addedLatch, CountDownLatch removedLatch) Creates a new add remove handler.- Parameters:
addedLatch- to invokehandlerAdded(ChannelHandlerContext)removedLatch- to invokehandlerRemoved(ChannelHandlerContext)
-
-
Method Details
-
handlerAdded
- Specified by:
handlerAddedin interfaceio.netty.channel.ChannelHandler- Throws:
Exception
-
handlerRemoved
- Specified by:
handlerRemovedin interfaceio.netty.channel.ChannelHandler- Throws:
Exception
-
exceptionCaught
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception - Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelHandler- Throws:
Exception
-