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 SslConfigurationcreate()Create the configuration beanSslConfigurationBuilderdisable()Disables the SSL supportSslConfigurationBuilderenable()Enables the SSL supportSslConfigurationBuilderenabled(boolean enabled)Enables or disables the SSL supportbooleanisEnabled()SslConfigurationBuilderkeyAlias(String keyAlias)Selects a specific key to choose from the keystoreSslConfigurationBuilderkeyStoreCertificatePassword(char[] keyStoreCertificatePassword)Specifies the password needed to access private key associated with certificate stored in specifiedkeyStoreFileName(String).SslConfigurationBuilderkeyStoreFileName(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.SslConfigurationBuilderrequireClientAuth(boolean requireClientAuth)Enables client certificate authenticationSself()SslEngineConfigurationBuildersniHostName(String domain)Returns SNI domain configuration.SslConfigurationBuildersslContext(SSLContext sslContext)Sets theSSLContextto use for setting up SSL connections.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).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 bean-
Methods inherited from class org.infinispan.server.core.configuration.AbstractProtocolServerConfigurationChildBuilder
adminOperationsHandler, build, defaultCacheName, host, idleTimeout, ioThreads, ipFilter, 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
-
isEnabled
public boolean isEnabled()
-
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:
SslConfigurationBuilderinstance associated with specified domain.
-
sslContext
public SslConfigurationBuilder sslContext(SSLContext sslContext)
Sets theSSLContextto use for setting up SSL connections.
-
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 prebuiltSSLContextthroughsslContext(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 prebuiltSSLContextthroughsslContext(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 theSSLContextYou also need to specify atrustStorePassword(char[]). Alternatively specify prebuiltSSLContextthroughsslContext(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 prebuiltSSLContextthroughsslContext(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:BuilderValidate the data in this builder before building the configuration bean- Specified by:
validatein interfaceBuilder<T extends ProtocolServerConfiguration>
-
create
public SslConfiguration create()
Description copied from interface:BuilderCreate the configuration bean- Specified by:
createin interfaceBuilder<T extends ProtocolServerConfiguration>- 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<T extends ProtocolServerConfiguration>- Parameters:
template- the configuration from which to "clone" this config if needed.
-
self
public S self()
- Specified by:
selfin interfaceSelf<T extends ProtocolServerConfiguration>
-
-