public abstract static class ProtocolNegotiators.AbstractBufferingHandler extends ChannelDuplexHandler
writeBufferedAndRemove(ChannelHandlerContext)
or
fail(ChannelHandlerContext, Throwable)
is called. This handler allows us to
write to a Channel
before we are allowed to write to it officially
i.e. before it's active or the TLS Handshake is complete.ChannelHandler.Sharable
Modifier | Constructor and Description |
---|---|
protected |
AbstractBufferingHandler(ChannelHandler... handlers) |
Modifier and Type | Method and Description |
---|---|
void |
channelInactive(ChannelHandlerContext ctx) |
void |
channelRegistered(ChannelHandlerContext ctx) |
void |
close(ChannelHandlerContext ctx,
ChannelPromise future) |
void |
exceptionCaught(ChannelHandlerContext ctx,
Throwable cause) |
protected void |
fail(ChannelHandlerContext ctx,
Throwable cause) |
void |
flush(ChannelHandlerContext ctx) |
void |
write(ChannelHandlerContext ctx,
Object msg,
ChannelPromise promise) |
protected void |
writeBufferedAndRemove(ChannelHandlerContext ctx) |
bind, connect, deregister, disconnect, read
channelActive, channelRead, channelReadComplete, channelUnregistered, channelWritabilityChanged, userEventTriggered
handlerAdded, handlerRemoved, isSharable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handlerAdded, handlerRemoved
protected AbstractBufferingHandler(ChannelHandler... handlers)
handlers
- the ChannelHandlers are added to the pipeline on channelRegistered and
before this handler.public void channelRegistered(ChannelHandlerContext ctx) throws Exception
channelRegistered
in interface ChannelInboundHandler
channelRegistered
in class ChannelInboundHandlerAdapter
Exception
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception
exceptionCaught
in interface ChannelHandler
exceptionCaught
in interface ChannelInboundHandler
exceptionCaught
in class ChannelInboundHandlerAdapter
Exception
public void channelInactive(ChannelHandlerContext ctx) throws Exception
channelInactive
in interface ChannelInboundHandler
channelInactive
in class ChannelInboundHandlerAdapter
Exception
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception
write
in interface ChannelOutboundHandler
write
in class ChannelDuplexHandler
Exception
public void flush(ChannelHandlerContext ctx)
flush
in interface ChannelOutboundHandler
flush
in class ChannelDuplexHandler
public void close(ChannelHandlerContext ctx, ChannelPromise future) throws Exception
close
in interface ChannelOutboundHandler
close
in class ChannelDuplexHandler
Exception
protected final void fail(ChannelHandlerContext ctx, Throwable cause)
protected final void writeBufferedAndRemove(ChannelHandlerContext ctx)