- java.lang.Object
-
- io.netty5.handler.ssl.SslContext
-
- io.netty5.handler.ssl.DelegatingSslContext
-
public abstract class DelegatingSslContext extends SslContext
Adapter class which allows to wrap anotherSslContext
and initSSLEngine
instances.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DelegatingSslContext(SslContext ctx)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ApplicationProtocolNegotiator
applicationProtocolNegotiator()
Returns the object responsible for negotiating application layer protocols for the TLS NPN/ALPN extensions.List<String>
cipherSuites()
Returns the list of enabled cipher suites, in the order of preference.protected abstract void
initEngine(SSLEngine engine)
Init theSSLEngine
.protected void
initHandler(SslHandler handler)
Init theSslHandler
.boolean
isClient()
Returns thetrue
if and only if this context is for client-side.SSLEngine
newEngine(BufferAllocator alloc)
Creates a newSSLEngine
.SSLEngine
newEngine(BufferAllocator alloc, String peerHost, int peerPort)
Creates a newSSLEngine
using advisory peer information.protected SslHandler
newHandler(BufferAllocator alloc, boolean startTls)
Create a new SslHandler.protected SslHandler
newHandler(BufferAllocator alloc, boolean startTls, Executor executor)
Create a new SslHandler.protected SslHandler
newHandler(BufferAllocator alloc, String peerHost, int peerPort, boolean startTls)
Create a new SslHandler.protected SslHandler
newHandler(BufferAllocator alloc, String peerHost, int peerPort, boolean startTls, Executor executor)
long
sessionCacheSize()
Returns the size of the cache used for storing SSL session objects.SSLSessionContext
sessionContext()
Returns theSSLSessionContext
object held by this context.long
sessionTimeout()
Returns the timeout for the cached SSL session objects, in seconds.-
Methods inherited from class io.netty5.handler.ssl.SslContext
attributes, buildKeyManagerFactory, buildKeyStore, buildTrustManagerFactory, buildTrustManagerFactory, buildTrustManagerFactory, defaultClientProvider, defaultServerProvider, generateKeySpec, isServer, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newHandler, newHandler, newHandler, newHandler, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, nextProtocols, toPrivateKey, toPrivateKey, toX509Certificates, toX509Certificates
-
-
-
-
Constructor Detail
-
DelegatingSslContext
protected DelegatingSslContext(SslContext ctx)
-
-
Method Detail
-
isClient
public final boolean isClient()
Description copied from class:SslContext
Returns thetrue
if and only if this context is for client-side.- Specified by:
isClient
in classSslContext
-
cipherSuites
public final List<String> cipherSuites()
Description copied from class:SslContext
Returns the list of enabled cipher suites, in the order of preference.- Specified by:
cipherSuites
in classSslContext
-
sessionCacheSize
public final long sessionCacheSize()
Description copied from class:SslContext
Returns the size of the cache used for storing SSL session objects.- Overrides:
sessionCacheSize
in classSslContext
-
sessionTimeout
public final long sessionTimeout()
Description copied from class:SslContext
Returns the timeout for the cached SSL session objects, in seconds.- Overrides:
sessionTimeout
in classSslContext
-
applicationProtocolNegotiator
public final ApplicationProtocolNegotiator applicationProtocolNegotiator()
Description copied from class:SslContext
Returns the object responsible for negotiating application layer protocols for the TLS NPN/ALPN extensions.- Specified by:
applicationProtocolNegotiator
in classSslContext
-
newEngine
public final SSLEngine newEngine(BufferAllocator alloc)
Description copied from class:SslContext
Creates a newSSLEngine
.If
SslProvider.OPENSSL_REFCNT
is used then the object must be released. One way to do this is to wrap in aSslHandler
and insert it into a pipeline. SeeSslContext.newHandler(BufferAllocator)
.- Specified by:
newEngine
in classSslContext
- Returns:
- a new
SSLEngine
-
newEngine
public final SSLEngine newEngine(BufferAllocator alloc, String peerHost, int peerPort)
Description copied from class:SslContext
Creates a newSSLEngine
using advisory peer information.If
SslProvider.OPENSSL_REFCNT
is used then the object must be released. One way to do this is to wrap in aSslHandler
and insert it into a pipeline. SeeSslContext.newHandler(BufferAllocator, String, int)
.- Specified by:
newEngine
in classSslContext
peerHost
- the non-authoritative name of the hostpeerPort
- the non-authoritative port- Returns:
- a new
SSLEngine
-
newHandler
protected final SslHandler newHandler(BufferAllocator alloc, boolean startTls)
Description copied from class:SslContext
Create a new SslHandler.- Overrides:
newHandler
in classSslContext
- See Also:
SslContext.newHandler(BufferAllocator)
-
newHandler
protected final SslHandler newHandler(BufferAllocator alloc, String peerHost, int peerPort, boolean startTls)
Description copied from class:SslContext
Create a new SslHandler.- Overrides:
newHandler
in classSslContext
- See Also:
SslContext.newHandler(BufferAllocator, String, int, boolean, Executor)
-
newHandler
protected SslHandler newHandler(BufferAllocator alloc, boolean startTls, Executor executor)
Description copied from class:SslContext
Create a new SslHandler.- Overrides:
newHandler
in classSslContext
- See Also:
SslContext.newHandler(BufferAllocator, String, int, boolean, Executor)
-
newHandler
protected SslHandler newHandler(BufferAllocator alloc, String peerHost, int peerPort, boolean startTls, Executor executor)
- Overrides:
newHandler
in classSslContext
-
sessionContext
public final SSLSessionContext sessionContext()
Description copied from class:SslContext
Returns theSSLSessionContext
object held by this context.- Specified by:
sessionContext
in classSslContext
-
initHandler
protected void initHandler(SslHandler handler)
Init theSslHandler
. This will by default callinitEngine(SSLEngine)
, sub-classes may override this.
-
-