io.vertx.core.net

## Class ClientOptionsBase

- java.lang.Object
- - io.vertx.core.net.NetworkOptions
  - - io.vertx.core.net.TCPSSLOptions
    - - io.vertx.core.net.ClientOptionsBase

- Direct Known Subclasses:
    HttpClientOptions, NetClientOptions

      public abstract class ClientOptionsBase
      extends TCPSSLOptions

  Base class for Client options
  Author:
    Tim Fox

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_CONNECT_TIMEOUT` The default value of connect timeout = 60000 ms
    `static String` | `DEFAULT_METRICS_NAME` The default value of the client metrics = "":
    `static boolean` | `DEFAULT_TRUST_ALL` The default value of whether all servers (SSL/TLS) should be trusted = false

    - ### Fields inherited from class io.vertx.core.net.TCPSSLOptions

      `DEFAULT_IDLE_TIMEOUT, DEFAULT_SO_LINGER, DEFAULT_SSL, DEFAULT_SSL_ENGINE, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_USE_ALPN, DEFAULT_USE_POOLED_BUFFERS`

    - ### Fields inherited from class io.vertx.core.net.NetworkOptions

      `DEFAULT_LOG_ENABLED, DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientOptionsBase()` Default constructor
    `ClientOptionsBase(ClientOptionsBase other)` Copy constructor
    `ClientOptionsBase(JsonObject json)` Create options from some JSON

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `int` | `getConnectTimeout()`
    `String` | `getLocalAddress()`
    `String` | `getMetricsName()`
    `ProxyOptions` | `getProxyOptions()` Get proxy options for connections
    `int` | `hashCode()`
    `boolean` | `isTrustAll()`
    `ClientOptionsBase` | `setConnectTimeout(int connectTimeout)` Set the connect timeout
    `ClientOptionsBase` | `setIdleTimeout(int idleTimeout)` Set the idle timeout, in seconds.
    `ClientOptionsBase` | `setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions)`
    `ClientOptionsBase` | `setKeyCertOptions(KeyCertOptions options)` Set the key/cert options.
    `ClientOptionsBase` | `setKeyStoreOptions(JksOptions options)` Set the key/cert options in jks format, aka Java keystore.
    `ClientOptionsBase` | `setLocalAddress(String localAddress)` Set the local interface to bind for network connections.
    `ClientOptionsBase` | `setLogActivity(boolean logEnabled)` Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.
    `ClientOptionsBase` | `setMetricsName(String metricsName)` Set the metrics name identifying the reported metrics, useful for grouping metrics with the same name.
    `ClientOptionsBase` | `setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions)`
    `ClientOptionsBase` | `setPemKeyCertOptions(PemKeyCertOptions options)` Set the key/cert store options in pem format.
    `ClientOptionsBase` | `setPemTrustOptions(PemTrustOptions options)` Set the trust options in pem format
    `ClientOptionsBase` | `setPfxKeyCertOptions(PfxOptions options)` Set the key/cert options in pfx format.
    `ClientOptionsBase` | `setPfxTrustOptions(PfxOptions options)` Set the trust options in pfx format
    `ClientOptionsBase` | `setProxyOptions(ProxyOptions proxyOptions)` Set proxy options for connections via CONNECT proxy (e.g.
    `ClientOptionsBase` | `setReceiveBufferSize(int receiveBufferSize)` Set the TCP receive buffer size
    `ClientOptionsBase` | `setReuseAddress(boolean reuseAddress)` Set the value of reuse address
    `ClientOptionsBase` | `setSendBufferSize(int sendBufferSize)` Set the TCP send buffer size
    `ClientOptionsBase` | `setSoLinger(int soLinger)` Set whether SO_linger keep alive is enabled
    `ClientOptionsBase` | `setSsl(boolean ssl)` Set whether SSL/TLS is enabled
    `ClientOptionsBase` | `setSslEngineOptions(SSLEngineOptions sslEngineOptions)` Set to use SSL engine implementation to use.
    `ClientOptionsBase` | `setTcpKeepAlive(boolean tcpKeepAlive)` Set whether TCP keep alive is enabled
    `ClientOptionsBase` | `setTcpNoDelay(boolean tcpNoDelay)` Set whether TCP no delay is enabled
    `ClientOptionsBase` | `setTrafficClass(int trafficClass)` Set the value of traffic class
    `ClientOptionsBase` | `setTrustAll(boolean trustAll)` Set whether all server certificates should be trusted
    `ClientOptionsBase` | `setTrustOptions(TrustOptions options)` Set the trust options.
    `ClientOptionsBase` | `setTrustStoreOptions(JksOptions options)` Set the trust options in jks format, aka Java truststore
    `ClientOptionsBase` | `setUseAlpn(boolean useAlpn)` Set the ALPN usage.
    `ClientOptionsBase` | `setUsePooledBuffers(boolean usePooledBuffers)` Set whether Netty pooled buffers are enabled
    `JsonObject` | `toJson()` Convert to JSON

    - ### Methods inherited from class io.vertx.core.net.TCPSSLOptions

      `addCrlPath, addCrlValue, addEnabledCipherSuite, addEnabledSecureTransportProtocol, getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getJdkSslEngineOptions, getKeyCertOptions, getKeyStoreOptions, getOpenSslEngineOptions, getPemKeyCertOptions, getPemTrustOptions, getPfxKeyCertOptions, getPfxTrustOptions, getSoLinger, getSslEngineOptions, getTrustOptions, getTrustStoreOptions, isSsl, isTcpKeepAlive, isTcpNoDelay, isUseAlpn, isUsePooledBuffers`

    - ### Methods inherited from class io.vertx.core.net.NetworkOptions

      `getLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_CONNECT_TIMEOUT

          public static final int DEFAULT_CONNECT_TIMEOUT

      The default value of connect timeout = 60000 ms
      See Also:
        Constant Field Values

    - #### DEFAULT_TRUST_ALL

          public static final boolean DEFAULT_TRUST_ALL

      The default value of whether all servers (SSL/TLS) should be trusted = false
      See Also:
        Constant Field Values

    - #### DEFAULT_METRICS_NAME

          public static final String DEFAULT_METRICS_NAME

      The default value of the client metrics = "":
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ClientOptionsBase

          public ClientOptionsBase()

      Default constructor

    - #### ClientOptionsBase

          public ClientOptionsBase(ClientOptionsBase other)

      Copy constructor
      Parameters:
        `other` - the options to copy

    - #### ClientOptionsBase

          public ClientOptionsBase(JsonObject json)

      Create options from some JSON
      Parameters:
        `json` - the JSON

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

      Convert to JSON
      Overrides:
        `toJson` in class `TCPSSLOptions`
      Returns:
        the JSON

    - #### isTrustAll

          public boolean isTrustAll()

      Returns:
        true if all server certificates should be trusted

    - #### setTrustAll

          public ClientOptionsBase setTrustAll(boolean trustAll)

      Set whether all server certificates should be trusted
      Parameters:
        `trustAll` - true if all should be trusted
      Returns:
        a reference to this, so the API can be used fluently

    - #### getConnectTimeout

          public int getConnectTimeout()

      Returns:
        the value of connect timeout

    - #### setConnectTimeout

          public ClientOptionsBase setConnectTimeout(int connectTimeout)

      Set the connect timeout
      Parameters:
        `connectTimeout` - connect timeout, in ms
      Returns:
        a reference to this, so the API can be used fluently

    - #### getMetricsName

          public String getMetricsName()

      Returns:
        the metrics name identifying the reported metrics.

    - #### setMetricsName

          public ClientOptionsBase setMetricsName(String metricsName)

      Set the metrics name identifying the reported metrics, useful for grouping metrics with the same name.
      Parameters:
        `metricsName` - the metrics name
      Returns:
        a reference to this, so the API can be used fluently

    - #### setProxyOptions

          public ClientOptionsBase setProxyOptions(ProxyOptions proxyOptions)

      Set proxy options for connections via CONNECT proxy (e.g. Squid) or a SOCKS proxy.
      Parameters:
        `proxyOptions` - proxy options object
      Returns:
        a reference to this, so the API can be used fluently

    - #### getProxyOptions

          public ProxyOptions getProxyOptions()

      Get proxy options for connections
      Returns:
        proxy options

    - #### getLocalAddress

          public String getLocalAddress()

      Returns:
        the local interface to bind for network connections.

    - #### setLocalAddress

          public ClientOptionsBase setLocalAddress(String localAddress)

      Set the local interface to bind for network connections. When the local address is null, it will pick any local address, the default local address is null.
      Parameters:
        `localAddress` - the local address
      Returns:
        a reference to this, so the API can be used fluently

    - #### setLogActivity

          public ClientOptionsBase setLogActivity(boolean logEnabled)

      Description copied from class: `NetworkOptions`
      Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.
      Overrides:
        `setLogActivity` in class `TCPSSLOptions`
      Parameters:
        `logEnabled` - true for logging the network activity
      Returns:
        a reference to this, so the API can be used fluently

    - #### setTcpNoDelay

          public ClientOptionsBase setTcpNoDelay(boolean tcpNoDelay)

      Description copied from class: `TCPSSLOptions`
      Set whether TCP no delay is enabled
      Overrides:
        `setTcpNoDelay` in class `TCPSSLOptions`
      Parameters:
        `tcpNoDelay` - true if TCP no delay is enabled (Nagle disabled)
      Returns:
        a reference to this, so the API can be used fluently

    - #### setTcpKeepAlive

          public ClientOptionsBase setTcpKeepAlive(boolean tcpKeepAlive)

      Description copied from class: `TCPSSLOptions`
      Set whether TCP keep alive is enabled
      Overrides:
        `setTcpKeepAlive` in class `TCPSSLOptions`
      Parameters:
        `tcpKeepAlive` - true if TCP keep alive is enabled
      Returns:
        a reference to this, so the API can be used fluently

    - #### setSoLinger

          public ClientOptionsBase setSoLinger(int soLinger)

      Description copied from class: `TCPSSLOptions`
      Set whether SO_linger keep alive is enabled
      Overrides:
        `setSoLinger` in class `TCPSSLOptions`
      Parameters:
        `soLinger` - true if SO_linger is enabled
      Returns:
        a reference to this, so the API can be used fluently

    - #### setUsePooledBuffers

          public ClientOptionsBase setUsePooledBuffers(boolean usePooledBuffers)

      Description copied from class: `TCPSSLOptions`
      Set whether Netty pooled buffers are enabled
      Overrides:
        `setUsePooledBuffers` in class `TCPSSLOptions`
      Parameters:
        `usePooledBuffers` - true if pooled buffers enabled
      Returns:
        a reference to this, so the API can be used fluently

    - #### setIdleTimeout

          public ClientOptionsBase setIdleTimeout(int idleTimeout)

      Description copied from class: `TCPSSLOptions`
      Set the idle timeout, in seconds. zero means don't timeout. This determines if a connection will timeout and be closed if no data is received within the timeout.
      Overrides:
        `setIdleTimeout` in class `TCPSSLOptions`
      Parameters:
        `idleTimeout` - the timeout, in seconds
      Returns:
        a reference to this, so the API can be used fluently

    - #### setSsl

          public ClientOptionsBase setSsl(boolean ssl)

      Description copied from class: `TCPSSLOptions`
      Set whether SSL/TLS is enabled
      Overrides:
        `setSsl` in class `TCPSSLOptions`
      Parameters:
        `ssl` - true if enabled
      Returns:
        a reference to this, so the API can be used fluently

    - #### setKeyCertOptions

          public ClientOptionsBase setKeyCertOptions(KeyCertOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the key/cert options.
      Overrides:
        `setKeyCertOptions` in class `TCPSSLOptions`
      Parameters:
        `options` - the key store options
      Returns:
        a reference to this, so the API can be used fluently

    - #### setKeyStoreOptions

          public ClientOptionsBase setKeyStoreOptions(JksOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the key/cert options in jks format, aka Java keystore.
      Overrides:
        `setKeyStoreOptions` in class `TCPSSLOptions`
      Parameters:
        `options` - the key store in jks format
      Returns:
        a reference to this, so the API can be used fluently

    - #### setPfxKeyCertOptions

          public ClientOptionsBase setPfxKeyCertOptions(PfxOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the key/cert options in pfx format.
      Overrides:
        `setPfxKeyCertOptions` in class `TCPSSLOptions`
      Parameters:
        `options` - the key cert options in pfx format
      Returns:
        a reference to this, so the API can be used fluently

    - #### setPemKeyCertOptions

          public ClientOptionsBase setPemKeyCertOptions(PemKeyCertOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the key/cert store options in pem format.
      Overrides:
        `setPemKeyCertOptions` in class `TCPSSLOptions`
      Parameters:
        `options` - the options in pem format
      Returns:
        a reference to this, so the API can be used fluently

    - #### setTrustOptions

          public ClientOptionsBase setTrustOptions(TrustOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the trust options.
      Overrides:
        `setTrustOptions` in class `TCPSSLOptions`
      Parameters:
        `options` - the trust options
      Returns:
        a reference to this, so the API can be used fluently

    - #### setTrustStoreOptions

          public ClientOptionsBase setTrustStoreOptions(JksOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the trust options in jks format, aka Java truststore
      Overrides:
        `setTrustStoreOptions` in class `TCPSSLOptions`
      Parameters:
        `options` - the trust options in jks format
      Returns:
        a reference to this, so the API can be used fluently

    - #### setPfxTrustOptions

          public ClientOptionsBase setPfxTrustOptions(PfxOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the trust options in pfx format
      Overrides:
        `setPfxTrustOptions` in class `TCPSSLOptions`
      Parameters:
        `options` - the trust options in pfx format
      Returns:
        a reference to this, so the API can be used fluently

    - #### setPemTrustOptions

          public ClientOptionsBase setPemTrustOptions(PemTrustOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the trust options in pem format
      Overrides:
        `setPemTrustOptions` in class `TCPSSLOptions`
      Parameters:
        `options` - the trust options in pem format
      Returns:
        a reference to this, so the API can be used fluently

    - #### setUseAlpn

          public ClientOptionsBase setUseAlpn(boolean useAlpn)

      Description copied from class: `TCPSSLOptions`
      Set the ALPN usage.
      Overrides:
        `setUseAlpn` in class `TCPSSLOptions`
      Parameters:
        `useAlpn` - true when Application-Layer Protocol Negotiation should be used

    - #### setSslEngineOptions

          public ClientOptionsBase setSslEngineOptions(SSLEngineOptions sslEngineOptions)

      Description copied from class: `TCPSSLOptions`
      Set to use SSL engine implementation to use.
      Overrides:
        `setSslEngineOptions` in class `TCPSSLOptions`
      Parameters:
        `sslEngineOptions` - the ssl engine to use
      Returns:
        a reference to this, so the API can be used fluently

    - #### setJdkSslEngineOptions

          public ClientOptionsBase setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions)

      Overrides:
        `setJdkSslEngineOptions` in class `TCPSSLOptions`

    - #### setOpenSslEngineOptions

          public ClientOptionsBase setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions)

      Overrides:
        `setOpenSslEngineOptions` in class `TCPSSLOptions`

    - #### setSendBufferSize

          public ClientOptionsBase setSendBufferSize(int sendBufferSize)

      Description copied from class: `NetworkOptions`
      Set the TCP send buffer size
      Overrides:
        `setSendBufferSize` in class `NetworkOptions`
      Parameters:
        `sendBufferSize` - the buffers size, in bytes
      Returns:
        a reference to this, so the API can be used fluently

    - #### setReceiveBufferSize

          public ClientOptionsBase setReceiveBufferSize(int receiveBufferSize)

      Description copied from class: `NetworkOptions`
      Set the TCP receive buffer size
      Overrides:
        `setReceiveBufferSize` in class `NetworkOptions`
      Parameters:
        `receiveBufferSize` - the buffers size, in bytes
      Returns:
        a reference to this, so the API can be used fluently

    - #### setReuseAddress

          public ClientOptionsBase setReuseAddress(boolean reuseAddress)

      Description copied from class: `NetworkOptions`
      Set the value of reuse address
      Overrides:
        `setReuseAddress` in class `NetworkOptions`
      Parameters:
        `reuseAddress` - the value of reuse address
      Returns:
        a reference to this, so the API can be used fluently

    - #### setTrafficClass

          public ClientOptionsBase setTrafficClass(int trafficClass)

      Description copied from class: `NetworkOptions`
      Set the value of traffic class
      Overrides:
        `setTrafficClass` in class `NetworkOptions`
      Parameters:
        `trafficClass` - the value of traffic class
      Returns:
        a reference to this, so the API can be used fluently

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `TCPSSLOptions`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `TCPSSLOptions`

Copyright © 2017. All rights reserved.