Class DelegatingSslContext
java.lang.Object
io.netty.handler.ssl.SslContext
io.netty.handler.ssl.DelegatingSslContext
Adapter class which allows to wrap another
SslContext and init SSLEngine instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the object responsible for negotiating application layer protocols for the TLS NPN/ALPN extensions.Returns the list of enabled cipher suites, in the order of preference.protected abstract voidinitEngine(SSLEngine engine) Init theSSLEngine.protected voidinitHandler(SslHandler handler) Init theSslHandler.final booleanisClient()Returns thetrueif and only if this context is for client-side.final SSLEnginenewEngine(ByteBufAllocator alloc) Creates a newSSLEngine.final SSLEnginenewEngine(ByteBufAllocator alloc, String peerHost, int peerPort) Creates a newSSLEngineusing advisory peer information.protected final SslHandlernewHandler(ByteBufAllocator alloc, boolean startTls) Create a new SslHandler.protected SslHandlernewHandler(ByteBufAllocator alloc, boolean startTls, Executor executor) Create a new SslHandler.protected final SslHandlernewHandler(ByteBufAllocator alloc, String peerHost, int peerPort, boolean startTls) Create a new SslHandler.protected SslHandlernewHandler(ByteBufAllocator alloc, String peerHost, int peerPort, boolean startTls, Executor executor) final longReturns the size of the cache used for storing SSL session objects.final SSLSessionContextReturns theSSLSessionContextobject held by this context.final longReturns the timeout for the cached SSL session objects, in seconds.Methods inherited from class 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 Details
-
DelegatingSslContext
-
-
Method Details
-
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
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
Description copied from class:SslContextReturns the object responsible for negotiating application layer protocols for the TLS NPN/ALPN extensions.- Specified by:
applicationProtocolNegotiatorin classSslContext
-
newEngine
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
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 classSslContext- Parameters:
peerHost- the non-authoritative name of the hostpeerPort- the non-authoritative port- Returns:
- a new
SSLEngine
-
newHandler
Description copied from class:SslContextCreate a new SslHandler.- Overrides:
newHandlerin classSslContext- See Also:
-
newHandler
protected final SslHandler newHandler(ByteBufAllocator alloc, String peerHost, int peerPort, boolean startTls) Description copied from class:SslContextCreate a new SslHandler.- Overrides:
newHandlerin classSslContext- See Also:
-
newHandler
Description copied from class:SslContextCreate a new SslHandler.- Overrides:
newHandlerin classSslContext- See Also:
-
newHandler
protected SslHandler newHandler(ByteBufAllocator alloc, String peerHost, int peerPort, boolean startTls, Executor executor) - Overrides:
newHandlerin classSslContext
-
sessionContext
Description copied from class:SslContextReturns theSSLSessionContextobject held by this context.- Specified by:
sessionContextin classSslContext
-
initEngine
-
initHandler
Init theSslHandler. This will by default callinitEngine(SSLEngine), sub-classes may override this.
-