CertStore that retrieves Certificates and
CRLs from a Collection.
Before calling the engineGetCertificates or
engineGetCRLs methods, the
CollectionCertStore(CertStoreParameters) constructor is called to
create the CertStore and establish the
Collection from which Certificates and
CRLs will be retrieved. If the specified
Collection contains an object that is not a
Certificate or CRL, that object will be
ignored.
Concurrent Access
As described in the javadoc for CertStoreSpi, the
engineGetCertificates and engineGetCRLs methods
must be thread-safe. That is, multiple threads may concurrently
invoke these methods on a single CollectionCertStore
object (or more than one) with no ill effects.
This is achieved by requiring that the Collection passed to
the CollectionCertStore(CertStoreParameters) constructor (via the
CollectionCertStoreParameters object) must have fail-fast
iterators. Simultaneous modifications to the Collection can thus be
detected and certificate or CRL retrieval can be retried. The fact that
Certificates and CRLs must be thread-safe is also
essential.
java.security.cert.CertStore
| Modifier and Type | Field and Description |
|---|---|
| private final Collection |
| Access | Constructor and Description |
|---|---|
| public | CollectionCertStore(CertStoreParameters
the algorithm parameters params)Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public Collection | Returns: aCollection of Certificates that
match the specified selectora selector)CertSelector used to select which
Certificates should be returned. Specify null
to return all Certificates.Implements abstract java. Returns a |
| public Collection | Returns: aCollection of CRLs that
match the specified selectora selector)CRLSelector used to select which
CRLs should be returned. Specify null
to return all CRLs.Implements abstract java. Returns a |
| coll | back to summary |
|---|---|
| private final Collection<?> coll | |
| CollectionCertStore | back to summary |
|---|---|
| public CollectionCertStore(CertStoreParameters params) throws InvalidAlgorithmParameterException Creates a
| |
| engineGetCertificates | back to summary |
|---|---|
| public Collection Implements abstract java. Returns a
| |
| engineGetCRLs | back to summary |
|---|---|
| public Collection Implements abstract java. Returns a
| |