Package org.bouncycastle.openpgp.api
Class OpenPGPKeyMaterialPool.OpenPGPKeyPool
java.lang.Object
org.bouncycastle.openpgp.api.OpenPGPKeyMaterialPool<OpenPGPKey>
org.bouncycastle.openpgp.api.OpenPGPKeyMaterialPool.OpenPGPKeyPool
- All Implemented Interfaces:
OpenPGPKeyMaterialProvider<OpenPGPKey>
,OpenPGPKeyMaterialProvider.OpenPGPKeyProvider
- Enclosing class:
OpenPGPKeyMaterialPool<M extends OpenPGPCertificate>
public static class OpenPGPKeyMaterialPool.OpenPGPKeyPool
extends OpenPGPKeyMaterialPool<OpenPGPKey>
implements OpenPGPKeyMaterialProvider.OpenPGPKeyProvider
Implementation of
OpenPGPKeyMaterialPool
tailored to provide OpenPGPKeys
.-
Nested Class Summary
Nested classes/interfaces inherited from class org.bouncycastle.openpgp.api.OpenPGPKeyMaterialPool
OpenPGPKeyMaterialPool.OpenPGPCertificatePool, OpenPGPKeyMaterialPool.OpenPGPKeyPool
Nested classes/interfaces inherited from interface org.bouncycastle.openpgp.api.OpenPGPKeyMaterialProvider
OpenPGPKeyMaterialProvider.OpenPGPCertificateProvider, OpenPGPKeyMaterialProvider.OpenPGPKeyProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddItem
(OpenPGPKey item) Add a certificate to the pool.setCacheResultsFromCallback
(boolean cacheResults) Decide, whether the implementation should addcertificates
returned byOpenPGPKeyMaterialPool.callback
to the pool of cached certificates.Set a callback that gets fired whenever an item is requested, which is not found in the pool.Methods inherited from class org.bouncycastle.openpgp.api.OpenPGPKeyMaterialPool
getAllItems, provide
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.bouncycastle.openpgp.api.OpenPGPKeyMaterialProvider
provide
-
Constructor Details
-
OpenPGPKeyPool
public OpenPGPKeyPool() -
OpenPGPKeyPool
-
-
Method Details
-
setMissingItemCallback
public OpenPGPKeyMaterialPool.OpenPGPKeyPool setMissingItemCallback(OpenPGPKeyMaterialProvider<OpenPGPKey> callback) Description copied from class:OpenPGPKeyMaterialPool
Set a callback that gets fired whenever an item is requested, which is not found in the pool.- Overrides:
setMissingItemCallback
in classOpenPGPKeyMaterialPool<OpenPGPKey>
- Parameters:
callback
- callback- Returns:
- this
-
setCacheResultsFromCallback
Description copied from class:OpenPGPKeyMaterialPool
Decide, whether the implementation should addcertificates
returned byOpenPGPKeyMaterialPool.callback
to the pool of cached certificates.- Overrides:
setCacheResultsFromCallback
in classOpenPGPKeyMaterialPool<OpenPGPKey>
- Parameters:
cacheResults
- if true, cache certificates from callback- Returns:
- this
-
addItem
Description copied from class:OpenPGPKeyMaterialPool
Add a certificate to the pool. Note: If multiple items share the same subkey material, adding an item might overwrite the reference to another item for that subkey.- Overrides:
addItem
in classOpenPGPKeyMaterialPool<OpenPGPKey>
- Parameters:
item
- OpenPGP key or certificate that shall be added into the pool- Returns:
- this
-