Interface SocketConditioningConfig

All Superinterfaces:
Config

public interface SocketConditioningConfig extends Config
Socket Conditioning configuration for a connector.

This allows TCP connection details for a connector to be defined.

Values can only be set before the server is started unless otherwise stated.

Since:
4.4
  • Method Details

    • setInputBufferSize

      void setInputBufferSize(int size) throws ConfigException
      Sets the input buffer size.

      This value specified the size to use for the socket input buffer, this must be be big enough to accommodate the largest inbound message.

      If not specified, 128kB is assumed.

      Parameters:
      size - input buffer size in bytes
      Throws:
      ConfigException - if unable to set property
    • getInputBufferSize

      int getInputBufferSize()
      Gets the input buffer size.
      Returns:
      input buffer size in bytes.
    • setOutputBufferSize

      void setOutputBufferSize(int size) throws ConfigException
      Sets the output buffer size.

      This value specifies the size of the output buffer to use for each connection. This must be large enough to accommodate the largest message to be sent. Messages are 'batched' into this buffer and so the larger the buffer, the more messages can be sent in a single write.

      If this is not specified, 128kB is assumed.

      Parameters:
      size - output buffer size in bytes
      Throws:
      ConfigException - if unable to set property
    • getOutputBufferSize

      int getOutputBufferSize()
      Gets the output buffer size.
      Returns:
      output buffer size.
    • setKeepAlive

      void setKeepAlive(boolean keepAlive) throws ConfigException
      Sets the TCP keep alive option.

      By default this is true.

      Parameters:
      keepAlive - true to set TCP keep alive.
      Throws:
      ConfigException - if unable to set property
    • isKeepAlive

      boolean isKeepAlive()
      Is TCP keep alive set?
      Returns:
      true if TCP keep alive is set.
    • setNoDelay

      void setNoDelay(boolean noDelay) throws ConfigException
      Sets the no delay option.

      Enable/disable TCP_NODELAY (disable/enable Nagle's algorithm). By default this is true.

      Parameters:
      noDelay - true to set no delay option
      Throws:
      ConfigException - if unable to set property
    • isNoDelay

      boolean isNoDelay()
      Is TCP no delay option set?
      Returns:
      true if no delay option is set.
    • setReuseAddress

      void setReuseAddress(boolean reuseAddress) throws ConfigException
      Sets the reuse address option.

      When a TCP connection is closed the connection may remain in a timeout state for a period of time after the connection is closed (typically known as the TIME_WAIT state or 2MSL wait state). For applications using a well known socket address or port it may not be possible to bind a socket to the required SocketAddress if there is a connection in the timeout state involving the socket address or port. This feature allows the socket to be bound even though a previous connection is in a timeout state.

      By default this is set to true.

      Parameters:
      reuseAddress - true to set reuse address option
      Throws:
      ConfigException - if unable to set property
    • isReuseAddress

      boolean isReuseAddress()
      Is reuse address option set?
      Returns:
      true if reuse address option is set