org.jboss.netty.channel.socket.nio

## Interface NioSocketChannelConfig

- All Superinterfaces:
    ChannelConfig, NioChannelConfig, SocketChannelConfig

      public interface NioSocketChannelConfig
      extends SocketChannelConfig, NioChannelConfig

  A `SocketChannelConfig` for a NIO TCP/IP `SocketChannel`.

  ### Available options

  In addition to the options provided by `ChannelConfig` and `SocketChannelConfig`, `NioSocketChannelConfig` allows the following options in the option map:

  Name | Associated setter method
  --- | ---
  `"writeBufferHighWaterMark"` | `NioChannelConfig.setWriteBufferHighWaterMark(int)`
  `"writeBufferLowWaterMark"` | `NioChannelConfig.setWriteBufferLowWaterMark(int)`
  `"writeSpinCount"` | `NioChannelConfig.setWriteSpinCount(int)`
  `"receiveBufferSizePredictor"` | `setReceiveBufferSizePredictor(ReceiveBufferSizePredictor)`
  `"receiveBufferSizePredictorFactory"` | `setReceiveBufferSizePredictorFactory(ReceiveBufferSizePredictorFactory)`

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ReceiveBufferSizePredictor` | `getReceiveBufferSizePredictor()` Returns the `ReceiveBufferSizePredictor` which predicts the number of readable bytes in the socket receive buffer.
    `ReceiveBufferSizePredictorFactory` | `getReceiveBufferSizePredictorFactory()` Returns the `ReceiveBufferSizePredictorFactory` which creates a new `ReceiveBufferSizePredictor` when a new channel is created and no `ReceiveBufferSizePredictor` was set.
    `void` | `setReceiveBufferSizePredictor(ReceiveBufferSizePredictor predictor)` Sets the `ReceiveBufferSizePredictor` which predicts the number of readable bytes in the socket receive buffer.
    `void` | `setReceiveBufferSizePredictorFactory(ReceiveBufferSizePredictorFactory predictorFactory)` Sets the `ReceiveBufferSizePredictor` which creates a new `ReceiveBufferSizePredictor` when a new channel is created and no `ReceiveBufferSizePredictor` was set.

    - ### Methods inherited from interface org.jboss.netty.channel.socket.SocketChannelConfig

      `getReceiveBufferSize, getSendBufferSize, getSoLinger, getTrafficClass, isKeepAlive, isReuseAddress, isTcpNoDelay, setKeepAlive, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSoLinger, setTcpNoDelay, setTrafficClass`

    - ### Methods inherited from interface org.jboss.netty.channel.socket.nio.NioChannelConfig

      `getWriteBufferHighWaterMark, getWriteBufferLowWaterMark, getWriteSpinCount, setWriteBufferHighWaterMark, setWriteBufferLowWaterMark, setWriteSpinCount`

    - ### Methods inherited from interface org.jboss.netty.channel.ChannelConfig

      `getBufferFactory, getConnectTimeoutMillis, getPipelineFactory, setBufferFactory, setConnectTimeoutMillis, setOption, setOptions, setPipelineFactory`

- - ### Method Detail

    - #### getReceiveBufferSizePredictor

          ReceiveBufferSizePredictor getReceiveBufferSizePredictor()

      Returns the `ReceiveBufferSizePredictor` which predicts the number of readable bytes in the socket receive buffer. The default predictor is ``AdaptiveReceiveBufferSizePredictor`(64, 1024, 65536)`.

    - #### setReceiveBufferSizePredictor

          void setReceiveBufferSizePredictor(ReceiveBufferSizePredictor predictor)

      Sets the `ReceiveBufferSizePredictor` which predicts the number of readable bytes in the socket receive buffer. The default predictor is ``AdaptiveReceiveBufferSizePredictor`(64, 1024, 65536)`.

    - #### getReceiveBufferSizePredictorFactory

          ReceiveBufferSizePredictorFactory getReceiveBufferSizePredictorFactory()

      Returns the `ReceiveBufferSizePredictorFactory` which creates a new `ReceiveBufferSizePredictor` when a new channel is created and no `ReceiveBufferSizePredictor` was set. If no predictor was set for the channel, `setReceiveBufferSizePredictor(ReceiveBufferSizePredictor)` will be called with the new predictor. The default factory is ``AdaptiveReceiveBufferSizePredictorFactory`(64, 1024, 65536)`.

    - #### setReceiveBufferSizePredictorFactory

          void setReceiveBufferSizePredictorFactory(ReceiveBufferSizePredictorFactory predictorFactory)

      Sets the `ReceiveBufferSizePredictor` which creates a new `ReceiveBufferSizePredictor` when a new channel is created and no `ReceiveBufferSizePredictor` was set. If no predictor was set for the channel, `setReceiveBufferSizePredictor(ReceiveBufferSizePredictor)` will be called with the new predictor. The default factory is ``AdaptiveReceiveBufferSizePredictorFactory`(64, 1024, 65536)`.

Copyright © 2008-2012 The Netty Project. All Rights Reserved.