/**
  * called upon disconnect from the server.
  *
  * @param ctx the channel context
  * @param channelStateEvent the channel disconnect event
  * @throws Exception an exception
  */
 @Override
 public final void channelDisconnected(
     final ChannelHandlerContext ctx, final ChannelStateEvent channelStateEvent)
     throws Exception { // NOPMD
   super.channelDisconnected(ctx, channelStateEvent);
   shutdown();
 }
  /**
   * Attention please,
   *
   * @see
   *     org.jboss.netty.channel.SimpleChannelUpstreamHandler#channelDisconnected(org.jboss.netty.channel.ChannelHandlerContext,
   *     org.jboss.netty.channel.ChannelStateEvent)
   */
  @Override
  public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
    LOG.info(
        "Receive channelDisconnected to {}, channel = {}", client.getRemoteAddr(), e.getChannel());
    // ctx.sendUpstream(e);
    super.channelDisconnected(ctx, e);

    client.disconnectChannel(e.getChannel());
  }
 @Override
 public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent evt)
     throws Exception {
   // Clear the map for this context
   try {
     Logs.extreme()
         .debug(
             "Removing data map on channel disconnected event for channel: "
                 + ctx.getChannel().getId());
     dataMap.remove(ctx.getChannel());
   } catch (final Throwable f) {
     // Nothing to lookup.
   } finally {
     // Call through
     super.channelDisconnected(ctx, evt);
   }
 }
Beispiel #4
0
 @Override
 public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
   SocketLog.info("worker disconnect :" + ctx.getChannel().getRemoteAddress().toString());
   context.getMaster().workerDisconnectProcess(ctx.getChannel());
   super.channelDisconnected(ctx, e);
 }