コード例 #1
0
 @Override
 public void channelInactive(ChannelHandlerContext ctx) throws Exception {
   for (Integer streamId : spdySession.activeStreams().keySet()) {
     removeStream(streamId, ctx.newSucceededFuture());
   }
   ctx.fireChannelInactive();
 }
コード例 #2
0
 @Override
 public void channelInactive(ChannelHandlerContext ctx) throws Exception {
   if (isRemote(ctx)) {
     broker.removeLocalSession(routeId);
   }
   ctx.fireChannelInactive();
 }
コード例 #3
0
ファイル: NettyHttpServer.java プロジェクト: huntc/trireme
 @Override
 public void channelInactive(ChannelHandlerContext ctx) throws Exception {
   if (log.isDebugEnabled()) {
     log.debug("Closed server-side connection {}", ctx.channel());
   }
   stub.onClose(curRequest, curResponse);
   ctx.fireChannelInactive();
 }
コード例 #4
0
 @Override
 public void channelInactive(ChannelHandlerContext ctx) throws Exception {
   if (reconnect) {
     if (attempts < 8) attempts++;
     int timeout = 2 << attempts;
     timer.newTimeout(this, timeout, TimeUnit.MILLISECONDS);
   }
   ctx.fireChannelInactive();
 }
コード例 #5
0
 @Override
 public void channelInactive(ChannelHandlerContext ctx) throws Exception {
   RedisConnection connection = RedisConnection.getFrom(ctx.channel());
   if (!connection.isClosed()) {
     EventLoopGroup group = ctx.channel().eventLoop().parent();
     reconnect(group, connection);
   }
   ctx.fireChannelInactive();
 }
コード例 #6
0
 @Override
 public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
   if (evt instanceof IdleStateEvent) {
     IdleState e = ((IdleStateEvent) evt).state();
     if (e == 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());
       }*/
   }
 }
コード例 #7
0
  @Override
  public void channelInactive(final ChannelHandlerContext remoteChannelCtx) throws Exception {
    LoggerUtil.debug(
        logger,
        uaChannel.attr(ApnProxyConnectionAttribute.ATTRIBUTE_KEY),
        "Remote channel inactive");

    final String remoteAddr =
        uaChannel.attr(ApnProxyConnectionAttribute.ATTRIBUTE_KEY).get().getRemote().getRemoteAddr();

    remoteChannelInactiveCallback.remoteChannelInactive(uaChannel, remoteAddr);

    remoteChannelCtx.fireChannelInactive();
  }
コード例 #8
0
ファイル: SslHandler.java プロジェクト: zoopnin/netty
  @Override
  public void channelInactive(ChannelHandlerContext ctx) throws Exception {
    // Make sure the handshake future is notified when a connection has
    // been closed during handshake.
    setHandshakeFailure(null);

    try {
      inboundBufferUpdated(ctx);
    } finally {
      engine.closeOutbound();
      try {
        engine.closeInbound();
      } catch (SSLException ex) {
        if (logger.isDebugEnabled()) {
          logger.debug("Failed to clean up SSLEngine.", ex);
        }
      }
      ctx.fireChannelInactive();
    }
  }
コード例 #9
0
 @Override
 public void channelInactive(final ChannelHandlerContext ctx) throws Exception {
   LOGGER.debug(logIdent(ctx, endpoint) + "Channel Inactive.");
   endpoint.notifyChannelInactive();
   ctx.fireChannelInactive();
 }
コード例 #10
0
 @Override
 public void channelInactive(ChannelHandlerContext ctx) throws Exception {
   failPendingResponses(ClosedSessionException.INSTANCE);
   ctx.fireChannelInactive();
 }