Class SslConfigurationBuilder<T extends ProtocolServerConfiguration,S extends ProtocolServerConfigurationChildBuilder<T,S>>
- java.lang.Object
-
- org.infinispan.server.core.configuration.AbstractProtocolServerConfigurationChildBuilder<T,S>
-
- org.infinispan.server.core.configuration.SslConfigurationBuilder<T,S>
-
- All Implemented Interfaces:
Builder<SslConfiguration>
,Self<S>
,ProtocolServerConfigurationChildBuilder<T,S>
public class SslConfigurationBuilder<T extends ProtocolServerConfiguration,S extends ProtocolServerConfigurationChildBuilder<T,S>> extends AbstractProtocolServerConfigurationChildBuilder<T,S> implements Builder<SslConfiguration>
SSLConfigurationBuilder.- Since:
- 5.3
- Author:
- Tristan Tarrant, Sebastian Ćaskawiec
-
-
Field Summary
-
Fields inherited from class org.infinispan.server.core.configuration.AbstractProtocolServerConfigurationChildBuilder
builder
-
-
Constructor Summary
Constructors Constructor Description SslConfigurationBuilder(ProtocolServerConfigurationChildBuilder<T,S> builder)
-
Method Summary
All Methods Instance Methods Concrete 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)
Selects a specific key to choose from the keystoreSslConfigurationBuilder
keyStoreCertificatePassword(char[] keyStoreCertificatePassword)
Specifies the password needed to access private key associated with certificate stored in specifiedkeyStoreFileName(String)
.SslConfigurationBuilder
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
requireClientAuth(boolean requireClientAuth)
Enables client certificate authenticationS
self()
SslEngineConfigurationBuilder
sniHostName(String domain)
Returns SNI domain configuration.SslConfigurationBuilder
sslContext(SSLContext sslContext)
Sets theSSLContext
to use for setting up SSL connections.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
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 bean-
Methods inherited from class org.infinispan.server.core.configuration.AbstractProtocolServerConfigurationChildBuilder
adminOperationsHandler, build, defaultCacheName, host, idleTimeout, ioThreads, name, port, recvBufSize, sendBufSize, socketBinding, ssl, startTransport, tcpKeepAlive, tcpNoDelay, workerThreads
-
-
-
-
Constructor Detail
-
SslConfigurationBuilder
public SslConfigurationBuilder(ProtocolServerConfigurationChildBuilder<T,S> 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
-
requireClientAuth
public SslConfigurationBuilder requireClientAuth(boolean requireClientAuth)
Enables client certificate authentication
-
sniHostName
public SslEngineConfigurationBuilder sniHostName(String domain)
Returns SNI domain configuration.- Parameters:
domain
- A domain which will hold configuration details. It is also possible to specify*
for all domains.- Returns:
SslConfigurationBuilder
instance associated with specified domain.
-
sslContext
public SslConfigurationBuilder sslContext(SSLContext sslContext)
Sets theSSLContext
to use for setting up SSL connections.
-
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 prebuiltSSLContext
throughsslContext(SSLContext)
.
-
keyStoreType
public SslConfigurationBuilder keyStoreType(String keyStoreType)
Specifies the type of the keystore, such as JKS or JCEKS. Defaults to JKS
-
keyStorePassword
public SslConfigurationBuilder keyStorePassword(char[] keyStorePassword)
Specifies the password needed to open the keystore You also need to specify akeyStoreFileName(String)
. Alternatively specify prebuiltSSLContext
throughsslContext(SSLContext)
.
-
keyStoreCertificatePassword
public SslConfigurationBuilder keyStoreCertificatePassword(char[] keyStoreCertificatePassword)
Specifies the password needed to access private key associated with certificate stored in specifiedkeyStoreFileName(String)
. If password is not specified, the password provided inkeyStorePassword(char[])
will be used.
-
keyAlias
public SslConfigurationBuilder keyAlias(String keyAlias)
Selects a specific key to choose from the keystore
-
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 prebuiltSSLContext
throughsslContext(SSLContext)
.
-
trustStoreType
public SslConfigurationBuilder trustStoreType(String trustStoreType)
Specifies the type of the truststore, such as JKS or JCEKS. Defaults to JKS
-
trustStorePassword
public SslConfigurationBuilder trustStorePassword(char[] trustStorePassword)
Specifies the password needed to open the truststore You also need to specify atrustStoreFileName(String)
. Alternatively specify prebuiltSSLContext
throughsslContext(SSLContext)
.
-
protocol
public SslConfigurationBuilder protocol(String protocol)
Configures the secure socket protocol.- 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<T extends ProtocolServerConfiguration>
-
create
public SslConfiguration create()
Description copied from interface:Builder
Create the configuration bean- Specified by:
create
in interfaceBuilder<T extends ProtocolServerConfiguration>
- 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<T extends ProtocolServerConfiguration>
- Parameters:
template
- the configuration from which to "clone" this config if needed.
-
self
public S self()
- Specified by:
self
in interfaceSelf<T extends ProtocolServerConfiguration>
-
-