boolean active = isActive(); if (strValActive == active && strVal != null) { return strVal; SocketAddress remoteAddr = remoteAddress(); SocketAddress localAddr = localAddress(); if (remoteAddr != null) { StringBuilder buf = new StringBuilder(96)
@Override public LocalServerChannel parent() { return (LocalServerChannel) super.parent(); }
@Override public final ChannelFuture close(ChannelPromise promise) { // We need to call runPendingTasks() before calling super.close() as there may be something in the queue // that needs to be run before the actual close takes place. runPendingTasks(); ChannelFuture future = super.close(promise); // Now finish everything else and cancel all scheduled tasks that were not ready set. finishPendingTasks(true); return future; }
@Override public final void beginRead() { assertEventLoop(); if (!isActive()) { return; } try { doBeginRead(); } catch (final Exception e) { invokeLater(new Runnable() { @Override public void run() { pipeline.fireExceptionCaught(e); } }); close(voidPromise()); } }
if (Boolean.TRUE.equals(config().getOption(ChannelOption.SO_BROADCAST)) && localAddress instanceof InetSocketAddress && !((InetSocketAddress) localAddress).getAddress().isAnyLocalAddress() && boolean wasActive = isActive(); try { doBind(localAddress); } catch (Throwable t) { safeSetFailure(promise, t); if (!wasActive && isActive()) { invokeLater(new Runnable() { @Override
doRegister(); neverRegistered = false; registered = true; if (isActive()) { if (firstRegistration) { pipeline.fireChannelActive(); } else if (config().isAutoRead()) {
@Override public LocalAddress remoteAddress() { return (LocalAddress) super.remoteAddress(); }
@Override public Unsafe unsafe() { return ((EmbeddedUnsafe) super.unsafe()).wrapped; }
@Override public LocalAddress localAddress() { return (LocalAddress) super.localAddress(); }
/** * Called when conditions justify shutting down the output portion of the channel. This may happen if a write * operation throws an exception. */ @UnstableApi protected void doShutdownOutput() throws Exception { doClose(); }
@Override public ByteBufAllocator alloc() { return config().getAllocator(); }
@Override public final ChannelFuture disconnect(ChannelPromise promise) { ChannelFuture future = super.disconnect(promise); finishPendingTasks(!metadata.hasDisconnect()); return future; }
if (Boolean.TRUE.equals(config().getOption(ChannelOption.SO_BROADCAST)) && localAddress instanceof InetSocketAddress && !((InetSocketAddress) localAddress).getAddress().isAnyLocalAddress() && boolean wasActive = isActive(); try { doBind(localAddress); } catch (Throwable t) { safeSetFailure(promise, t); if (!wasActive && isActive()) { invokeLater(new Runnable() { @Override
doRegister(); neverRegistered = false; registered = true; if (isActive()) { if (firstRegistration) { pipeline.fireChannelActive(); } else if (config().isAutoRead()) {
@Override public LocalAddress remoteAddress() { return (LocalAddress) super.remoteAddress(); }
@Override public final void beginRead() { assertEventLoop(); if (!isActive()) { return; } try { doBeginRead(); } catch (final Exception e) { invokeLater(new Runnable() { @Override public void run() { pipeline.fireExceptionCaught(e); } }); close(voidPromise()); } }
@Override public NioUnsafe unsafe() { return (NioUnsafe) super.unsafe(); }
@Override public LocalAddress localAddress() { return (LocalAddress) super.localAddress(); }