Class NettyIdleTimeoutHandler

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelDuplexHandler
io.netty.handler.timeout.IdleStateHandler
org.serviceconnector.net.req.netty.NettyIdleTimeoutHandler
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler, io.netty.channel.ChannelOutboundHandler

public class NettyIdleTimeoutHandler extends io.netty.handler.timeout.IdleStateHandler
Author:
JTraber
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

    io.netty.channel.ChannelHandler.Sharable
  • Constructor Summary

    Constructors
    Constructor
    Description
    NettyIdleTimeoutHandler(long readerIdleTime, long writerIdleTime, long allIdleTime, TimeUnit unit)
    Instantiates a new NETTY idle timeout handler.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NettyIdleTimeoutHandler

      public NettyIdleTimeoutHandler(long readerIdleTime, long writerIdleTime, long allIdleTime, TimeUnit unit)
      Instantiates a new NETTY idle timeout handler.
      Parameters:
      readerIdleTime - the reader idle time
      writerIdleTime - the writer idle time
      allIdleTime - the all idle time
      unit - the time unit of the idle times
  • Method Details

    • channelIdle

      protected void channelIdle(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.timeout.IdleStateEvent evt) throws Exception
      Overrides:
      channelIdle in class io.netty.handler.timeout.IdleStateHandler
      Throws:
      Exception