@Test public void testSetOptionWhenClosed() { ch.close().syncUninterruptibly(); try { ch.config().setSoLinger(0); fail(); } catch (ChannelException e) { assertTrue(e.getCause() instanceof ClosedChannelException); } }
@Override public EpollSocketChannelConfig setSoLinger(int soLinger) { try { channel.socket.setSoLinger(soLinger); return this; } catch (IOException e) { throw new ChannelException(e); } }
EpollSocketChannelConfig extends EpollChannelConfig implements SocketChannelConfig { @Override public EpollSocketChannelConfig setSoLinger(int soLinger) { try { channel.socket.setSoLinger(soLinger); return this; } catch (IOException e) { throw new ChannelException(e); } } }
EpollSocketChannelConfig extends EpollChannelConfig implements SocketChannelConfig { @Override public EpollSocketChannelConfig setSoLinger(int soLinger) { try { channel.socket.setSoLinger(soLinger); return this; } catch (IOException e) { throw new ChannelException(e); } } EpollSocketChannelConfig(EpollSocketChannel channel); }
EpollSocketChannelConfig extends EpollChannelConfig implements SocketChannelConfig { @Override public EpollSocketChannelConfig setSoLinger(int soLinger) { try { channel.socket.setSoLinger(soLinger); return this; } catch (IOException e) { throw new ChannelException(e); } } EpollSocketChannelConfig(EpollSocketChannel channel); @Override Map<ChannelOption<?>, Object> getOptions(); @SuppressWarnings("unchecked") @Override T getOption(ChannelOption<T> option); @Override boolean setOption(ChannelOption<T> option, T value); @Override int getReceiveBufferSize(); @Override int getSendBufferSize(); @Override int getSoLinger(); @Override int getTrafficClass(); @Override boolean isKeepAlive(); @Override boolean isReuseAddress(); @Override boolean isTcpNoDelay(); boolean isTcpCork(); long getTcpNotSentLowAt(); int getTcpKeepIdle(); int getTcpKeepIntvl(); int getTcpKeepCnt(); int getTcpUserTimeout(); @Override EpollSocketChannelConfig setKeepAlive(boolean keepAlive); @Override EpollSocketChannelConfig setPerformancePreferences(
            int connectionTime, int latency, int bandwidth); @Override EpollSocketChannelConfig setReceiveBufferSize(int receiveBufferSize); @Override EpollSocketChannelConfig setReuseAddress(boolean reuseAddress); @Override EpollSocketChannelConfig setSendBufferSize(int sendBufferSize); @Override EpollSocketChannelConfig setSoLinger(int soLinger); @Override EpollSocketChannelConfig setTcpNoDelay(boolean tcpNoDelay); EpollSocketChannelConfig setTcpCork(boolean tcpCork); EpollSocketChannelConfig setTcpNotSentLowAt(long tcpNotSentLowAt); @Override EpollSocketChannelConfig setTrafficClass(int trafficClass); EpollSocketChannelConfig setTcpKeepIdle(int seconds); EpollSocketChannelConfig setTcpKeepIntvl(int seconds); @Deprecated EpollSocketChannelConfig setTcpKeepCntl(int probes); EpollSocketChannelConfig setTcpKeepCnt(int probes); EpollSocketChannelConfig setTcpUserTimeout(int milliseconds); boolean isIpTransparent(); EpollSocketChannelConfig setIpTransparent(boolean transparent); EpollSocketChannelConfig setTcpMd5Sig(Map<InetAddress, byte[]> keys); EpollSocketChannelConfig setTcpQuickAck(boolean quickAck); boolean isTcpQuickAck(); EpollSocketChannelConfig setTcpFastOpenConnect(boolean fastOpenConnect); boolean isTcpFastOpenConnect(); @Override boolean isAllowHalfClosure(); @Override EpollSocketChannelConfig setAllowHalfClosure(boolean allowHalfClosure); @Override EpollSocketChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis); @Override @Deprecated EpollSocketChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead); @Override EpollSocketChannelConfig setWriteSpinCount(int writeSpinCount); @Override EpollSocketChannelConfig setAllocator(ByteBufAllocator allocator); @Override EpollSocketChannelConfig setRecvByteBufAllocator(RecvByteBufAllocator allocator); @Override EpollSocketChannelConfig setAutoRead(boolean autoRead); @Override EpollSocketChannelConfig setAutoClose(boolean autoClose); @Override @Deprecated EpollSocketChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark); @Override @Deprecated EpollSocketChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark); @Override EpollSocketChannelConfig setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark); @Override EpollSocketChannelConfig setMessageSizeEstimator(MessageSizeEstimator estimator); @Override EpollSocketChannelConfig setEpollMode(EpollMode mode); }
EpollSocketChannelConfig extends EpollChannelConfig implements SocketChannelConfig { @Override public EpollSocketChannelConfig setSoLinger(int soLinger) { try { channel.socket.setSoLinger(soLinger); return this; } catch (IOException e) { throw new ChannelException(e); } } EpollSocketChannelConfig(EpollSocketChannel channel); @Override Map<ChannelOption<?>, Object> getOptions(); @SuppressWarnings("unchecked") @Override T getOption(ChannelOption<T> option); @Override boolean setOption(ChannelOption<T> option, T value); @Override int getReceiveBufferSize(); @Override int getSendBufferSize(); @Override int getSoLinger(); @Override int getTrafficClass(); @Override boolean isKeepAlive(); @Override boolean isReuseAddress(); @Override boolean isTcpNoDelay(); boolean isTcpCork(); long getTcpNotSentLowAt(); int getTcpKeepIdle(); int getTcpKeepIntvl(); int getTcpKeepCnt(); int getTcpUserTimeout(); @Override EpollSocketChannelConfig setKeepAlive(boolean keepAlive); @Override EpollSocketChannelConfig setPerformancePreferences(
            int connectionTime, int latency, int bandwidth); @Override EpollSocketChannelConfig setReceiveBufferSize(int receiveBufferSize); @Override EpollSocketChannelConfig setReuseAddress(boolean reuseAddress); @Override EpollSocketChannelConfig setSendBufferSize(int sendBufferSize); @Override EpollSocketChannelConfig setSoLinger(int soLinger); @Override EpollSocketChannelConfig setTcpNoDelay(boolean tcpNoDelay); EpollSocketChannelConfig setTcpCork(boolean tcpCork); EpollSocketChannelConfig setTcpNotSentLowAt(long tcpNotSentLowAt); @Override EpollSocketChannelConfig setTrafficClass(int trafficClass); EpollSocketChannelConfig setTcpKeepIdle(int seconds); EpollSocketChannelConfig setTcpKeepIntvl(int seconds); @Deprecated EpollSocketChannelConfig setTcpKeepCntl(int probes); EpollSocketChannelConfig setTcpKeepCnt(int probes); EpollSocketChannelConfig setTcpUserTimeout(int milliseconds); boolean isIpTransparent(); EpollSocketChannelConfig setIpTransparent(boolean transparent); EpollSocketChannelConfig setTcpMd5Sig(Map<InetAddress, byte[]> keys); EpollSocketChannelConfig setTcpQuickAck(boolean quickAck); boolean isTcpQuickAck(); EpollSocketChannelConfig setTcpFastOpenConnect(boolean fastOpenConnect); boolean isTcpFastOpenConnect(); @Override boolean isAllowHalfClosure(); @Override EpollSocketChannelConfig setAllowHalfClosure(boolean allowHalfClosure); @Override EpollSocketChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis); @Override @Deprecated EpollSocketChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead); @Override EpollSocketChannelConfig setWriteSpinCount(int writeSpinCount); @Override EpollSocketChannelConfig setAllocator(ByteBufAllocator allocator); @Override EpollSocketChannelConfig setRecvByteBufAllocator(RecvByteBufAllocator allocator); @Override EpollSocketChannelConfig setAutoRead(boolean autoRead); @Override EpollSocketChannelConfig setAutoClose(boolean autoClose); @Override @Deprecated EpollSocketChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark); @Override @Deprecated EpollSocketChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark); @Override EpollSocketChannelConfig setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark); @Override EpollSocketChannelConfig setMessageSizeEstimator(MessageSizeEstimator estimator); @Override EpollSocketChannelConfig setEpollMode(EpollMode mode);  }