public class TransportSupport extends Object
| Constructor and Description |
|---|
TransportSupport() |
| Modifier and Type | Method and Description |
|---|---|
static SSLContext |
createJdkSslContext(TransportOptions options)
Create a new SSLContext using the options specific in the given TransportOptions
instance.
|
static SSLEngine |
createJdkSslEngine(URI remote,
SSLContext context,
TransportOptions options)
Create a new JDK SSLEngine instance in client mode from the given SSLContext and
TransportOptions instances.
|
static io.netty.handler.ssl.SslContext |
createOpenSslContext(TransportOptions options)
Create a new Netty SslContext using the options specific in the given TransportOptions
instance.
|
static SSLEngine |
createOpenSslEngine(io.netty.buffer.ByteBufAllocator allocator,
URI remote,
io.netty.handler.ssl.SslContext context,
TransportOptions options)
Create a new OpenSSL SSLEngine instance in client mode from the given SSLContext and
TransportOptions instances.
|
static io.netty.handler.ssl.SslHandler |
createSslHandler(io.netty.buffer.ByteBufAllocator allocator,
URI remote,
TransportOptions options)
Creates a Netty SslHandler instance for use in Transports that require
an SSL encoder / decoder.
|
static boolean |
isOpenSSLPossible(TransportOptions options)
Determines if Netty OpenSSL support is available and applicable based on the configuration
in the given TransportOptions instance.
|
public static boolean isOpenSSLPossible(TransportOptions options)
options - The configuration of the Transport being created.public static io.netty.handler.ssl.SslHandler createSslHandler(io.netty.buffer.ByteBufAllocator allocator,
URI remote,
TransportOptions options)
throws Exception
allocator - The Netty Buffer Allocator to use when Netty resources need to be created.remote - The URI of the remote peer that the SslHandler will be used against.options - The SSL options object to build the SslHandler instance from.Exception - if an error occurs while creating the SslHandler instance.public static SSLContext createJdkSslContext(TransportOptions options) throws Exception
options - the configured options used to create the SSLContext.Exception - if an error occurs while creating the context.public static SSLEngine createJdkSslEngine(URI remote, SSLContext context, TransportOptions options) throws Exception
remote - the URI of the remote peer that will be used to initialize the engine, may be null if none should.context - the SSLContext to use when creating the engine.options - the TransportOptions to use to configure the new SSLEngine.Exception - if an error occurs while creating the new SSLEngine.public static io.netty.handler.ssl.SslContext createOpenSslContext(TransportOptions options) throws Exception
options - the configured options used to create the SslContext.Exception - if an error occurs while creating the context.public static SSLEngine createOpenSslEngine(io.netty.buffer.ByteBufAllocator allocator, URI remote, io.netty.handler.ssl.SslContext context, TransportOptions options) throws Exception
allocator - the Netty ByteBufAllocator to use to create the OpenSSL engineremote - the URI of the remote peer that will be used to initialize the engine, may be null if none should.context - the Netty SslContext to use when creating the engine.options - the TransportOptions to use to configure the new SSLEngine.Exception - if an error occurs while creating the new SSLEngine.Copyright © 2013–2019 The Apache Software Foundation. All rights reserved.