List of usage examples for io.netty.channel.group ChannelGroupFuture iterator
@Override Iterator<ChannelFuture> iterator();
From source file:com.github.mrstampy.gameboot.netty.NettyConnectionRegistry.java
License:Open Source License
private void log(ChannelGroupFuture e, String groupName) { e.iterator().forEachRemaining(cf -> log(cf, groupName)); }
From source file:com.linkedin.mitm.proxy.ProxyServer.java
License:Open Source License
/** * Stop proxy server/*from w ww . ja va 2 s .c om*/ * */ public void stop() { ChannelGroupFuture future = _allChannels.close().awaitUninterruptibly(); if (!future.isSuccess()) { final Iterator<ChannelFuture> iter = future.iterator(); while (iter.hasNext()) { final ChannelFuture cf = iter.next(); if (!cf.isSuccess()) { LOG.warn(String.format("Failed to close channel %s because %s", cf.channel(), cf.cause())); } } } _acceptorGroup.shutdownGracefully(); _upstreamWorkerGroup.shutdownGracefully(); _downstreamWorkerGroup.shutdownGracefully(); }