Class RemoteEndpointAwareJdkSSLOptions
- java.lang.Object
-
- com.datastax.driver.core.JdkSSLOptions
-
- com.datastax.driver.core.RemoteEndpointAwareJdkSSLOptions
-
- All Implemented Interfaces:
ExtendedRemoteEndpointAwareSslOptions,RemoteEndpointAwareSSLOptions,SSLOptions
public class RemoteEndpointAwareJdkSSLOptions extends JdkSSLOptions implements ExtendedRemoteEndpointAwareSslOptions
RemoteEndpointAwareSSLOptionsimplementation based on built-in JDK classes.- Since:
- 3.2.0
- See Also:
- JAVA-1364
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRemoteEndpointAwareJdkSSLOptions.BuilderHelper class to buildRemoteEndpointAwareJdkSSLOptionsinstances.
-
Field Summary
-
Fields inherited from class com.datastax.driver.core.JdkSSLOptions
cipherSuites, context
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRemoteEndpointAwareJdkSSLOptions(SSLContext context, String[] cipherSuites)Creates a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RemoteEndpointAwareJdkSSLOptions.Builderbuilder()Creates a builder to create a new instance.protected SSLEnginenewSSLEngine(SocketChannel channel, InetSocketAddress remoteEndpoint)Creates an SSL engine each time a connection is established.SslHandlernewSSLHandler(SocketChannel channel)Creates a new SSL handler for the given Netty channel.SslHandlernewSSLHandler(SocketChannel channel, EndPoint remoteEndpoint)Creates a new SSL handler for the given Netty channel and the given remote endpoint.SslHandlernewSSLHandler(SocketChannel channel, InetSocketAddress remoteEndpoint)Creates a new SSL handler for the given Netty channel and the given remote endpoint.-
Methods inherited from class com.datastax.driver.core.JdkSSLOptions
newSSLEngine
-
-
-
-
Constructor Detail
-
RemoteEndpointAwareJdkSSLOptions
protected RemoteEndpointAwareJdkSSLOptions(SSLContext context, String[] cipherSuites)
Creates a new instance.- Parameters:
context- the SSL context.cipherSuites- the cipher suites to use.
-
-
Method Detail
-
builder
public static RemoteEndpointAwareJdkSSLOptions.Builder builder()
Creates a builder to create a new instance.- Returns:
- the builder.
-
newSSLHandler
public SslHandler newSSLHandler(SocketChannel channel)
Description copied from interface:SSLOptionsCreates a new SSL handler for the given Netty channel.This gets called each time the driver opens a new connection to a Cassandra host. The newly created handler will be added to the channel's pipeline to provide SSL support for the connection.
You don't necessarily need to implement this method directly; see the provided implementations:
JdkSSLOptionsandNettySSLOptions.- Specified by:
newSSLHandlerin interfaceSSLOptions- Overrides:
newSSLHandlerin classJdkSSLOptions- Parameters:
channel- the channel.- Returns:
- the handler.
-
newSSLHandler
public SslHandler newSSLHandler(SocketChannel channel, EndPoint remoteEndpoint)
Description copied from interface:ExtendedRemoteEndpointAwareSslOptionsCreates a new SSL handler for the given Netty channel and the given remote endpoint.This gets called each time the driver opens a new connection to a Cassandra host. The newly created handler will be added to the channel's pipeline to provide SSL support for the connection.
You don't necessarily need to implement this method directly; see the provided implementations:
RemoteEndpointAwareJdkSSLOptionsandRemoteEndpointAwareNettySSLOptions.- Specified by:
newSSLHandlerin interfaceExtendedRemoteEndpointAwareSslOptions- Parameters:
channel- the channel.remoteEndpoint- the remote endpoint information.- Returns:
- a newly-created
SslHandler.
-
newSSLHandler
public SslHandler newSSLHandler(SocketChannel channel, InetSocketAddress remoteEndpoint)
Description copied from interface:RemoteEndpointAwareSSLOptionsCreates a new SSL handler for the given Netty channel and the given remote endpoint.This gets called each time the driver opens a new connection to a Cassandra host. The newly created handler will be added to the channel's pipeline to provide SSL support for the connection.
You don't necessarily need to implement this method directly; see the provided implementations:
RemoteEndpointAwareJdkSSLOptionsandRemoteEndpointAwareNettySSLOptions.- Specified by:
newSSLHandlerin interfaceRemoteEndpointAwareSSLOptions- Parameters:
channel- the channel.remoteEndpoint- the remote endpoint address.- Returns:
- a newly-created
SslHandler.
-
newSSLEngine
protected SSLEngine newSSLEngine(SocketChannel channel, InetSocketAddress remoteEndpoint)
Creates an SSL engine each time a connection is established.You might want to override this if you need to fine-tune the engine's configuration (for example enabling hostname verification).
- Parameters:
channel- the Netty channel for that connection.remoteEndpoint- the remote endpoint we are connecting to.- Returns:
- the engine.
- Since:
- 3.2.0
-
-