Package io.netty.handler.ssl
Class DelegatingSslContext
- java.lang.Object
-
- io.netty.handler.ssl.SslContext
-
- io.netty.handler.ssl.DelegatingSslContext
-
public abstract class DelegatingSslContext extends SslContext
Adapter class which allows to wrap anotherSslContextand initSSLEngineinstances.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDelegatingSslContext(SslContext ctx)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ApplicationProtocolNegotiatorapplicationProtocolNegotiator()Returns the object responsible for negotiating application layer protocols for the TLS NPN/ALPN extensions.java.util.List<java.lang.String>cipherSuites()Returns the list of enabled cipher suites, in the order of preference.protected abstract voidinitEngine(javax.net.ssl.SSLEngine engine)Init theSSLEngine.protected voidinitHandler(SslHandler handler)Init theSslHandler.booleanisClient()Returns thetrueif and only if this context is for client-side.javax.net.ssl.SSLEnginenewEngine(ByteBufAllocator alloc)Creates a newSSLEngine.javax.net.ssl.SSLEnginenewEngine(ByteBufAllocator alloc, java.lang.String peerHost, int peerPort)Creates a newSSLEngineusing advisory peer information.protected SslHandlernewHandler(ByteBufAllocator alloc, boolean startTls)Create a new SslHandler.protected SslHandlernewHandler(ByteBufAllocator alloc, boolean startTls, java.util.concurrent.Executor executor)Create a new SslHandler.protected SslHandlernewHandler(ByteBufAllocator alloc, java.lang.String peerHost, int peerPort, boolean startTls)Create a new SslHandler.protected SslHandlernewHandler(ByteBufAllocator alloc, java.lang.String peerHost, int peerPort, boolean startTls, java.util.concurrent.Executor executor)longsessionCacheSize()Returns the size of the cache used for storing SSL session objects.javax.net.ssl.SSLSessionContextsessionContext()Returns theSSLSessionContextobject held by this context.longsessionTimeout()Returns the timeout for the cached SSL session objects, in seconds.-
Methods inherited from class io.netty.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:SslContextReturns thetrueif and only if this context is for client-side.- Specified by:
isClientin classSslContext
-
cipherSuites
public final java.util.List<java.lang.String> cipherSuites()
Description copied from class:SslContextReturns the list of enabled cipher suites, in the order of preference.- Specified by:
cipherSuitesin classSslContext
-
sessionCacheSize
public final long sessionCacheSize()
Description copied from class:SslContextReturns the size of the cache used for storing SSL session objects.- Overrides:
sessionCacheSizein classSslContext
-
sessionTimeout
public final long sessionTimeout()
Description copied from class:SslContextReturns the timeout for the cached SSL session objects, in seconds.- Overrides:
sessionTimeoutin classSslContext
-
applicationProtocolNegotiator
public final ApplicationProtocolNegotiator applicationProtocolNegotiator()
Description copied from class:SslContextReturns the object responsible for negotiating application layer protocols for the TLS NPN/ALPN extensions.- Specified by:
applicationProtocolNegotiatorin classSslContext
-
newEngine
public final javax.net.ssl.SSLEngine newEngine(ByteBufAllocator alloc)
Description copied from class:SslContextCreates a newSSLEngine.If
SslProvider.OPENSSL_REFCNTis used then the object must be released. One way to do this is to wrap in aSslHandlerand insert it into a pipeline. SeeSslContext.newHandler(ByteBufAllocator).- Specified by:
newEnginein classSslContext- Returns:
- a new
SSLEngine
-
newEngine
public final javax.net.ssl.SSLEngine newEngine(ByteBufAllocator alloc, java.lang.String peerHost, int peerPort)
Description copied from class:SslContextCreates a newSSLEngineusing advisory peer information.If
SslProvider.OPENSSL_REFCNTis used then the object must be released. One way to do this is to wrap in aSslHandlerand insert it into a pipeline. SeeSslContext.newHandler(ByteBufAllocator, String, int).- Specified by:
newEnginein classSslContextpeerHost- the non-authoritative name of the hostpeerPort- the non-authoritative port- Returns:
- a new
SSLEngine
-
newHandler
protected final SslHandler newHandler(ByteBufAllocator alloc, boolean startTls)
Description copied from class:SslContextCreate a new SslHandler.- Overrides:
newHandlerin classSslContext- See Also:
SslContext.newHandler(ByteBufAllocator)
-
newHandler
protected final SslHandler newHandler(ByteBufAllocator alloc, java.lang.String peerHost, int peerPort, boolean startTls)
Description copied from class:SslContextCreate a new SslHandler.- Overrides:
newHandlerin classSslContext- See Also:
SslContext.newHandler(ByteBufAllocator, String, int, boolean, Executor)
-
newHandler
protected SslHandler newHandler(ByteBufAllocator alloc, boolean startTls, java.util.concurrent.Executor executor)
Description copied from class:SslContextCreate a new SslHandler.- Overrides:
newHandlerin classSslContext- See Also:
SslContext.newHandler(ByteBufAllocator, String, int, boolean, Executor)
-
newHandler
protected SslHandler newHandler(ByteBufAllocator alloc, java.lang.String peerHost, int peerPort, boolean startTls, java.util.concurrent.Executor executor)
- Overrides:
newHandlerin classSslContext
-
sessionContext
public final javax.net.ssl.SSLSessionContext sessionContext()
Description copied from class:SslContextReturns theSSLSessionContextobject held by this context.- Specified by:
sessionContextin classSslContext
-
initEngine
protected abstract void initEngine(javax.net.ssl.SSLEngine engine)
Init theSSLEngine.
-
initHandler
protected void initHandler(SslHandler handler)
Init theSslHandler. This will by default callinitEngine(SSLEngine), sub-classes may override this.
-
-