public abstract class BackpressureManagingHandler
extends io.netty.channel.ChannelDuplexHandler
| Modifier and Type | Class and Description |
|---|---|
protected static class |
BackpressureManagingHandler.RequestReadIfRequiredEvent |
| Modifier | Constructor and Description |
|---|---|
protected |
BackpressureManagingHandler(java.lang.String thisHandlerName) |
| Modifier and Type | Method and Description |
|---|---|
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg) |
void |
channelReadComplete(io.netty.channel.ChannelHandlerContext ctx) |
void |
handlerAdded(io.netty.channel.ChannelHandlerContext ctx) |
void |
handlerRemoved(io.netty.channel.ChannelHandlerContext ctx) |
protected abstract void |
newMessage(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg) |
void |
read(io.netty.channel.ChannelHandlerContext ctx) |
protected abstract boolean |
shouldReadMore(io.netty.channel.ChannelHandlerContext ctx) |
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object evt) |
void |
write(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg,
io.netty.channel.ChannelPromise promise)
Intercepts a write on the channel.
|
bind, close, connect, deregister, disconnect, flushchannelActive, channelInactive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaughtprotected BackpressureManagingHandler(java.lang.String thisHandlerName)
public final void channelRead(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg)
throws java.lang.Exception
channelRead in interface io.netty.channel.ChannelInboundHandlerchannelRead in class io.netty.channel.ChannelInboundHandlerAdapterjava.lang.Exceptionpublic void handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
throws java.lang.Exception
handlerAdded in interface io.netty.channel.ChannelHandlerhandlerAdded in class io.netty.channel.ChannelHandlerAdapterjava.lang.Exceptionpublic void handlerRemoved(io.netty.channel.ChannelHandlerContext ctx)
throws java.lang.Exception
handlerRemoved in interface io.netty.channel.ChannelHandlerhandlerRemoved in class io.netty.channel.ChannelHandlerAdapterjava.lang.Exceptionpublic final void channelReadComplete(io.netty.channel.ChannelHandlerContext ctx)
throws java.lang.Exception
channelReadComplete in interface io.netty.channel.ChannelInboundHandlerchannelReadComplete in class io.netty.channel.ChannelInboundHandlerAdapterjava.lang.Exceptionpublic final void read(io.netty.channel.ChannelHandlerContext ctx)
throws java.lang.Exception
read in interface io.netty.channel.ChannelOutboundHandlerread in class io.netty.channel.ChannelDuplexHandlerjava.lang.Exceptionpublic void write(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg,
io.netty.channel.ChannelPromise promise)
throws java.lang.Exception
ByteBuf and
then writes it on the channel.ByteBuf and
then writes it on the channel.Observable and writes all items, requesting the next item if and only if
the channel is writable as indicated by Channel.isWritable()write in interface io.netty.channel.ChannelOutboundHandlerwrite in class io.netty.channel.ChannelDuplexHandlerctx - Channel handler context.msg - Message to write.promise - Promise for the completion of write.java.lang.Exception - If there is an error handling this write.public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object evt)
throws java.lang.Exception
userEventTriggered in interface io.netty.channel.ChannelInboundHandleruserEventTriggered in class io.netty.channel.ChannelInboundHandlerAdapterjava.lang.Exceptionprotected abstract void newMessage(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg)
protected abstract boolean shouldReadMore(io.netty.channel.ChannelHandlerContext ctx)