Package io.netty.handler.timeout
Class ForceCloseOnWriteTimeoutHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelOutboundHandlerAdapter
io.netty.handler.timeout.WriteTimeoutHandler
io.netty.handler.timeout.ForceCloseOnWriteTimeoutHandler
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelOutboundHandler
public class ForceCloseOnWriteTimeoutHandler
extends io.netty.handler.timeout.WriteTimeoutHandler
If a remote peer is unresponsive due to CPU throttling, GC or otherwise, ForceCloseOnWriteTimeoutHandler closes
the connection on write timeout, the time out by default is 30 sec.
A close is first attempted on the connection, and is force closed after 5 sec.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidwriteTimedOut(io.netty.channel.ChannelHandlerContext ctx) Methods inherited from class io.netty.handler.timeout.WriteTimeoutHandler
handlerRemoved, writeMethods inherited from class io.netty.channel.ChannelOutboundHandlerAdapter
bind, close, connect, deregister, disconnect, flush, readMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, exceptionCaught, handlerAdded, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
exceptionCaught, handlerAdded
-
Constructor Details
-
ForceCloseOnWriteTimeoutHandler
public ForceCloseOnWriteTimeoutHandler(int timeoutSeconds)
-
-
Method Details
-
writeTimedOut
- Overrides:
writeTimedOutin classio.netty.handler.timeout.WriteTimeoutHandler- Throws:
Exception
-