@Test public void shouldUseFixedSizeReadBufferWithSameDefaultSizeAsMina() throws Exception { DefaultNioSocketChannelIoSessionConfig config = new DefaultNioSocketChannelIoSessionConfig(); config.init(new NioSocketChannelIoAcceptor(config)); NioSocketChannelConfig channelConfig = config.getChannelConfig(); assertTrue("Should use fixed read buffer size", channelConfig.getReceiveBufferSizePredictorFactory() instanceof FixedReceiveBufferSizePredictorFactory); assertEquals("Read buffer size", DEFAULT.getReadBufferSize(), channelConfig.getReceiveBufferSizePredictorFactory().getPredictor().nextReceiveBufferSize()); }
NioSocketChannelConfig getChannelConfig() { return channelConfig; }
DefaultNioSocketChannelIoSessionConfig extends NioSocketChannelIoSessionConfig { NioSocketChannelConfig getChannelConfig() { return channelConfig; } }
DefaultNioSocketChannelIoSessionConfig extends NioSocketChannelIoSessionConfig { NioSocketChannelConfig getChannelConfig() { return channelConfig; } DefaultNioSocketChannelIoSessionConfig(); }
DefaultNioSocketChannelIoSessionConfig extends NioSocketChannelIoSessionConfig { NioSocketChannelConfig getChannelConfig() { return channelConfig; } DefaultNioSocketChannelIoSessionConfig(); @Override boolean isReuseAddress(); @Override void setReuseAddress(boolean reuseAddress); @Override int getReceiveBufferSize(); @Override void setReceiveBufferSize(int receiveBufferSize); @Override int getSendBufferSize(); @Override void setSendBufferSize(int sendBufferSize); @Override int getTrafficClass(); @Override void setTrafficClass(int trafficClass); @Override boolean isKeepAlive(); @Override void setKeepAlive(boolean keepAlive); @Override boolean isOobInline(); @Override void setOobInline(boolean oobInline); @Override int getSoLinger(); @Override void setSoLinger(int soLinger); @Override boolean isTcpNoDelay(); @Override void setTcpNoDelay(boolean tcpNoDelay); }
DefaultNioSocketChannelIoSessionConfig extends NioSocketChannelIoSessionConfig { NioSocketChannelConfig getChannelConfig() { return channelConfig; } DefaultNioSocketChannelIoSessionConfig(); @Override boolean isReuseAddress(); @Override void setReuseAddress(boolean reuseAddress); @Override int getReceiveBufferSize(); @Override void setReceiveBufferSize(int receiveBufferSize); @Override int getSendBufferSize(); @Override void setSendBufferSize(int sendBufferSize); @Override int getTrafficClass(); @Override void setTrafficClass(int trafficClass); @Override boolean isKeepAlive(); @Override void setKeepAlive(boolean keepAlive); @Override boolean isOobInline(); @Override void setOobInline(boolean oobInline); @Override int getSoLinger(); @Override void setSoLinger(int soLinger); @Override boolean isTcpNoDelay(); @Override void setTcpNoDelay(boolean tcpNoDelay);  }