Package io.netty.handler.ssl
Class OpenSslCachingKeyMaterialProvider
- java.lang.Object
-
- io.netty.handler.ssl.OpenSslKeyMaterialProvider
-
- io.netty.handler.ssl.OpenSslCachingKeyMaterialProvider
-
final class OpenSslCachingKeyMaterialProvider extends OpenSslKeyMaterialProvider
OpenSslKeyMaterialProviderthat will cache theOpenSslKeyMaterialto reduce the overhead of parsing the chain and the key for generation of the material.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.ConcurrentMap<java.lang.String,OpenSslKeyMaterial>cacheprivate booleanfullprivate intmaxCachedEntries
-
Constructor Summary
Constructors Constructor Description OpenSslCachingKeyMaterialProvider(javax.net.ssl.X509KeyManager keyManager, java.lang.String password, int maxCachedEntries)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) OpenSslKeyMaterialchooseKeyMaterial(ByteBufAllocator allocator, java.lang.String alias)Returns theOpenSslKeyMaterialornull(if none) that should be used during the handshake by OpenSSL.(package private) voiddestroy()Will be invoked once the provider should be destroyed.-
Methods inherited from class io.netty.handler.ssl.OpenSslKeyMaterialProvider
keyManager, validateKeyMaterialSupported
-
-
-
-
Field Detail
-
maxCachedEntries
private final int maxCachedEntries
-
full
private volatile boolean full
-
cache
private final java.util.concurrent.ConcurrentMap<java.lang.String,OpenSslKeyMaterial> cache
-
-
Method Detail
-
chooseKeyMaterial
OpenSslKeyMaterial chooseKeyMaterial(ByteBufAllocator allocator, java.lang.String alias) throws java.lang.Exception
Description copied from class:OpenSslKeyMaterialProviderReturns theOpenSslKeyMaterialornull(if none) that should be used during the handshake by OpenSSL.- Overrides:
chooseKeyMaterialin classOpenSslKeyMaterialProvider- Throws:
java.lang.Exception
-
destroy
void destroy()
Description copied from class:OpenSslKeyMaterialProviderWill be invoked once the provider should be destroyed.- Overrides:
destroyin classOpenSslKeyMaterialProvider
-
-