io.vertx.core.net

## Class TCPSSLOptions

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

- Direct Known Subclasses:
    ClientOptionsBase, EventBusOptions, NetServerOptions, ServerOptionsBase

      public abstract class TCPSSLOptions
      extends NetworkOptions

  Base class. TCP and SSL related options
  Author:
    Tim Fox

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_IDLE_TIMEOUT` Default idle timeout = 0
    `static int` | `DEFAULT_SO_LINGER` The default value of SO_linger = -1
    `static boolean` | `DEFAULT_SSL` SSL enable by default = false
    `static SSLEngineOptions` | `DEFAULT_SSL_ENGINE` The default SSL engine options = null (autoguess)
    `static boolean` | `DEFAULT_TCP_KEEP_ALIVE` The default value of TCP keep alive = false
    `static boolean` | `DEFAULT_TCP_NO_DELAY` The default value of TCP-no-delay = true (Nagle disabled)
    `static boolean` | `DEFAULT_USE_ALPN` Default use alpn = false
    `static boolean` | `DEFAULT_USE_POOLED_BUFFERS` The default value of Netty use pooled buffers = false

    - ### 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
    `TCPSSLOptions()` Default constructor
    `TCPSSLOptions(JsonObject json)` Create options from JSON
    `TCPSSLOptions(TCPSSLOptions other)` Copy constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `TCPSSLOptions` | `addCrlPath(String crlPath)` Add a CRL path
    `TCPSSLOptions` | `addCrlValue(Buffer crlValue)` Add a CRL value
    `TCPSSLOptions` | `addEnabledCipherSuite(String suite)` Add an enabled cipher suite
    `TCPSSLOptions` | `addEnabledSecureTransportProtocol(String protocol)` Add an enabled SSL/TLS protocols
    `boolean` | `equals(Object o)`
    `List<String>` | `getCrlPaths()`
    `List<Buffer>` | `getCrlValues()` Get the CRL values
    `Set<String>` | `getEnabledCipherSuites()`
    `Set<String>` | `getEnabledSecureTransportProtocols()` Returns the enabled SSL/TLS protocols
    `int` | `getIdleTimeout()`
    `KeyCertOptions` | `getKeyCertOptions()`
    `int` | `getSoLinger()`
    `SSLEngineOptions` | `getSslEngineOptions()`
    `TrustOptions` | `getTrustOptions()`
    `int` | `hashCode()`
    `boolean` | `isSsl()`
    `boolean` | `isTcpKeepAlive()`
    `boolean` | `isTcpNoDelay()`
    `boolean` | `isUseAlpn()`
    `boolean` | `isUsePooledBuffers()`
    `TCPSSLOptions` | `setIdleTimeout(int idleTimeout)` Set the idle timeout, in seconds.
    `TCPSSLOptions` | `setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions)`
    `TCPSSLOptions` | `setKeyCertOptions(KeyCertOptions options)` Set the key/cert options.
    `TCPSSLOptions` | `setKeyStoreOptions(JksOptions options)` Set the key/cert options in jks format, aka Java keystore.
    `TCPSSLOptions` | `setLogActivity(boolean logEnabled)` Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.
    `TCPSSLOptions` | `setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions)`
    `TCPSSLOptions` | `setPemKeyCertOptions(PemKeyCertOptions options)` Set the key/cert store options in pem format.
    `TCPSSLOptions` | `setPemTrustOptions(PemTrustOptions options)` Set the trust options in pem format
    `TCPSSLOptions` | `setPfxKeyCertOptions(PfxOptions options)` Set the key/cert options in pfx format.
    `TCPSSLOptions` | `setPfxTrustOptions(PfxOptions options)` Set the trust options in pfx format
    `TCPSSLOptions` | `setSoLinger(int soLinger)` Set whether SO_linger keep alive is enabled
    `TCPSSLOptions` | `setSsl(boolean ssl)` Set whether SSL/TLS is enabled
    `TCPSSLOptions` | `setSslEngineOptions(SSLEngineOptions sslEngineOptions)` Set to use SSL engine implementation to use.
    `TCPSSLOptions` | `setTcpKeepAlive(boolean tcpKeepAlive)` Set whether TCP keep alive is enabled
    `TCPSSLOptions` | `setTcpNoDelay(boolean tcpNoDelay)` Set whether TCP no delay is enabled
    `TCPSSLOptions` | `setTrustOptions(TrustOptions options)` Set the trust options.
    `TCPSSLOptions` | `setTrustStoreOptions(JksOptions options)` Set the trust options in jks format, aka Java trustore
    `TCPSSLOptions` | `setUseAlpn(boolean useAlpn)` Set the ALPN usage.
    `TCPSSLOptions` | `setUsePooledBuffers(boolean usePooledBuffers)` Set whether Netty pooled buffers are enabled

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

          public static final boolean DEFAULT_TCP_NO_DELAY

      The default value of TCP-no-delay = true (Nagle disabled)
      See Also:
        Constant Field Values

    - #### DEFAULT_TCP_KEEP_ALIVE

          public static final boolean DEFAULT_TCP_KEEP_ALIVE

      The default value of TCP keep alive = false
      See Also:
        Constant Field Values

    - #### DEFAULT_SO_LINGER

          public static final int DEFAULT_SO_LINGER

      The default value of SO_linger = -1
      See Also:
        Constant Field Values

    - #### DEFAULT_USE_POOLED_BUFFERS

          public static final boolean DEFAULT_USE_POOLED_BUFFERS

      The default value of Netty use pooled buffers = false
      See Also:
        Constant Field Values

    - #### DEFAULT_SSL

          public static final boolean DEFAULT_SSL

      SSL enable by default = false
      See Also:
        Constant Field Values

    - #### DEFAULT_IDLE_TIMEOUT

          public static final int DEFAULT_IDLE_TIMEOUT

      Default idle timeout = 0
      See Also:
        Constant Field Values

    - #### DEFAULT_USE_ALPN

          public static final boolean DEFAULT_USE_ALPN

      Default use alpn = false
      See Also:
        Constant Field Values

    - #### DEFAULT_SSL_ENGINE

          public static final SSLEngineOptions DEFAULT_SSL_ENGINE

      The default SSL engine options = null (autoguess)

  - ### Constructor Detail

    - #### TCPSSLOptions

          public TCPSSLOptions()

      Default constructor

    - #### TCPSSLOptions

          public TCPSSLOptions(TCPSSLOptions other)

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

    - #### TCPSSLOptions

          public TCPSSLOptions(JsonObject json)

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

  - ### Method Detail

    - #### isTcpNoDelay

          public boolean isTcpNoDelay()

      Returns:
        TCP no delay enabled ?

    - #### setTcpNoDelay

          public TCPSSLOptions setTcpNoDelay(boolean tcpNoDelay)

      Set whether TCP no delay is enabled
      Parameters:
        `tcpNoDelay` - true if TCP no delay is enabled (Nagle disabled)
      Returns:
        a reference to this, so the API can be used fluently

    - #### isTcpKeepAlive

          public boolean isTcpKeepAlive()

      Returns:
        is TCP keep alive enabled?

    - #### setTcpKeepAlive

          public TCPSSLOptions setTcpKeepAlive(boolean tcpKeepAlive)

      Set whether TCP keep alive is enabled
      Parameters:
        `tcpKeepAlive` - true if TCP keep alive is enabled
      Returns:
        a reference to this, so the API can be used fluently

    - #### getSoLinger

          public int getSoLinger()

      Returns:
        is SO_linger enabled

    - #### setSoLinger

          public TCPSSLOptions setSoLinger(int soLinger)

      Set whether SO_linger keep alive is enabled
      Parameters:
        `soLinger` - true if SO_linger is enabled
      Returns:
        a reference to this, so the API can be used fluently

    - #### isUsePooledBuffers

          public boolean isUsePooledBuffers()

      Returns:
        are Netty pooled buffers enabled?

    - #### setUsePooledBuffers

          public TCPSSLOptions setUsePooledBuffers(boolean usePooledBuffers)

      Set whether Netty pooled buffers are enabled
      Parameters:
        `usePooledBuffers` - true if pooled buffers enabled
      Returns:
        a reference to this, so the API can be used fluently

    - #### setIdleTimeout

          public TCPSSLOptions setIdleTimeout(int idleTimeout)

      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.
      Parameters:
        `idleTimeout` - the timeout, in seconds
      Returns:
        a reference to this, so the API can be used fluently

    - #### getIdleTimeout

          public int getIdleTimeout()

      Returns:
        the idle timeout, in seconds

    - #### isSsl

          public boolean isSsl()

      Returns:
        is SSL/TLS enabled?

    - #### setSsl

          public TCPSSLOptions setSsl(boolean ssl)

      Set whether SSL/TLS is enabled
      Parameters:
        `ssl` - true if enabled
      Returns:
        a reference to this, so the API can be used fluently

    - #### getKeyCertOptions

          public KeyCertOptions getKeyCertOptions()

      Returns:
        the key/cert options

    - #### setKeyCertOptions

          public TCPSSLOptions setKeyCertOptions(KeyCertOptions options)

      Set the key/cert options.
      Parameters:
        `options` - the key store options
      Returns:
        a reference to this, so the API can be used fluently

    - #### setKeyStoreOptions

          public TCPSSLOptions setKeyStoreOptions(JksOptions options)

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

    - #### setPfxKeyCertOptions

          public TCPSSLOptions setPfxKeyCertOptions(PfxOptions options)

      Set the key/cert options in pfx format.
      Parameters:
        `options` - the key cert options in pfx format
      Returns:
        a reference to this, so the API can be used fluently

    - #### setPemKeyCertOptions

          public TCPSSLOptions setPemKeyCertOptions(PemKeyCertOptions options)

      Set the key/cert store options in pem format.
      Parameters:
        `options` - the options in pem format
      Returns:
        a reference to this, so the API can be used fluently

    - #### getTrustOptions

          public TrustOptions getTrustOptions()

      Returns:
        the trust options

    - #### setTrustOptions

          public TCPSSLOptions setTrustOptions(TrustOptions options)

      Set the trust options.
      Parameters:
        `options` - the trust options
      Returns:
        a reference to this, so the API can be used fluently

    - #### setTrustStoreOptions

          public TCPSSLOptions setTrustStoreOptions(JksOptions options)

      Set the trust options in jks format, aka Java trustore
      Parameters:
        `options` - the trust options in jks format
      Returns:
        a reference to this, so the API can be used fluently

    - #### setPfxTrustOptions

          public TCPSSLOptions setPfxTrustOptions(PfxOptions options)

      Set the trust options in pfx format
      Parameters:
        `options` - the trust options in pfx format
      Returns:
        a reference to this, so the API can be used fluently

    - #### setPemTrustOptions

          public TCPSSLOptions setPemTrustOptions(PemTrustOptions options)

      Set the trust options in pem format
      Parameters:
        `options` - the trust options in pem format
      Returns:
        a reference to this, so the API can be used fluently

    - #### addEnabledCipherSuite

          public TCPSSLOptions addEnabledCipherSuite(String suite)

      Add an enabled cipher suite
      Parameters:
        `suite` - the suite
      Returns:
        a reference to this, so the API can be used fluently

    - #### getEnabledCipherSuites

          public Set<String> getEnabledCipherSuites()

      Returns:
        the enabled cipher suites

    - #### getCrlPaths

          public List<String> getCrlPaths()

      Returns:
        the CRL (Certificate revocation list) paths

    - #### addCrlPath

          public TCPSSLOptions addCrlPath(String crlPath)
                                   throws NullPointerException

      Add a CRL path
      Parameters:
        `crlPath` - the path
      Returns:
        a reference to this, so the API can be used fluently
      Throws:
        `NullPointerException`

    - #### getCrlValues

          public List<Buffer> getCrlValues()

      Get the CRL values
      Returns:
        the list of values

    - #### addCrlValue

          public TCPSSLOptions addCrlValue(Buffer crlValue)
                                    throws NullPointerException

      Add a CRL value
      Parameters:
        `crlValue` - the value
      Returns:
        a reference to this, so the API can be used fluently
      Throws:
        `NullPointerException`

    - #### isUseAlpn

          public boolean isUseAlpn()

      Returns:
        whether to use or not Application-Layer Protocol Negotiation

    - #### setUseAlpn

          public TCPSSLOptions setUseAlpn(boolean useAlpn)

      Set the ALPN usage.
      Parameters:
        `useAlpn` - true when Application-Layer Protocol Negotiation should be used

    - #### getSslEngineOptions

          public SSLEngineOptions getSslEngineOptions()

      Returns:
        the SSL engine implementation to use

    - #### setSslEngineOptions

          public TCPSSLOptions setSslEngineOptions(SSLEngineOptions sslEngineOptions)

      Set to use SSL engine implementation to use.
      Parameters:
        `sslEngineOptions` - the ssl engine to use
      Returns:
        a reference to this, so the API can be used fluently

    - #### setJdkSslEngineOptions

          public TCPSSLOptions setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions)

    - #### setOpenSslEngineOptions

          public TCPSSLOptions setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions)

    - #### addEnabledSecureTransportProtocol

          public TCPSSLOptions addEnabledSecureTransportProtocol(String protocol)

      Add an enabled SSL/TLS protocols
      Parameters:
        `protocol` - the SSL/TLS protocol do enabled
      Returns:
        a reference to this, so the API can be used fluently

    - #### getEnabledSecureTransportProtocols

          public Set<String> getEnabledSecureTransportProtocols()

      Returns the enabled SSL/TLS protocols
      Returns:
        the enabled protocols

    - #### setLogActivity

          public TCPSSLOptions 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 `NetworkOptions`
      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 `NetworkOptions`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `NetworkOptions`

Copyright © 2016. All rights reserved.