Example usage for io.netty.handler.timeout IdleStateEvent FIRST_ALL_IDLE_STATE_EVENT

List of usage examples for io.netty.handler.timeout IdleStateEvent FIRST_ALL_IDLE_STATE_EVENT

Introduction

In this page you can find the example usage for io.netty.handler.timeout IdleStateEvent FIRST_ALL_IDLE_STATE_EVENT.

Prototype

IdleStateEvent FIRST_ALL_IDLE_STATE_EVENT

To view the source code for io.netty.handler.timeout IdleStateEvent FIRST_ALL_IDLE_STATE_EVENT.

Click Source Link

Usage

From source file:io.netty.handler.timeout.IdleStateActivityTracker.java

License:Apache License

@Override
public void timedOut(ChannelHandlerContext ctx) throws Exception {
    IdleStateEvent event;/*w  ww. java2  s .  co  m*/
    if (firstAllIdleEvent) {
        firstAllIdleEvent = false;
        event = IdleStateEvent.FIRST_ALL_IDLE_STATE_EVENT;
    } else {
        event = IdleStateEvent.ALL_IDLE_STATE_EVENT;
    }
    channelIdle(ctx, event);
}