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.
-
-
Field Summary
Fields Modifier and Type Field Description private CountDownLatchhandlerAddedLatchLatch to count down when this handler is added.private CountDownLatchhandlerRemovedLatchLatch to count down when this handler is removed.
-
Constructor Summary
Constructors Constructor Description AddRemoveHandler(CountDownLatch addedLatch, CountDownLatch removedLatch)Creates a new add remove handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)voidhandlerAdded(io.netty.channel.ChannelHandlerContext ctx)voidhandlerRemoved(io.netty.channel.ChannelHandlerContext ctx)
-
-
-
Field Detail
-
handlerAddedLatch
private final CountDownLatch handlerAddedLatch
Latch to count down when this handler is added.
-
handlerRemovedLatch
private final CountDownLatch handlerRemovedLatch
Latch to count down when this handler is removed.
-
-
Constructor Detail
-
AddRemoveHandler
AddRemoveHandler(CountDownLatch addedLatch, CountDownLatch removedLatch)
Creates a new add remove handler.- Parameters:
addedLatch- to invokehandlerAdded(ChannelHandlerContext)removedLatch- to invokehandlerRemoved(ChannelHandlerContext)
-
-
Method Detail
-
handlerAdded
public void handlerAdded(io.netty.channel.ChannelHandlerContext ctx) throws Exception- Specified by:
handlerAddedin interfaceio.netty.channel.ChannelHandler- Throws:
Exception
-
handlerRemoved
public void handlerRemoved(io.netty.channel.ChannelHandlerContext ctx) throws Exception- Specified by:
handlerRemovedin interfaceio.netty.channel.ChannelHandler- Throws:
Exception
-
-