Java Code Examples for io.netty.channel.ChannelHandlerContext.fireChannelInactive()

The following are Jave code examples for showing how to use fireChannelInactive() of the io.netty.channel.ChannelHandlerContext class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: JRediClients   File: ConnectionWatchdog.java   View Source Code Vote up 5 votes
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
    RedisConnection connection = RedisConnection.getFrom(ctx.channel());
    if (connection != null) {
        connection.fireDisconnected();
        if (!connection.isClosed()) {
            if (connection.isFastReconnect()) {
                tryReconnect(connection, 1);
            } else {
                reconnect(connection, 1);
            }
        }
    }
    ctx.fireChannelInactive();
}
 
Example 2
Project: xrpc   File: ConnectionLimiter.java   View Source Code Vote up 5 votes
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
  connections.dec();

  if (maxConnections > 0) {
    if (numConnections.decrementAndGet() < 0) {
      log.error("BUG in ConnectionLimiter");
    }
  }
  ctx.fireChannelInactive();
}
 
Example 3
Project: fresco_floodlight   File: HandshakeTimeoutHandler.java   View Source Code Vote up 5 votes
@Override
public void channelInactive(ChannelHandlerContext ctx)
        throws Exception {
    if (timeout != null) {
        timeout.cancel();
        timeout = null;
    }
    ctx.fireChannelInactive();
}
 
Example 4
Project: sctalk   File: MessageServerHandler.java   View Source Code Vote up 5 votes
/**
 * 服务端监听到客户端不活动
 * 
 * @param ctx
 * @throws Exception
 */
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
    // 服务端接收到客户端掉线通知
    Channel incoming = ctx.channel();
    logger.debug("MessageServerHandler:" + incoming.remoteAddress() + "掉线");
    handlerManager.offline(ctx);
    ctx.fireChannelInactive();
}
 
Example 5
Project: sctalk   File: MessageSocketServerHandler.java   View Source Code Vote up 5 votes
/**
 * 服务端监听到客户端不活动
 * 
 * @param ctx
 * @throws Exception
 */
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
    // 服务端接收到客户端掉线通知
    Channel incoming = ctx.channel();
    logger.debug("MessageServerHandler:" + incoming.remoteAddress() + "掉线");
    handlerManager.offline(ctx);
    ctx.fireChannelInactive();
}
 
Example 6
Project: xrpc   File: ServiceRateLimiter.java   View Source Code Vote up 4 votes
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
  ctx.fireChannelInactive();

  timerMap.remove(ctx).stop();
}
 
Example 7
Project: Cobweb   File: LoginAuthReqHandler.java   View Source Code Vote up 4 votes
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
    ctx.fireChannelInactive();
}
 
Example 8
Project: Cobweb   File: LocalCrawlerHandler.java   View Source Code Vote up 4 votes
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
    ctx.fireChannelInactive();
}
 
Example 9
Project: jsf-sdk   File: TelnetCodec.java   View Source Code Vote up 4 votes
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
    historyList.clear();
    ctx.fireChannelInactive();
}
 
Example 10
Project: aws-sdk-java-v2   File: LoggingHandler.java   View Source Code Vote up 4 votes
@Override
public void channelInactive(ChannelHandlerContext ctx) {
    log(() -> format(ctx, "CHANNEL_INACTIVE"));
    ctx.fireChannelInactive();
}