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 CountDownLatch
handlerAddedLatch
Latch to count down when this handler is added.private CountDownLatch
handlerRemovedLatch
Latch 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 void
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)
void
handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
void
handlerRemoved(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:
handlerAdded
in interfaceio.netty.channel.ChannelHandler
- Throws:
Exception
-
handlerRemoved
public void handlerRemoved(io.netty.channel.ChannelHandlerContext ctx) throws Exception
- Specified by:
handlerRemoved
in interfaceio.netty.channel.ChannelHandler
- Throws:
Exception
-
-