Class SslOptions.Builder

  • Enclosing class:
    SslOptions

    public static class SslOptions.Builder
    extends java.lang.Object
    Builder for SslOptions.
    • Method Detail

      • keyStoreType

        public SslOptions.Builder keyStoreType​(java.lang.String keyStoreType)
        Sets the KeyStore type. Defaults to KeyStore.getDefaultType() if not set.
        Parameters:
        keyStoreType - the keystore type to use, must not be null.
        Returns:
        this
      • trustStoreType

        public SslOptions.Builder trustStoreType​(java.lang.String trustStoreType)
        Sets the TrustStore type. Defaults to KeyStore.getDefaultType() if not set.
        Parameters:
        trustStoreType - the truststore type to use, must not be null.
        Returns:
        this
      • keystore

        public SslOptions.Builder keystore​(java.io.File keystore)
        Sets the Keystore file to load client certificates.
        Parameters:
        keystore - the keystore file, must not be null.
        Returns:
        this
      • keystore

        public SslOptions.Builder keystore​(java.io.File keystore,
                                           char[] keystorePassword)
        Sets the Keystore file to load client certificates.
        Parameters:
        keystore - the keystore file, must not be null.
        keystorePassword - the keystore password. May be empty to omit password and the keystore integrity check.
        Returns:
        this
      • keystore

        public SslOptions.Builder keystore​(java.net.URL keystore)
        Sets the Keystore resource to load client certificates.
        Parameters:
        keystore - the keystore URL, must not be null.
        Returns:
        this
      • keystore

        public SslOptions.Builder keystore​(java.net.URL keystore,
                                           char[] keystorePassword)
        Sets the Keystore resource to load client certificates.
        Parameters:
        keystore - the keystore URL, must not be null.
        keystorePassword - the keystore password
        Returns:
        this
      • keystore

        public SslOptions.Builder keystore​(SslOptions.Resource resource,
                                           char[] keystorePassword)
        Sets the Java Keystore resource to load client certificates.
        Parameters:
        resource - the provider that opens a InputStream to the keystore file, must not be null.
        keystorePassword - the keystore password. May be empty to omit password and the keystore integrity check.
        Returns:
        this
      • truststore

        public SslOptions.Builder truststore​(java.io.File truststore)
        Sets the Truststore file to load trusted certificates.
        Parameters:
        truststore - the truststore file, must not be null.
        Returns:
        this
      • truststore

        public SslOptions.Builder truststore​(java.io.File truststore,
                                             char[] truststorePassword)
        Sets the Truststore file to load trusted certificates.
        Parameters:
        truststore - the truststore file, must not be null.
        truststorePassword - the truststore password. May be empty to omit password and the truststore integrity check.
        Returns:
        this
      • truststore

        public SslOptions.Builder truststore​(java.net.URL truststore)
        Sets the Truststore resource to load trusted certificates.
        Parameters:
        truststore - the truststore URL, must not be null.
        Returns:
        this
      • truststore

        public SslOptions.Builder truststore​(java.net.URL truststore,
                                             char[] truststorePassword)
        Sets the Truststore resource to load trusted certificates.
        Parameters:
        truststore - the truststore URL, must not be null.
        truststorePassword - the truststore password. May be empty to omit password and the truststore integrity check.
        Returns:
        this
      • truststore

        public SslOptions.Builder truststore​(SslOptions.Resource resource,
                                             char[] truststorePassword)
        Sets the Truststore resource to load trusted certificates.
        Parameters:
        resource - the provider that opens a InputStream to the keystore file, must not be null.
        truststorePassword - the truststore password. May be empty to omit password and the truststore integrity check.
        Returns:
        this
      • sslParameters

        public SslOptions.Builder sslParameters​(javax.net.ssl.SSLParameters sslParameters)
        Sets SSL parameters.
        Parameters:
        sslParameters - the SSL parameters
        Returns:
        this
      • sslVerifyMode

        public SslOptions.Builder sslVerifyMode​(SslVerifyMode sslVerifyMode)
        Sets SSL verify mode.
        Parameters:
        sslVerifyMode - the SSL verify mode
        Returns:
        this
      • sslProtocol

        public SslOptions.Builder sslProtocol​(java.lang.String sslProtocol)
        Sets SSL protocol.
        Parameters:
        sslProtocol - the SSL protocol
        Returns:
        this