public ChannelFuture joinGroup(InetAddress multicastAddress) { try { return joinGroup( multicastAddress, NetworkInterface.getByInetAddress(getLocalAddress().getAddress()), null); } catch (SocketException e) { return failedFuture(this, e); } }
public ChannelFuture leaveGroup(InetAddress multicastAddress) { try { return leaveGroup( multicastAddress, NetworkInterface.getByInetAddress(getLocalAddress().getAddress()), null); } catch (SocketException e) { return failedFuture(this, e); } }
public ChannelFuture joinGroup(InetAddress multicastAddress) { ensureBound(); try { socket.joinGroup(multicastAddress); return succeededFuture(this); } catch (IOException e) { return failedFuture(this, e); } }
public ChannelFuture joinGroup( InetSocketAddress multicastAddress, NetworkInterface networkInterface) { ensureBound(); try { socket.joinGroup(multicastAddress, networkInterface); return succeededFuture(this); } catch (IOException e) { return failedFuture(this, e); } }
private ChannelFuture writeLastChunk() { if (!requestHeaderWritten) { return failedFuture(this, new NotYetConnectedException()); } else { return realChannel.write(HttpChunk.LAST_CHUNK); } }
public ChannelFuture leaveGroup(InetAddress multicastAddress) { try { socket.leaveGroup(multicastAddress); return succeededFuture(this); } catch (IOException e) { return failedFuture(this, e); } }
public ChannelFuture leaveGroup( InetSocketAddress multicastAddress, NetworkInterface networkInterface) { try { socket.leaveGroup(multicastAddress, networkInterface); return succeededFuture(this); } catch (IOException e) { return failedFuture(this, e); } }
/** * Block the given sourceToBlock address for the given multicastAddress * */ public ChannelFuture block(InetAddress multicastAddress, InetAddress sourceToBlock) { try { block(multicastAddress, NetworkInterface.getByInetAddress(getLocalAddress().getAddress()), sourceToBlock); } catch (SocketException e) { return failedFuture(this, e); } return succeededFuture(this); }
public ChannelFuture execute(ChannelPipeline pipeline, Runnable task) { if (logger.isWarnEnabled()) { logger.warn("Not attached yet; rejecting: " + task); } return Channels.failedFuture(pipeline.getChannel(), new RejectedExecutionException("Not attached yet")); } }
/** * This implementation just directly call {@link Runnable#run()}. * Sub-classes should override this if they can handle it in a better way */ public ChannelFuture execute(ChannelPipeline pipeline, Runnable task) { try { task.run(); return succeededFuture(pipeline.getChannel()); } catch (Throwable t) { return failedFuture(pipeline.getChannel(), t); } } }
return failedFuture(this, e);
key.block(sourceToBlock); } catch (IOException e) { return failedFuture(this, e);
/** * Sends an SSL {@code close_notify} message to the specified channel and * destroys the underlying {@link SSLEngine}. */ public ChannelFuture close() { ChannelHandlerContext ctx = this.ctx; Channel channel = ctx.getChannel(); try { engine.closeOutbound(); return wrapNonAppData(ctx, channel); } catch (SSLException e) { fireExceptionCaught(ctx, e); if (closeOnSslException) { Channels.close(ctx, future(channel)); } return failedFuture(channel, e); } }
handshakeFuture = this.handshakeFuture = failedFuture(channel, e); exception = e;
future = Channels.failedFuture( ctx.getChannel(), ZlibUtil.exception(z, "compression failure", resultCode));
public ChannelFuture joinGroup(InetAddress multicastAddress) { try { return joinGroup( multicastAddress, NetworkInterface.getByInetAddress(getLocalAddress().getAddress()), null); } catch (SocketException e) { return failedFuture(this, e); } }
public ChannelFuture leaveGroup(InetAddress multicastAddress) { try { return leaveGroup( multicastAddress, NetworkInterface.getByInetAddress(getLocalAddress().getAddress()), null); } catch (SocketException e) { return failedFuture(this, e); } }
/** * Block the given sourceToBlock address for the given multicastAddress * */ public ChannelFuture block(InetAddress multicastAddress, InetAddress sourceToBlock) { try { block(multicastAddress, NetworkInterface.getByInetAddress(getLocalAddress().getAddress()), sourceToBlock); } catch (SocketException e) { return failedFuture(this, e); } return succeededFuture(this); }
/** * Block the given sourceToBlock address for the given multicastAddress * */ public ChannelFuture block(InetAddress multicastAddress, InetAddress sourceToBlock) { try { block(multicastAddress, NetworkInterface.getByInetAddress(getLocalAddress().getAddress()), sourceToBlock); } catch (SocketException e) { return failedFuture(this, e); } return succeededFuture(this); }
public ChannelFuture execute(ChannelPipeline pipeline, Runnable task) { try { task.run(); return Channels.succeededFuture(pipeline.getChannel()); } catch (Throwable t) { return Channels.failedFuture(pipeline.getChannel(), t); } } }