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` | `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` | `setProxyOptions(ProxyOptions proxyOptions)` Set proxy options for connections via CONNECT proxy (e.g.
    `ClientOptionsBase` | `setTrustAll(boolean trustAll)` Set whether all server certificates should be trusted

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

      `addCrlPath, addCrlValue, addEnabledCipherSuite, addEnabledSecureTransportProtocol, getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getKeyCertOptions, getSoLinger, getSslEngineOptions, getTrustOptions, isSsl, isTcpKeepAlive, isTcpNoDelay, isUseAlpn, isUsePooledBuffers, setIdleTimeout, setJdkSslEngineOptions, setKeyCertOptions, setKeyStoreOptions, setOpenSslEngineOptions, setPemKeyCertOptions, setPemTrustOptions, setPfxKeyCertOptions, setPfxTrustOptions, setSoLinger, setSsl, setSslEngineOptions, setTcpKeepAlive, setTcpNoDelay, setTrustOptions, setTrustStoreOptions, setUseAlpn, setUsePooledBuffers`

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

      `getLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setTrafficClass`

    - ### 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

    - #### 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

    - #### 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.