Package com.datastax.driver.core
Class JdkSSLOptions.Builder
- java.lang.Object
-
- com.datastax.driver.core.JdkSSLOptions.Builder
-
- Direct Known Subclasses:
RemoteEndpointAwareJdkSSLOptions.Builder,SniSSLOptions.Builder
- Enclosing class:
- JdkSSLOptions
public static class JdkSSLOptions.Builder extends Object
Helper class to build JDK-based SSL options.
-
-
Field Summary
Fields Modifier and Type Field Description protected String[]cipherSuitesprotected SSLContextcontext
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JdkSSLOptionsbuild()Builds a new instance based on the parameters provided to this builder.JdkSSLOptions.BuilderwithCipherSuites(String[] cipherSuites)Set the cipher suites to use.JdkSSLOptions.BuilderwithSSLContext(SSLContext context)Set the SSL context to use.
-
-
-
Field Detail
-
context
protected SSLContext context
-
cipherSuites
protected String[] cipherSuites
-
-
Method Detail
-
withSSLContext
public JdkSSLOptions.Builder withSSLContext(SSLContext context)
Set the SSL context to use.If this method isn't called, a context with the default options will be used, and you can use the default JSSE System properties to customize its behavior. This may in particular involve creating a simple keyStore and trustStore.
- Parameters:
context- the SSL context.- Returns:
- this builder.
-
withCipherSuites
public JdkSSLOptions.Builder withCipherSuites(String[] cipherSuites)
Set the cipher suites to use.If this method isn't called, the default is to present all the eligible client ciphers to the server.
- Parameters:
cipherSuites- the cipher suites to use.- Returns:
- this builder.
-
build
public JdkSSLOptions build()
Builds a new instance based on the parameters provided to this builder.- Returns:
- the new instance.
-
-