java.security.cert
Class CertStoreSpi

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.security.cert.CertStoreSpi

public abstract class CertStoreSpi
extends Object sample code for java.lang.Object definition code for java.lang.Object

The Service Provider Interface (SPI) for the CertStore sample code for java.security.cert.CertStore definition code for java.security.cert.CertStore class. All CertStore implementations must include a class (the SPI class) that extends this class (CertStoreSpi), provides a constructor with a single argument of type CertStoreParameters, and implements all of its methods. In general, instances of this class should only be accessed through the CertStore class. For details, see the Java Cryptography Architecture.

Concurrent Access

The public methods of all CertStoreSpi objects must be thread-safe. That is, multiple threads may concurrently invoke these methods on a single CertStoreSpi object (or more than one) with no ill effects. This allows a CertPathBuilder to search for a CRL while simultaneously searching for further certificates, for instance.

Simple CertStoreSpi implementations will probably ensure thread safety by adding a synchronized keyword to their engineGetCertificates and engineGetCRLs methods. More sophisticated ones may allow truly concurrent access.

Since:
1.4

Constructor Summary
CertStoreSpi sample code for java.security.cert.CertStoreSpi.CertStoreSpi(java.security.cert.CertStoreParameters) definition code for java.security.cert.CertStoreSpi.CertStoreSpi(java.security.cert.CertStoreParameters) (CertStoreParameters sample code for java.security.cert.CertStoreParameters definition code for java.security.cert.CertStoreParameters  params)
          The sole constructor.
 
Method Summary
abstract  Collection sample code for java.util.Collection definition code for java.util.Collection <? extends Certificate sample code for java.security.cert.Certificate definition code for java.security.cert.Certificate > engineGetCertificates sample code for java.security.cert.CertStoreSpi.engineGetCertificates(java.security.cert.CertSelector) definition code for java.security.cert.CertStoreSpi.engineGetCertificates(java.security.cert.CertSelector) (CertSelector sample code for java.security.cert.CertSelector definition code for java.security.cert.CertSelector  selector)
          Returns a Collection of Certificates that match the specified selector.
abstract  Collection sample code for java.util.Collection definition code for java.util.Collection <? extends CRL sample code for java.security.cert.CRL definition code for java.security.cert.CRL > engineGetCRLs sample code for java.security.cert.CertStoreSpi.engineGetCRLs(java.security.cert.CRLSelector) definition code for java.security.cert.CertStoreSpi.engineGetCRLs(java.security.cert.CRLSelector) (CRLSelector sample code for java.security.cert.CRLSelector definition code for java.security.cert.CRLSelector  selector)
          Returns a Collection of CRLs that match the specified selector.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

CertStoreSpi sample code for java.security.cert.CertStoreSpi(java.security.cert.CertStoreParameters) definition code for java.security.cert.CertStoreSpi(java.security.cert.CertStoreParameters)

public CertStoreSpi(CertStoreParameters sample code for java.security.cert.CertStoreParameters definition code for java.security.cert.CertStoreParameters  params)
             throws InvalidAlgorithmParameterException sample code for java.security.InvalidAlgorithmParameterException definition code for java.security.InvalidAlgorithmParameterException 
The sole constructor.

Parameters:
params - the initialization parameters (may be null)
Throws:
InvalidAlgorithmParameterException sample code for java.security.InvalidAlgorithmParameterException definition code for java.security.InvalidAlgorithmParameterException - if the initialization parameters are inappropriate for this CertStoreSpi
Method Detail

engineGetCertificates sample code for java.security.cert.CertStoreSpi.engineGetCertificates(java.security.cert.CertSelector) definition code for java.security.cert.CertStoreSpi.engineGetCertificates(java.security.cert.CertSelector)

public abstract Collection sample code for java.util.Collection definition code for java.util.Collection <? extends Certificate sample code for java.security.cert.Certificate definition code for java.security.cert.Certificate > engineGetCertificates(CertSelector sample code for java.security.cert.CertSelector definition code for java.security.cert.CertSelector  selector)
                                                                 throws CertStoreException sample code for java.security.cert.CertStoreException definition code for java.security.cert.CertStoreException 
Returns a Collection of Certificates that match the specified selector. If no Certificates match the selector, an empty Collection will be returned.

For some CertStore types, the resulting Collection may not contain all of the Certificates that match the selector. For instance, an LDAP CertStore may not search all entries in the directory. Instead, it may just search entries that are likely to contain the Certificates it is looking for.

Some CertStore implementations (especially LDAP CertStores) may throw a CertStoreException unless a non-null CertSelector is provided that includes specific criteria that can be used to find the certificates. Issuer and/or subject names are especially useful criteria.

Parameters:
selector - A CertSelector used to select which Certificates should be returned. Specify null to return all Certificates (if supported).
Returns:
A Collection of Certificates that match the specified selector (never null)
Throws:
CertStoreException sample code for java.security.cert.CertStoreException definition code for java.security.cert.CertStoreException - if an exception occurs

engineGetCRLs sample code for java.security.cert.CertStoreSpi.engineGetCRLs(java.security.cert.CRLSelector) definition code for java.security.cert.CertStoreSpi.engineGetCRLs(java.security.cert.CRLSelector)

public abstract Collection sample code for java.util.Collection definition code for java.util.Collection <? extends CRL sample code for java.security.cert.CRL definition code for java.security.cert.CRL > engineGetCRLs(CRLSelector sample code for java.security.cert.CRLSelector definition code for java.security.cert.CRLSelector  selector)
                                                 throws CertStoreException sample code for java.security.cert.CertStoreException definition code for java.security.cert.CertStoreException 
Returns a Collection of CRLs that match the specified selector. If no CRLs match the selector, an empty Collection will be returned.

For some CertStore types, the resulting Collection may not contain all of the CRLs that match the selector. For instance, an LDAP CertStore may not search all entries in the directory. Instead, it may just search entries that are likely to contain the CRLs it is looking for.

Some CertStore implementations (especially LDAP CertStores) may throw a CertStoreException unless a non-null CRLSelector is provided that includes specific criteria that can be used to find the CRLs. Issuer names and/or the certificate to be checked are especially useful.

Parameters:
selector - A CRLSelector used to select which CRLs should be returned. Specify null to return all CRLs (if supported).
Returns:
A Collection of CRLs that match the specified selector (never null)
Throws:
CertStoreException sample code for java.security.cert.CertStoreException definition code for java.security.cert.CertStoreException - if an exception occurs