@Override public void channelUnbound(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { fireChannelUnbound(virtualChannel); }
fireChannelUnbound(channel); } else { fireChannelUnboundLater(channel);
public void run() { fireChannelUnbound(channel); } });
fireChannelUnbound(channel); } else { fireChannelUnboundLater(channel);
public boolean finish() { close(channel); fireChannelDisconnected(channel); fireChannelUnbound(channel); fireChannelClosed(channel); return !productQueue.isEmpty(); }
private static void close(OioServerSocketChannel channel, ChannelFuture future) { boolean bound = channel.isBound(); try { channel.socket.close(); // Make sure the boss thread is not running so that that the future // is notified after a new connection cannot be accepted anymore. // See NETTY-256 for more information. channel.shutdownLock.lock(); try { if (channel.setClosed()) { future.setSuccess(); if (bound) { fireChannelUnbound(channel); } fireChannelClosed(channel); } else { future.setSuccess(); } } finally { channel.shutdownLock.unlock(); } } catch (Throwable t) { future.setFailure(t); fireExceptionCaught(channel, t); } }
private static void close(DefaultLocalServerChannel channel, ChannelFuture future) { try { if (channel.setClosed()) { future.setSuccess(); LocalAddress localAddress = channel.localAddress; if (channel.bound.compareAndSet(true, false)) { channel.localAddress = null; LocalChannelRegistry.unregister(localAddress); fireChannelUnbound(channel); } fireChannelClosed(channel); } else { future.setSuccess(); } } catch (Throwable t) { future.setFailure(t); fireExceptionCaught(channel, t); } } }
this.pairedChannel = null; fireChannelDisconnected(this); fireChannelUnbound(this); pairedChannel.pairedChannel = null; fireChannelDisconnected(pairedChannel); fireChannelUnbound(pairedChannel);
void close(NioServerSocketChannel channel, ChannelFuture future) { boolean bound = channel.isBound(); try { channel.socket.close(); increaseCancelledKeys(); if (channel.setClosed()) { future.setSuccess(); if (bound) { fireChannelUnbound(channel); } fireChannelClosed(channel); } else { future.setSuccess(); } } catch (Throwable t) { future.setFailure(t); fireExceptionCaught(channel, t); } }
private static void close(NioDatagramChannel channel, ChannelFuture future) { try { channel.getDatagramChannel().socket().close(); if (channel.setClosed()) { future.setSuccess(); if (channel.isBound()) { fireChannelUnbound(channel); } fireChannelClosed(channel); } else { future.setSuccess(); } } catch (final Throwable t) { future.setFailure(t); fireExceptionCaught(channel, t); } }
@Override public void run() { fireChannelUnbound(serverChannel); unbindFuture.setSuccess(); }
@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); } } });
private static void handleTlsTransportUnbindComplete( TlsServerChannel tlsUnbindChannel, ChannelFuture tlsUnbindFuture, ChannelFuture unbindFuture) { if (unbindFuture.isSuccess()) { fireChannelUnbound(tlsUnbindChannel); tlsUnbindFuture.setSuccess(); } else { tlsUnbindFuture.setFailure(unbindFuture.getCause()); } }
@Override public void run() { serverChannel.setClosed(); fireChannelUnbound(serverChannel); fireChannelClosed(serverChannel); serverChannel.getCloseFuture().setSuccess(); }
private static void handleHttpTransportUnbindComplete( HttpServerChannel httpUnbindChannel, ChannelFuture httpUnbindFuture, ChannelFuture unbindFuture) { if (unbindFuture.isSuccess()) { fireChannelUnbound(httpUnbindChannel); httpUnbindFuture.setSuccess(); } else { httpUnbindFuture.setFailure(unbindFuture.getCause()); } }
public boolean finish() { fireChannelDisconnected( channel ); fireChannelUnbound( channel ); fireChannelClosed( channel ); return !productQueue.isEmpty(); }
@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); }