public class InternalReadTimeoutHandler
extends io.netty.channel.ChannelDuplexHandler
ReadTimeoutHandler. This is required because ReadTimeoutHandler does not allow
reuse in the same pipeline, which is required for connection pooling.
See issue https://github.com/ReactiveX/RxNetty/issues/344| Constructor and Description |
|---|
InternalReadTimeoutHandler(long timeout,
java.util.concurrent.TimeUnit unit)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg) |
void |
channelRegistered(io.netty.channel.ChannelHandlerContext ctx) |
void |
handlerAdded(io.netty.channel.ChannelHandlerContext ctx) |
void |
handlerRemoved(io.netty.channel.ChannelHandlerContext ctx) |
protected void |
readTimedOut(io.netty.channel.ChannelHandlerContext ctx)
Is called when a read timeout was detected.
|
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) |
bind, close, connect, deregister, disconnect, flush, readchannelReadComplete, channelUnregistered, channelWritabilityChanged, exceptionCaughtpublic InternalReadTimeoutHandler(long timeout,
java.util.concurrent.TimeUnit unit)
timeout - read timeoutunit - the TimeUnit of timeoutpublic 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 void channelRegistered(io.netty.channel.ChannelHandlerContext ctx)
throws java.lang.Exception
channelRegistered in interface io.netty.channel.ChannelInboundHandlerchannelRegistered in class io.netty.channel.ChannelInboundHandlerAdapterjava.lang.Exceptionpublic void channelActive(io.netty.channel.ChannelHandlerContext ctx)
throws java.lang.Exception
channelActive in interface io.netty.channel.ChannelInboundHandlerchannelActive in class io.netty.channel.ChannelInboundHandlerAdapterjava.lang.Exceptionpublic void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
throws java.lang.Exception
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class io.netty.channel.ChannelInboundHandlerAdapterjava.lang.Exceptionpublic 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 write(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg,
io.netty.channel.ChannelPromise promise)
throws java.lang.Exception
write in interface io.netty.channel.ChannelOutboundHandlerwrite in class io.netty.channel.ChannelDuplexHandlerjava.lang.Exceptionpublic 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 void readTimedOut(io.netty.channel.ChannelHandlerContext ctx)
throws java.lang.Exception
java.lang.Exception