code: @Override
      public void userEventTriggered(final ChannelHandlerContext ctx, final Object evt) {
          if (evt instanceof IdleStateEvent) {
              IdleStateEvent e = (IdleStateEvent) evt;
              if (e.state() == IdleState.READER_IDLE) {
                  ctx.close();
                  LOG.warn(jnrpeContext, "Read Timeout");
                  //jnrpeContext.getEventBus().post(new LogEvent(this, LogEventType.INFO, "Read Timeout"));
                  //EventsUtil.sendEvent(this.jnrpeContext, this, LogEvent.INFO, "Read Timeout");
              } else if (e.state() == IdleState.WRITER_IDLE) {
                  LOG.warn(jnrpeContext, "Write Timeout");
                  //jnrpeContext.getEventBus().post(new LogEvent(this, LogEventType.INFO, "Write Timeout"));
                  //EventsUtil.sendEvent(jnrpeContext, this, LogEvent.INFO, "Write Timeout");
                  ctx.close();
              }
          }
      }
docs: Method userEventTriggered.
  @param ctx ChannelHandlerContext
  @param evt Object
  @see io.netty.channel.ChannelInboundHandler#userEventTriggered(ChannelHandlerContext, Object)