/** * @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 e) throws Exception { super.channelDisconnected(ctx, e); LOG.info("Connection channelDisconnected {}", e.getChannel().getRemoteAddress()); MessageDecoder.removeTransmitHistogram(e.getChannel()); server.getChannelGroup().remove(e.getChannel()); }
channelConnected(ctx, evt); } else { channelDisconnected(ctx, evt);
@Override public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { node = null; super.channelDisconnected(ctx, e); }
@Override public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { LOG.debug("outbound disconnected"); super.channelDisconnected(ctx, e); }
@Override public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { ack(ctx, null); replIters.remove(ctx.getChannel()); super.channelDisconnected(ctx, e); }
@Override public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { super.channelDisconnected(ctx, e); logger.info("client:{} was disconnected.", ctx.getChannel().getRemoteAddress()); }
@Override public void channelDisconnected(ChannelHandlerContext c, ChannelStateEvent e) throws Exception { // Go ahead and close. I don't know why Netty doesn't close disconnected // TCP sockets, but it seems not to. e.getChannel().close(); super.channelDisconnected(c, e); }
@SuppressWarnings("rawtypes") public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { super.channelDisconnected(ctx, e); WebsocketConnector connector = (WebsocketConnector) ctx.getAttachment(); if (connector != null) { engine.onConnectionClose(connector); } }
@Override public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { logger.info("Channel {} disconnected from {}", e.getChannel(), e.getChannel().getRemoteAddress()); super.channelDisconnected(ctx, e); }
/** * 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 e) throws Exception { if (channelGroup != null) channelGroup.remove(e.getChannel()); super.channelDisconnected(ctx, e); e.getChannel().close(); }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { try (Closeable closeable = ProtocolMDCContext.from(protocol, ctx)) { List<DisconnectHandler> connectHandlers = chain.getHandlers(DisconnectHandler.class); ProtocolSession session = (ProtocolSession) ctx.getAttachment(); if (connectHandlers != null) { for (DisconnectHandler connectHandler : connectHandlers) { connectHandler.onDisconnect(session); } } super.channelDisconnected(ctx, e); } }
@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); } private List<ResponseListener> listeners=new CopyOnWriteArrayList<ResponseListener>();
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { try (Closeable closeable = ProtocolMDCContext.from(protocol, ctx)) { List<DisconnectHandler> connectHandlers = chain.getHandlers(DisconnectHandler.class); ProtocolSession session = (ProtocolSession) ctx.getAttachment(); if (connectHandlers != null) { for (DisconnectHandler connectHandler : connectHandlers) { connectHandler.onDisconnect(session); } } super.channelDisconnected(ctx, e); } }
@Override public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { super.channelDisconnected(ctx, e); LOG.info("Connection channelDisconnected {}", e.getChannel().getRemoteAddress()); MessageDecoder.removeTransmitHistogram(e.getChannel()); server.getChannelGroup().remove(e.getChannel()); };
@Override public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { Connection c = (Connection) ctx.getAttachment(); if (logger.isDebugEnabled()) logger.debug("#" + c.getId() + " disconnected"); super.channelDisconnected(ctx, e); if (c.getAttachment() != null) { ChannelBuffer cb = ChannelBuffers.buffer(2); cb.writeShort(0); GameUpBuffer disconnectEvent = new GameUpBuffer(cb, c); GameBoss.getInstance().getProcessor().process(disconnectEvent); } else { ConnectionManager.getInstance().removeConnection(c); } // XXX: You need to do this by yourself: // ConnectionManager.getInstance().removeConnection(c); // when you processed over; }
@Override public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { super.channelDisconnected(ctx, e); SocketLog.info("worker disconnect to master"); //断开连接,如果还有运行中的job,将这些job取消掉 for(String jobId:new HashSet<String>(context.getRunnings().keySet())){ context.getRunnings().get(jobId).getJobContext().getJobHistory().getLog().appendZeus("worker与master断开连接,worker主动取消该任务"); context.getClientWorker().cancelScheduleJob(jobId); } for(String debugId:new HashSet<String>(context.getDebugRunnings().keySet())){ context.getDebugRunnings().get(debugId).getJobContext().getJobHistory().getLog().appendZeus("worker与master断开连接,worker主动取消该任务"); context.getClientWorker().cancelDebugJob(debugId); } for(String historyId:new HashSet<String>(context.getManualRunnings().keySet())){ context.getManualRunnings().get(historyId).getJobContext().getJobHistory().getLog().appendZeus("worker与master断开连接,worker主动取消该任务"); context.getClientWorker().cancelManualJob(historyId); } this.context.setServerChannel(null); } private List<ResponseListener> listeners=new CopyOnWriteArrayList<ResponseListener>();