Class ClientSSLOptions


  • public class ClientSSLOptions
    extends SSLOptions
    Client SSL options.
    • Field Detail

      • DEFAULT_HOSTNAME_VERIFICATION_ALGORITHM

        public static final String DEFAULT_HOSTNAME_VERIFICATION_ALGORITHM
        Default value to determine hostname verification algorithm hostname verification (for SSL/TLS) = null
      • 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
    • Constructor Detail

      • ClientSSLOptions

        public ClientSSLOptions()
        Default constructor
      • ClientSSLOptions

        public ClientSSLOptions​(ClientSSLOptions other)
        Copy constructor
        Parameters:
        other - the options to copy
      • ClientSSLOptions

        public ClientSSLOptions​(JsonObject json)
        Create options from JSON
        Parameters:
        json - the JSON
    • Method Detail

      • getHostnameVerificationAlgorithm

        public String getHostnameVerificationAlgorithm()
        Returns:
        the value of the hostname verification algorithm
      • setHostnameVerificationAlgorithm

        public ClientSSLOptions setHostnameVerificationAlgorithm​(String hostnameVerificationAlgorithm)
        Set the hostname verification algorithm interval
        Parameters:
        hostnameVerificationAlgorithm - should be HTTPS, LDAPS or a null
        Returns:
        a reference to this, so the API can be used fluently
      • isTrustAll

        public boolean isTrustAll()
        Returns:
        true if all server certificates should be trusted
      • setTrustAll

        public ClientSSLOptions 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
      • setUseAlpn

        public ClientSSLOptions setUseAlpn​(boolean useAlpn)
        Description copied from class: SSLOptions
        Set the ALPN usage.
        Overrides:
        setUseAlpn in class SSLOptions
        Parameters:
        useAlpn - true when Application-Layer Protocol Negotiation should be used
      • setSslHandshakeTimeout

        public ClientSSLOptions setSslHandshakeTimeout​(long sslHandshakeTimeout)
        Description copied from class: SSLOptions
        Set the SSL handshake timeout, default time unit is seconds.
        Overrides:
        setSslHandshakeTimeout in class SSLOptions
        Parameters:
        sslHandshakeTimeout - the SSL handshake timeout to set, in milliseconds
        Returns:
        a reference to this, so the API can be used fluently
      • setSslHandshakeTimeoutUnit

        public ClientSSLOptions setSslHandshakeTimeoutUnit​(TimeUnit sslHandshakeTimeoutUnit)
        Description copied from class: SSLOptions
        Set the SSL handshake timeout unit. If not specified, default is seconds.
        Overrides:
        setSslHandshakeTimeoutUnit in class SSLOptions
        Parameters:
        sslHandshakeTimeoutUnit - specify time unit.
        Returns:
        a reference to this, so the API can be used fluently
      • setEnabledSecureTransportProtocols

        public ClientSSLOptions setEnabledSecureTransportProtocols​(Set<String> enabledSecureTransportProtocols)
        Description copied from class: SSLOptions
        Sets the list of enabled SSL/TLS protocols.
        Overrides:
        setEnabledSecureTransportProtocols in class SSLOptions
        Parameters:
        enabledSecureTransportProtocols - the SSL/TLS protocols to enable
        Returns:
        a reference to this, so the API can be used fluently
      • setApplicationLayerProtocols

        public ClientSSLOptions setApplicationLayerProtocols​(List<String> protocols)
        Description copied from class: SSLOptions
        Set the list of application-layer protocols to provide to the server during the Application-Layer Protocol Negotiation.
        Overrides:
        setApplicationLayerProtocols in class SSLOptions
        Parameters:
        protocols - the protocols
        Returns:
        a reference to this, so the API can be used fluently