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 protectedSslConfigurationBuilder(SecurityConfigurationBuilder builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description SslConfigurationcreate()Create the configuration beanSslConfigurationBuilderdisable()Disables the SSL supportSslConfigurationBuilderenable()Enables the SSL supportSslConfigurationBuilderenabled(boolean enabled)Enables or disables the SSL supportSslConfigurationBuilderkeyAlias(String keyAlias)Sets the alias of the key to use, in case the keyStore contains multiple certificates.SslConfigurationBuilderkeyStoreCertificatePassword(char[] keyStoreCertificatePassword)Deprecated.since 9.3SslConfigurationBuilderkeyStoreFileName(String keyStoreFileName)Specifies the filename of a keystore to use to create theSSLContextYou also need to specify akeyStorePassword(char[]).SslConfigurationBuilderkeyStorePassword(char[] keyStorePassword)Specifies the password needed to open the keystore You also need to specify akeyStoreFileName(String).SslConfigurationBuilderkeyStoreType(String keyStoreType)Specifies the type of the keystore, such as JKS or JCEKS.SslConfigurationBuilderprotocol(String protocol)Configures the secure socket protocol.SslConfigurationBuilderread(SslConfiguration template)Reads the configuration from an already created configuration bean into this builder.SslConfigurationBuildersniHostName(String sniHostName)Specifies the TLS SNI hostname for the connectionSslConfigurationBuildersslContext(SSLContext sslContext)SslConfigurationBuildertrustStoreFileName(String trustStoreFileName)Specifies the filename of a truststore to use to create theSSLContextYou also need to specify atrustStorePassword(char[]).SslConfigurationBuildertrustStorePassword(char[] trustStorePassword)Specifies the password needed to open the truststore You also need to specify atrustStoreFileName(String).SslConfigurationBuildertrustStorePath(String trustStorePath)Specifies a path containing certificates in PEM format.SslConfigurationBuildertrustStoreType(String trustStoreType)Specifies the type of the truststore, such as JKS or JCEKS.voidvalidate()Validate the data in this builder before building the configuration beanConfigurationBuilderwithProperties(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, addJavaSerialWhiteList, addServer, addServers, asyncExecutorFactory, balancingStrategy, balancingStrategy, balancingStrategy, balancingStrategy, batchSize, build, classLoader, clientIntelligence, connectionPool, connectionTimeout, consistentHashImpl, consistentHashImpl, forceReturnValues, keySizeEstimate, marshaller, marshaller, marshaller, maxRetries, protocolVersion, security, socketTimeout, statistics, tcpKeepAlive, tcpNoDelay, transaction, transportFactory, transportFactory, 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 theSSLContextYou 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 theSSLContextYou 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-memoryKeyStorewill be built with all the certificates found undert that path. This is mutually exclusive withtrustStoreFileNameSetting 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:BuilderValidate the data in this builder before building the configuration bean- Specified by:
validatein interfaceBuilder<SslConfiguration>
-
create
public SslConfiguration create()
Description copied from interface:BuilderCreate the configuration bean- Specified by:
createin interfaceBuilder<SslConfiguration>- Returns:
-
read
public SslConfigurationBuilder read(SslConfiguration template)
Description copied from interface:BuilderReads the configuration from an already created configuration bean into this builder. Returns an appropriate builder to allow fluent configuration- Specified by:
readin interfaceBuilder<SslConfiguration>- Parameters:
template- the configuration from which to "clone" this config if needed.
-
withProperties
public ConfigurationBuilder withProperties(Properties properties)
Description copied from interface:ConfigurationChildBuilderConfigures this builder using the specified properties. SeeConfigurationBuilderfor a list.- Specified by:
withPropertiesin interfaceConfigurationChildBuilder- Overrides:
withPropertiesin classAbstractConfigurationChildBuilder
-
-