@Override public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { fireChannelDisconnected(virtualChannel); }
static void disconnect(OioDatagramChannel channel, ChannelFuture future) { boolean connected = channel.isConnected(); boolean iothread = isIoThread(channel); try { channel.socket.disconnect(); future.setSuccess(); if (connected) { // Notify. if (iothread) { fireChannelDisconnected(channel); } else { fireChannelDisconnectedLater(channel); } } } catch (Throwable t) { future.setFailure(t); if (iothread) { fireExceptionCaught(channel, t); } else { fireExceptionCaughtLater(channel, t); } } } }
public void run() { fireChannelDisconnected(channel); } });
static void disconnect(NioDatagramChannel channel, ChannelFuture future) { boolean connected = channel.isConnected(); boolean iothread = isIoThread(channel); try { channel.getDatagramChannel().disconnect(); future.setSuccess(); if (connected) { if (iothread) { fireChannelDisconnected(channel); } else { fireChannelDisconnectedLater(channel); } } } catch (Throwable t) { future.setFailure(t); if (iothread) { fireExceptionCaught(channel, t); } else { fireExceptionCaughtLater(channel, t); } } }
public boolean finish() { close(channel); fireChannelDisconnected(channel); fireChannelUnbound(channel); fireChannelClosed(channel); return !productQueue.isEmpty(); }
fireChannelDisconnected(channel); } else { fireChannelDisconnectedLater(channel);
if (pairedChannel != null) { this.pairedChannel = null; fireChannelDisconnected(this); fireChannelUnbound(this); if (me != null) { pairedChannel.pairedChannel = null; fireChannelDisconnected(pairedChannel); fireChannelUnbound(pairedChannel);
if (connected) { if (iothread) { fireChannelDisconnected(channel); } else { fireChannelDisconnectedLater(channel);
@Override public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { TlsChildChannel tlsChildChannel = this.tlsChildChannel; if (tlsChildChannel != null) { this.tlsChildChannel = null; if (tlsChildChannel.setReadClosed()) { fireChannelDisconnected(tlsChildChannel); fireChannelUnbound(tlsChildChannel); fireChannelClosed(tlsChildChannel); } } }
@Override public void operationComplete(ChannelFuture future) throws Exception { if (tlsClientChannel.setWriteClosed()) { fireChannelDisconnected(tlsClientChannel); fireChannelUnbound(tlsClientChannel); fireChannelClosed(tlsClientChannel); } } };
@Override public void operationComplete(ChannelFuture future) throws Exception { if (tlsChildChannel.setWriteClosed()) { fireChannelDisconnected(tlsChildChannel); fireChannelUnbound(tlsChildChannel); fireChannelClosed(tlsChildChannel); } } };
@Override public void operationComplete(ChannelFuture future) throws Exception { if (httpChildChannel.setWriteClosed()) { fireChannelDisconnected(httpChildChannel); fireChannelUnbound(httpChildChannel); fireChannelClosed(httpChildChannel); } } });
@Override public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { TlsClientChannel tlsClientChannel = this.tlsClientChannel; if (tlsClientChannel != null) { this.tlsClientChannel = null; if (tlsClientChannel.setReadClosed()) { fireChannelDisconnected(tlsClientChannel); fireChannelUnbound(tlsClientChannel); fireChannelClosed(tlsClientChannel); } } } }
public boolean finish() { fireChannelDisconnected( channel ); fireChannelUnbound( channel ); fireChannelClosed( channel ); return !productQueue.isEmpty(); }
@Override public void operationComplete(ChannelFuture future) throws Exception { if (tlsClientChannel.setWriteClosed()) { fireOutputShutdown(tlsClientChannel); fireChannelDisconnected(tlsClientChannel); fireChannelUnbound(tlsClientChannel); fireChannelClosed(tlsClientChannel); } else { fireOutputShutdown(tlsClientChannel); } } });
@Override public void operationComplete(ChannelFuture future) throws Exception { if (tlsChildChannel.setWriteClosed()) { fireOutputShutdown(tlsChildChannel); fireChannelDisconnected(tlsChildChannel); fireChannelUnbound(tlsChildChannel); fireChannelClosed(tlsChildChannel); } else { fireOutputShutdown(tlsChildChannel); } } });
@Override public void inputShutdown(ChannelHandlerContext ctx, ShutdownInputEvent e) { TlsChildChannel tlsChildChannel = this.tlsChildChannel; if (tlsChildChannel != null) { if (tlsChildChannel.setReadClosed()) { fireInputShutdown(tlsChildChannel); fireChannelDisconnected(tlsChildChannel); fireChannelUnbound(tlsChildChannel); fireChannelClosed(tlsChildChannel); } else { fireInputShutdown(tlsChildChannel); } } }
@Override public void operationComplete(ChannelFuture future) throws Exception { if (tlsChildChannel.setReadClosed()) { fireInputShutdown(tlsChildChannel); fireChannelDisconnected(tlsChildChannel); fireChannelUnbound(tlsChildChannel); fireChannelClosed(tlsChildChannel); } else { fireInputShutdown(tlsChildChannel); } } });
@Override protected void closeRequested(ChannelPipeline pipeline, ChannelStateEvent evt) throws Exception { UdpServerChannel serverChannel = (UdpServerChannel) evt.getChannel(); // Close underlying NioDatagramChannel serverChannel.getTransport().close(); // setClosed() (but *not* evt.getFuture().setSuccess()) triggers the ChannelFuture's success serverChannel.setClosed(); fireChannelDisconnected(serverChannel); fireChannelUnbound(serverChannel); fireChannelClosed(serverChannel); }
@Override protected void closeRequested(ChannelPipeline pipeline, ChannelStateEvent evt) throws Exception { final UdpChildChannel channel = (UdpChildChannel) evt.getChannel(); if (channel.isConnected()) { childChannelSource.closeChildChannel(channel); } if (channel.setClosed()) { fireChannelDisconnected(channel); fireChannelUnbound(channel); fireChannelClosed(channel); } evt.getFuture().setSuccess(); }