Class RemoteEndpointAwareNettySSLOptions
- java.lang.Object
-
- com.datastax.driver.core.NettySSLOptions
-
- com.datastax.driver.core.RemoteEndpointAwareNettySSLOptions
-
- All Implemented Interfaces:
ExtendedRemoteEndpointAwareSslOptions,RemoteEndpointAwareSSLOptions,SSLOptions
public class RemoteEndpointAwareNettySSLOptions extends NettySSLOptions implements ExtendedRemoteEndpointAwareSslOptions
RemoteEndpointAwareSSLOptionsimplementation based on Netty's SSL context.Netty has the ability to use OpenSSL if available, instead of the JDK's built-in engine. This yields better performance.
- Since:
- 3.2.0
- See Also:
- JAVA-1364
-
-
Field Summary
-
Fields inherited from class com.datastax.driver.core.NettySSLOptions
context
-
-
Constructor Summary
Constructors Constructor Description RemoteEndpointAwareNettySSLOptions(SslContext context)Create a new instance from a given context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
Constructor Detail
-
RemoteEndpointAwareNettySSLOptions
public RemoteEndpointAwareNettySSLOptions(SslContext context)
Create a new instance from a given context.- Parameters:
context- the Netty context.SslContextBuilder.forClient()provides a fluent API to build it.
-
-
Method Detail
-
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 classNettySSLOptions- 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.
-
-