Class SslConfigurationBuilder
- java.lang.Object
-
- org.infinispan.client.hotrod.configuration.AbstractConfigurationChildBuilder
-
- org.infinispan.client.hotrod.configuration.AbstractSecurityConfigurationChildBuilder
-
- org.infinispan.client.hotrod.configuration.SslConfigurationBuilder
-
- All Implemented Interfaces:
ConfigurationChildBuilder
,Builder<SslConfiguration>
public class SslConfigurationBuilder extends AbstractSecurityConfigurationChildBuilder implements Builder<SslConfiguration>
SSLConfigurationBuilder.- Since:
- 5.3
- Author:
- Tristan Tarrant
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SslConfigurationBuilder(SecurityConfigurationBuilder builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description SslConfiguration
create()
Create the configuration beanSslConfigurationBuilder
disable()
Disables the SSL supportSslConfigurationBuilder
enable()
Enables the SSL supportSslConfigurationBuilder
enabled(boolean enabled)
Enables or disables the SSL supportSslConfigurationBuilder
keyAlias(String keyAlias)
Sets the alias of the key to use, in case the keyStore contains multiple certificates.SslConfigurationBuilder
keyStoreCertificatePassword(char[] keyStoreCertificatePassword)
Deprecated.since 9.3SslConfigurationBuilder
keyStoreFileName(String keyStoreFileName)
Specifies the filename of a keystore to use to create theSSLContext
You also need to specify akeyStorePassword(char[])
.SslConfigurationBuilder
keyStorePassword(char[] keyStorePassword)
Specifies the password needed to open the keystore You also need to specify akeyStoreFileName(String)
.SslConfigurationBuilder
keyStoreType(String keyStoreType)
Specifies the type of the keystore, such as JKS or JCEKS.SslConfigurationBuilder
protocol(String protocol)
Configures the secure socket protocol.SslConfigurationBuilder
read(SslConfiguration template)
Reads the configuration from an already created configuration bean into this builder.SslConfigurationBuilder
sniHostName(String sniHostName)
Specifies the TLS SNI hostname for the connectionSslConfigurationBuilder
sslContext(SSLContext sslContext)
SslConfigurationBuilder
trustStoreFileName(String trustStoreFileName)
Specifies the filename of a truststore to use to create theSSLContext
You also need to specify atrustStorePassword(char[])
.SslConfigurationBuilder
trustStorePassword(char[] trustStorePassword)
Specifies the password needed to open the truststore You also need to specify atrustStoreFileName(String)
.SslConfigurationBuilder
trustStorePath(String trustStorePath)
Specifies a path containing certificates in PEM format.SslConfigurationBuilder
trustStoreType(String trustStoreType)
Specifies the type of the truststore, such as JKS or JCEKS.void
validate()
Validate the data in this builder before building the configuration beanConfigurationBuilder
withProperties(Properties properties)
Configures this builder using the specified properties.-
Methods inherited from class org.infinispan.client.hotrod.configuration.AbstractSecurityConfigurationChildBuilder
authentication, ssl
-
Methods inherited from class org.infinispan.client.hotrod.configuration.AbstractConfigurationChildBuilder
addCluster, addContextInitializer, addContextInitializer, addContextInitializers, addJavaSerialWhiteList, addServer, addServers, asyncExecutorFactory, balancingStrategy, balancingStrategy, balancingStrategy, balancingStrategy, batchSize, build, classLoader, clientIntelligence, connectionPool, connectionTimeout, consistentHashImpl, consistentHashImpl, forceReturnValues, keySizeEstimate, marshaller, marshaller, marshaller, maxRetries, protocolVersion, remoteCache, security, socketTimeout, statistics, tcpKeepAlive, tcpNoDelay, transaction, valueSizeEstimate, version
-
-
-
-
Constructor Detail
-
SslConfigurationBuilder
protected SslConfigurationBuilder(SecurityConfigurationBuilder builder)
-
-
Method Detail
-
disable
public SslConfigurationBuilder disable()
Disables the SSL support
-
enable
public SslConfigurationBuilder enable()
Enables the SSL support
-
enabled
public SslConfigurationBuilder enabled(boolean enabled)
Enables or disables the SSL support
-
keyStoreFileName
public SslConfigurationBuilder keyStoreFileName(String keyStoreFileName)
Specifies the filename of a keystore to use to create theSSLContext
You also need to specify akeyStorePassword(char[])
. Alternatively specify an initializedsslContext(SSLContext)
. Setting this property also implicitly enables SSL/TLS (seeenable()
-
keyStoreType
public SslConfigurationBuilder keyStoreType(String keyStoreType)
Specifies the type of the keystore, such as JKS or JCEKS. Defaults to JKS. Setting this property also implicitly enables SSL/TLS (seeenable()
-
keyStorePassword
public SslConfigurationBuilder keyStorePassword(char[] keyStorePassword)
Specifies the password needed to open the keystore You also need to specify akeyStoreFileName(String)
. Alternatively specify an initializedsslContext(SSLContext)
. Setting this property also implicitly enables SSL/TLS (seeenable()
-
keyStoreCertificatePassword
@Deprecated public SslConfigurationBuilder keyStoreCertificatePassword(char[] keyStoreCertificatePassword)
Deprecated.since 9.3Specifies the password needed to access private key associated with certificate stored in specifiedkeyStoreFileName(String)
. If password is not specified, password provided inkeyStorePassword(char[])
will be used. Setting this property also implicitly enables SSL/TLS (seeenable()
Note: this only works with some keystore types
-
keyAlias
public SslConfigurationBuilder keyAlias(String keyAlias)
Sets the alias of the key to use, in case the keyStore contains multiple certificates. Setting this property also implicitly enables SSL/TLS (seeenable()
-
sslContext
public SslConfigurationBuilder sslContext(SSLContext sslContext)
-
trustStoreFileName
public SslConfigurationBuilder trustStoreFileName(String trustStoreFileName)
Specifies the filename of a truststore to use to create theSSLContext
You also need to specify atrustStorePassword(char[])
. Alternatively specify an initializedsslContext(SSLContext)
. Setting this property also implicitly enables SSL/TLS (seeenable()
-
trustStorePath
public SslConfigurationBuilder trustStorePath(String trustStorePath)
Specifies a path containing certificates in PEM format. An in-memoryKeyStore
will be built with all the certificates found undert that path. This is mutually exclusive withtrustStoreFileName
Setting this property also implicitly enables SSL/TLS (seeenable()
-
trustStoreType
public SslConfigurationBuilder trustStoreType(String trustStoreType)
Specifies the type of the truststore, such as JKS or JCEKS. Defaults to JKS. Setting this property also implicitly enables SSL/TLS (seeenable()
-
trustStorePassword
public SslConfigurationBuilder trustStorePassword(char[] trustStorePassword)
Specifies the password needed to open the truststore You also need to specify atrustStoreFileName(String)
. Alternatively specify an initializedsslContext(SSLContext)
. Setting this property also implicitly enables SSL/TLS (seeenable()
-
sniHostName
public SslConfigurationBuilder sniHostName(String sniHostName)
Specifies the TLS SNI hostname for the connection
-
protocol
public SslConfigurationBuilder protocol(String protocol)
Configures the secure socket protocol. Setting this property also implicitly enables SSL/TLS (seeenable()
- Parameters:
protocol
- The standard name of the requested protocol, e.g TLSv1.2- See Also:
SSLContext.getInstance(String)
-
validate
public void validate()
Description copied from interface:Builder
Validate the data in this builder before building the configuration bean- Specified by:
validate
in interfaceBuilder<SslConfiguration>
-
create
public SslConfiguration create()
Description copied from interface:Builder
Create the configuration bean- Specified by:
create
in interfaceBuilder<SslConfiguration>
- Returns:
-
read
public SslConfigurationBuilder read(SslConfiguration template)
Description copied from interface:Builder
Reads the configuration from an already created configuration bean into this builder. Returns an appropriate builder to allow fluent configuration- Specified by:
read
in interfaceBuilder<SslConfiguration>
- Parameters:
template
- the configuration from which to "clone" this config if needed.
-
withProperties
public ConfigurationBuilder withProperties(Properties properties)
Description copied from interface:ConfigurationChildBuilder
Configures this builder using the specified properties. SeeConfigurationBuilder
for a list.- Specified by:
withProperties
in interfaceConfigurationChildBuilder
- Overrides:
withProperties
in classAbstractConfigurationChildBuilder
-
-