Class NettyIdleHandler

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.NettyIdleHandler
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler, io.netty.channel.ChannelOutboundHandler

public class NettyIdleHandler 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
    NettyIdleHandler(ConnectionContext connectionContext, int readerIdleTimeSeconds, int writerIdleTimeSeconds, int allIdleTimeSeconds)
    Instantiates a new netty idle 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

    • NettyIdleHandler

      public NettyIdleHandler(ConnectionContext connectionContext, int readerIdleTimeSeconds, int writerIdleTimeSeconds, int allIdleTimeSeconds)
      Instantiates a new netty idle handler.
      Parameters:
      connectionContext - the connection context
      readerIdleTimeSeconds - the reader idle time seconds
      writerIdleTimeSeconds - the writer idle time seconds
      allIdleTimeSeconds - the all idle time seconds
  • 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