java.lang.Object
io.lettuce.core.SslOptions
public class SslOptions extends Object
Options to configure SSL options for the connections kept to Redis servers.
- Since:
- 4.3
- Author:
- Mark Paluch, Amin Mohtashami, Felipe Ruiz
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSslOptions.BuilderBuilder forSslOptions.static interfaceSslOptions.ResourceSupplier for aInputStreamrepresenting a resource. -
Field Summary
Fields Modifier and Type Field Description static SslProviderDEFAULT_SSL_PROVIDER -
Constructor Summary
Constructors Modifier Constructor Description protectedSslOptions(SslOptions original)protectedSslOptions(SslOptions.Builder builder) -
Method Summary
Modifier and Type Method Description static SslOptions.Builderbuilder()Returns a newSslOptions.Builderto constructSslOptions.static SslOptionscopyOf(SslOptions options)Create a copy of optionsstatic SslOptionscreate()Create a newSslOptionsusing default settings.SslContextBuildercreateSslContextBuilder()Creates a newSslContextBuilderobject that is pre-configured with values from thisSslOptionsobject.SSLParameterscreateSSLParameters()Creates aSSLParametersobject that is pre-configured with values from thisSslOptionsobject.String[]getCipherSuites()DurationgetHandshakeTimeout()URLgetKeystore()Deprecated.char[]getKeystorePassword()Deprecated.since 5.3,KeyManageris configured viacreateSslContextBuilder().String[]getProtocols()SslProvidergetSslProvider()Deprecated.URLgetTruststore()Deprecated.since 5.3,TrustManageris configured viacreateSslContextBuilder().char[]getTruststorePassword()Deprecated.since 5.3,TrustManageris configured viacreateSslContextBuilder().SslOptions.Buildermutate()Returns a builder to create newSslOptionswhose settings are replicated from the currentSslOptions.
-
Field Details
-
DEFAULT_SSL_PROVIDER
-
-
Constructor Details
-
SslOptions
-
SslOptions
-
-
Method Details
-
copyOf
Create a copy of options- Parameters:
options- the original- Returns:
- A new instance of
SslOptionscontaining the values of options
-
builder
Returns a newSslOptions.Builderto constructSslOptions.- Returns:
- a new
SslOptions.Builderto constructSslOptions.
-
create
Create a newSslOptionsusing default settings.- Returns:
- a new instance of default cluster client client options.
-
createSslContextBuilder
Creates a newSslContextBuilderobject that is pre-configured with values from thisSslOptionsobject.- Returns:
- a new
SslContextBuilder. - Throws:
IOException- thrown when loading the keystore or the truststore fails.GeneralSecurityException- thrown when loading the keystore or the truststore fails.- Since:
- 5.3
-
createSSLParameters
Creates aSSLParametersobject that is pre-configured with values from thisSslOptionsobject.- Returns:
- a new a
SSLParametersobject. - Since:
- 5.3
-
mutate
Returns a builder to create newSslOptionswhose settings are replicated from the currentSslOptions.- Returns:
- a
SslOptions.Builderto create newSslOptionswhose settings are replicated from the currentSslOptions - Since:
- 5.3
-
getSslProvider
Deprecated.- Returns:
- the configured
SslProvider.
-
getKeystore
Deprecated.since 5.3,KeyManageris configured viacreateSslContextBuilder().- Returns:
- the keystore
URL.
-
getProtocols
- Returns:
- the set of protocols
-
getCipherSuites
- Returns:
- the set of cipher suites
-
getHandshakeTimeout
- Returns:
- the SSL handshake timeout
- Since:
- 5.3.2
-
getKeystorePassword
Deprecated.since 5.3,KeyManageris configured viacreateSslContextBuilder().- Returns:
- the password for the keystore. May be empty.
-
getTruststore
Deprecated.since 5.3,TrustManageris configured viacreateSslContextBuilder().- Returns:
- the truststore
URL.
-
getTruststorePassword
Deprecated.since 5.3,TrustManageris configured viacreateSslContextBuilder().- Returns:
- the password for the truststore. May be empty.
-
KeyManageris configured viacreateSslContextBuilder().