Class AutoReadNextHandler
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelOutboundHandlerAdapter
-
- com.github.fmjsjx.libnetty.http.server.AutoReadNextHandler
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelOutboundHandler
@Sharable public class AutoReadNextHandler extends io.netty.channel.ChannelOutboundHandlerAdapterA specialChannelOutboundHandlerwhich support theAUTO_READfeature for kept aliveChannels which just send aFullHttpResponseto client.- Since:
- 1.1
-
-
Constructor Summary
Constructors Constructor Description AutoReadNextHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AutoReadNextHandlergetInstance()Returns the singleton instance.voidwrite(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg, io.netty.channel.ChannelPromise promise)-
Methods inherited from class io.netty.channel.ChannelOutboundHandlerAdapter
bind, close, connect, deregister, disconnect, flush, read
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, exceptionCaught, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Method Detail
-
getInstance
public static final AutoReadNextHandler getInstance()
Returns the singleton instance.- Returns:
- the singleton instance
-
write
public void write(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg, io.netty.channel.ChannelPromise promise) throws java.lang.Exception- Specified by:
writein interfaceio.netty.channel.ChannelOutboundHandler- Overrides:
writein classio.netty.channel.ChannelOutboundHandlerAdapter- Throws:
java.lang.Exception
-
-