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
OpenSslKeyMaterialProvider
that will cache theOpenSslKeyMaterial
to 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>
cache
private boolean
full
private int
maxCachedEntries
-
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) OpenSslKeyMaterial
chooseKeyMaterial(ByteBufAllocator allocator, java.lang.String alias)
Returns theOpenSslKeyMaterial
ornull
(if none) that should be used during the handshake by OpenSSL.(package private) void
destroy()
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:OpenSslKeyMaterialProvider
Returns theOpenSslKeyMaterial
ornull
(if none) that should be used during the handshake by OpenSSL.- Overrides:
chooseKeyMaterial
in classOpenSslKeyMaterialProvider
- Throws:
java.lang.Exception
-
destroy
void destroy()
Description copied from class:OpenSslKeyMaterialProvider
Will be invoked once the provider should be destroyed.- Overrides:
destroy
in classOpenSslKeyMaterialProvider
-
-