Class OpenPGPKeyMaterialPool.OpenPGPCertificatePool
java.lang.Object
org.bouncycastle.openpgp.api.OpenPGPKeyMaterialPool<OpenPGPCertificate>
org.bouncycastle.openpgp.api.OpenPGPKeyMaterialPool.OpenPGPCertificatePool
- All Implemented Interfaces:
OpenPGPKeyMaterialProvider<OpenPGPCertificate>, OpenPGPKeyMaterialProvider.OpenPGPCertificateProvider
- Enclosing class:
OpenPGPKeyMaterialPool<M extends OpenPGPCertificate>
public static class OpenPGPKeyMaterialPool.OpenPGPCertificatePool
extends OpenPGPKeyMaterialPool<OpenPGPCertificate>
implements OpenPGPKeyMaterialProvider.OpenPGPCertificateProvider
Implementation of
OpenPGPKeyMaterialPool tailored to providing
OpenPGPCertificates.-
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
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionaddItem(OpenPGPCertificate 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
-
OpenPGPCertificatePool
public OpenPGPCertificatePool() -
OpenPGPCertificatePool
-
-
Method Details
-
setMissingItemCallback
public OpenPGPKeyMaterialPool.OpenPGPCertificatePool setMissingItemCallback(OpenPGPKeyMaterialProvider<OpenPGPCertificate> 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<OpenPGPCertificate>- Parameters:
callback- callback- Returns:
- this
-
setCacheResultsFromCallback
public OpenPGPKeyMaterialPool.OpenPGPCertificatePool setCacheResultsFromCallback(boolean cacheResults) Description copied from class:OpenPGPKeyMaterialPoolDecide, whether the implementation should addcertificatesreturned byOpenPGPKeyMaterialPool.callbackto the pool of cached certificates.- Overrides:
setCacheResultsFromCallbackin classOpenPGPKeyMaterialPool<OpenPGPCertificate>- 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<OpenPGPCertificate>- Parameters:
item- OpenPGP key or certificate that shall be added into the pool- Returns:
- this
-