Package org.drasyl.node.handler.timeout
Class IdleChannelCloser
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelDuplexHandler
io.netty.handler.timeout.IdleStateHandler
org.drasyl.node.handler.timeout.IdleChannelCloser
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
,io.netty.channel.ChannelOutboundHandler
public class IdleChannelCloser
extends io.netty.handler.timeout.IdleStateHandler
Closes inactive channels (to free up memory).
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
channelIdle
(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.timeout.IdleStateEvent evt) Methods inherited from class io.netty.handler.timeout.IdleStateHandler
channelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, getAllIdleTimeInMillis, getReaderIdleTimeInMillis, getWriterIdleTimeInMillis, handlerAdded, handlerRemoved, newIdleStateEvent, resetReadTimeout, resetWriteTimeout, write
Methods inherited from class io.netty.channel.ChannelDuplexHandler
bind, close, connect, deregister, disconnect, flush, read
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, isSharable
-
Constructor Details
-
IdleChannelCloser
public IdleChannelCloser(int inactivityTimeout)
-
-
Method Details
-
channelIdle
protected void channelIdle(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.timeout.IdleStateEvent evt) - Overrides:
channelIdle
in classio.netty.handler.timeout.IdleStateHandler
-