public class RemoteEndpointAwareNettySSLOptions extends NettySSLOptions implements ExtendedRemoteEndpointAwareSslOptions
RemoteEndpointAwareSSLOptions
implementation 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.
context
Constructor and Description |
---|
RemoteEndpointAwareNettySSLOptions(io.netty.handler.ssl.SslContext context)
Create a new instance from a given context.
|
Modifier and Type | Method and Description |
---|---|
io.netty.handler.ssl.SslHandler |
newSSLHandler(io.netty.channel.socket.SocketChannel channel)
Creates a new SSL handler for the given Netty channel.
|
io.netty.handler.ssl.SslHandler |
newSSLHandler(io.netty.channel.socket.SocketChannel channel,
EndPoint remoteEndpoint)
Creates a new SSL handler for the given Netty channel and the given remote endpoint.
|
io.netty.handler.ssl.SslHandler |
newSSLHandler(io.netty.channel.socket.SocketChannel channel,
InetSocketAddress remoteEndpoint)
Creates a new SSL handler for the given Netty channel and the given remote endpoint.
|
public RemoteEndpointAwareNettySSLOptions(io.netty.handler.ssl.SslContext context)
context
- the Netty context. SslContextBuilder.forClient()
provides a fluent API
to build it.public io.netty.handler.ssl.SslHandler newSSLHandler(io.netty.channel.socket.SocketChannel channel)
SSLOptions
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: JdkSSLOptions
and NettySSLOptions
.
newSSLHandler
in interface SSLOptions
newSSLHandler
in class NettySSLOptions
channel
- the channel.public io.netty.handler.ssl.SslHandler newSSLHandler(io.netty.channel.socket.SocketChannel channel, EndPoint remoteEndpoint)
ExtendedRemoteEndpointAwareSslOptions
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: RemoteEndpointAwareJdkSSLOptions
and RemoteEndpointAwareNettySSLOptions
.
newSSLHandler
in interface ExtendedRemoteEndpointAwareSslOptions
channel
- the channel.remoteEndpoint
- the remote endpoint information.SslHandler
.public io.netty.handler.ssl.SslHandler newSSLHandler(io.netty.channel.socket.SocketChannel channel, InetSocketAddress remoteEndpoint)
RemoteEndpointAwareSSLOptions
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: RemoteEndpointAwareJdkSSLOptions
and RemoteEndpointAwareNettySSLOptions
.
newSSLHandler
in interface RemoteEndpointAwareSSLOptions
channel
- the channel.remoteEndpoint
- the remote endpoint address.SslHandler
.Copyright © 2012–2019. All rights reserved.