io.netty.channel.ChannelHandlerContext#fireChannelInactive ( )源码实例Demo

下面列出了io.netty.channel.ChannelHandlerContext#fireChannelInactive ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: openAGV   文件: ServerConnectionStateNotifier.java
@Override
public void channelInactive(ChannelHandlerContext ctx) {
    if (connectionEventListener != null) {
        LOG.debug("Disconnecting channel for key: '{}'.", key);
        ClientEntry entry = clientEntries.get(key);
        if (entry != null) {
            entry.setChannel(null);
        }
        connectionEventListener.onDisconnect();
    }
    ctx.fireChannelInactive();
}
 
源代码2 项目: netty-4.1.22   文件: SpdySessionHandler.java
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
    for (Integer streamId: spdySession.activeStreams().keySet()) {
        removeStream(streamId, ctx.newSucceededFuture());
    }
    ctx.fireChannelInactive();
}
 
@Override
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
  if (evt instanceof IdleStateEvent) {
    IdleState state = ((IdleStateEvent) evt).state();
    if (state == IdleState.ALL_IDLE) {
      //fire a channelInactive to trigger publish of Will
      ctx.fireChannelInactive();
      ctx.close();
    } /*else if (e.getState() == IdleState.WRITER_IDLE) {
        ctx.writeAndFlush(new PingMessage());
    }*/
  }
}
 
源代码4 项目: sctalk   文件: MessageServerHandler.java
/**
 * 服务端监听到客户端不活动
 * 
 * @param ctx 连接context
 * @throws Exception
 */
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
    // 服务端接收到客户端掉线通知
    Channel incoming = ctx.channel();
    logger.debug("MessageServerHandler:" + incoming.remoteAddress() + "掉线");
    handlerManager.offline(ctx);
    ctx.fireChannelInactive();
}
 
源代码5 项目: SynchronizeFX   文件: NetworkEventHandlerClient.java
@Override
public void channelInactive(final ChannelHandlerContext ctx) throws Exception {
    if (!clientInitiatedClose) {
        callback.onServerDisconnect();
    }
    LOG.info("Connection to the server is closed now.");
    ctx.fireChannelInactive();
}
 
源代码6 项目: LuckyFrameClient   文件: ClientHandler.java
@Override
public void channelInactive(ChannelHandlerContext ctx) {
    log.info("�����ѶϿ������ڳ�������...");
    //ʹ�ù����ж�������
    final EventLoop eventLoop = ctx.channel().eventLoop();
    eventLoop.schedule(() -> {
        try {
            NettyClient.start();
        } catch (Exception e) {
            log.error("���ӳ����쳣�����ڳ�������...",e);
        }
    }, 1, TimeUnit.SECONDS);

    ctx.fireChannelInactive();
}
 
源代码7 项目: sctalk   文件: ClientMessageClientHandler.java
/**
 * 服务端监听到客户端不活动
 * 
 * @param ctx 连接context
 * @throws Exception
 */
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
    // 服务端接收到客户端掉线通知
    Channel incoming = ctx.channel();
    logger.debug("MessageServerHandler:" + incoming.remoteAddress() + "掉线");
    ctx.fireChannelInactive();
}
 
源代码8 项目: journalkeeper   文件: ExceptionChannelHandler.java
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
    ctx.fireChannelInactive();
}
 
源代码9 项目: xio   文件: ChannelStatistics.java
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
  channelCount.decrementAndGet();
  allChannels.remove(ctx.channel());
  ctx.fireChannelInactive();
}
 
源代码10 项目: riiablo   文件: EndpointedChannelHandler.java
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
  if (DEBUG_CALLS) Gdx.app.debug(TAG, "channelInactive");
  ctx.fireChannelInactive();
}
 
@Override
public void channelInactive(final ChannelHandlerContext ctx) throws Exception {
    LOGGER.debug(logIdent(ctx, endpoint) + "Channel Inactive.");
    endpoint.notifyChannelInactive();
    ctx.fireChannelInactive();
}
 
源代码12 项目: xio   文件: XioResponseClassifier.java
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
  ctx.fireChannelInactive();
}
 
源代码13 项目: netty4.0.27Learn   文件: ChunkedWriteHandler.java
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
    doFlush(ctx);
    ctx.fireChannelInactive();
}
 
源代码14 项目: jawampa   文件: WampClientWebsocketHandler.java
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
    ctx.fireChannelInactive();
}
 
源代码15 项目: spring-boot-netty   文件: ExceptionHandlerFilter.java
@Override
public void channelInactive(final ChannelHandlerContext ctx) throws Exception {
    ctx.fireChannelInactive();
}
 
源代码16 项目: GreenBits   文件: WampServerWebsocketHandler.java
@Override
public void channelInactive(ChannelHandlerContext ctx) {
    readState = ReadState.Closed;
    ctx.fireChannelInactive();
}
 
源代码17 项目: aws-sdk-java-v2   文件: Http2PingHandler.java
@Override
public void channelInactive(ChannelHandlerContext ctx) {
    stop();
    ctx.fireChannelInactive();
}
 
源代码18 项目: brpc-java   文件: RpcServerHandler.java
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
    ChannelManager.getInstance().removeChannel(ctx.channel());
    ctx.fireChannelInactive();
}
 
源代码19 项目: xrpc   文件: ServiceRateLimiter.java
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
  ctx.fireChannelInactive();

  timerMap.remove(ctx).stop();
}
 
源代码20 项目: bazel   文件: AbstractHttpHandler.java
@Override
public void channelInactive(ChannelHandlerContext ctx) {
  failAndResetUserPromise(new ClosedChannelException());
  ctx.fireChannelInactive();
}