Package reactor.netty.http
Class IdleTimeoutHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelDuplexHandler
io.netty.handler.timeout.IdleStateHandler
reactor.netty.http.IdleTimeoutHandler
- All Implemented Interfaces:
 ChannelHandler,ChannelInboundHandler,ChannelOutboundHandler
A handler that manages idle timeout for HTTP connections.
 This handler will close the connection if it remains idle for the specified duration.
 It may also check the liveness of the HTTP connection with sending series of ping messages.
- Since:
 - 1.2.12
 - Author:
 - raccoonback, Violeta Georgieva
 
- 
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable - 
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddIdleTimeoutHandler(ChannelPipeline pipeline, @Nullable Duration idleTimeout, HttpConnectionLiveness httpConnectionLiveness) Adds an idle timeout handler to the pipeline.protected voidchannelIdle(ChannelHandlerContext ctx, IdleStateEvent evt) voidvoidchannelRead(ChannelHandlerContext ctx, Object msg) voidstatic voidremoveIdleTimeoutHandler(ChannelPipeline pipeline) Removes the idle timeout handler from the pipeline if it exists.Methods inherited from class io.netty.handler.timeout.IdleStateHandler
channelActive, channelReadComplete, channelRegistered, getAllIdleTimeInMillis, getReaderIdleTimeInMillis, getWriterIdleTimeInMillis, handlerAdded, newIdleStateEvent, resetReadTimeout, resetWriteTimeout, writeMethods inherited from class io.netty.channel.ChannelDuplexHandler
bind, close, connect, deregister, disconnect, flush, readMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, isSharable 
- 
Method Details
- 
channelIdle
- Overrides:
 channelIdlein classIdleStateHandler
 - 
channelRead
- Specified by:
 channelReadin interfaceChannelInboundHandler- Overrides:
 channelReadin classIdleStateHandler- Throws:
 Exception
 - 
channelInactive
- Specified by:
 channelInactivein interfaceChannelInboundHandler- Overrides:
 channelInactivein classIdleStateHandler- Throws:
 Exception
 - 
handlerRemoved
- Specified by:
 handlerRemovedin interfaceChannelHandler- Overrides:
 handlerRemovedin classIdleStateHandler- Throws:
 Exception
 - 
addIdleTimeoutHandler
public static void addIdleTimeoutHandler(ChannelPipeline pipeline, @Nullable Duration idleTimeout, HttpConnectionLiveness httpConnectionLiveness) Adds an idle timeout handler to the pipeline.- Parameters:
 pipeline- the channel pipelineidleTimeout- the idle timeout durationhttpConnectionLiveness- the HTTP connection liveness checker- Since:
 - 1.2.12
 
 - 
removeIdleTimeoutHandler
Removes the idle timeout handler from the pipeline if it exists.- Parameters:
 pipeline- the channel pipeline from which the handler will be removed- Since:
 - 1.2.12
 
 
 -