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 OpenPGPKeyMaterialPool
OpenPGPKeyMaterialPool.OpenPGPCertificatePool, OpenPGPKeyMaterialPool.OpenPGPKeyPoolNested classes/interfaces inherited from interface 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 addcertificatesreturned byOpenPGPKeyMaterialPool.callbackto 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 OpenPGPKeyMaterialPool
getAllItems, provideMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface OpenPGPKeyMaterialProvider
provide
-
Constructor Details
-
OpenPGPKeyPool
public OpenPGPKeyPool() -
OpenPGPKeyPool
-
-
Method Details
-
setMissingItemCallback
public OpenPGPKeyMaterialPool.OpenPGPKeyPool setMissingItemCallback(OpenPGPKeyMaterialProvider<OpenPGPKey> callback) Description copied from class:OpenPGPKeyMaterialPoolSet a callback that gets fired whenever an item is requested, which is not found in the pool.- Overrides:
setMissingItemCallbackin classOpenPGPKeyMaterialPool<OpenPGPKey>- Parameters:
callback- callback- Returns:
- this
-
setCacheResultsFromCallback
Description copied from class:OpenPGPKeyMaterialPoolDecide, whether the implementation should addcertificatesreturned byOpenPGPKeyMaterialPool.callbackto the pool of cached certificates.- Overrides:
setCacheResultsFromCallbackin classOpenPGPKeyMaterialPool<OpenPGPKey>- Parameters:
cacheResults- if true, cache certificates from callback- Returns:
- this
-
addItem
Description copied from class:OpenPGPKeyMaterialPoolAdd 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:
addItemin classOpenPGPKeyMaterialPool<OpenPGPKey>- Parameters:
item- OpenPGP key or certificate that shall be added into the pool- Returns:
- this
-