public abstract class CertStoreSpi extends Object
CertStore类的 ( SPI )。
所有CertStore实现都必须包含扩展此类( CertStoreSpi )的类(SPI类),提供一个具有CertStoreParameters类型的单个参数的构造CertStoreParameters ,并实现其所有方法。
一般来说,此类的实例只能通过CertStore类访问。
有关详细信息,请参阅Java加密体系结构。
并发访问
所有CertStoreSpi对象的公共方法必须是线程安全的。 也就是说,多个线程可以在没有不良影响的单个CertStoreSpi对象(或多个)上同时调用这些方法。 例如,这允许CertPathBuilder搜索CRL同时搜索其他证书。
简单的CertStoreSpi实现可能通过在其engineGetCertificates和engineGetCRLs方法中添加一个synchronized关键字来确保线程的安全性。 更复杂的可能允许真正的并发访问。
| Constructor and Description |
|---|
CertStoreSpi(CertStoreParameters params)
唯一的建设者。
|
| Modifier and Type | Method and Description |
|---|---|
abstract Collection<? extends Certificate> |
engineGetCertificates(CertSelector selector)
返回
Collection的
Certificate指定选择器匹配秒。
|
abstract Collection<? extends CRL> |
engineGetCRLs(CRLSelector selector)
返回
Collection的
CRL指定选择器匹配秒。
|
public CertStoreSpi(CertStoreParameters params) throws InvalidAlgorithmParameterException
params - 初始化参数(可能为
null )
InvalidAlgorithmParameterException - 如果初始化参数不适合这个
CertStoreSpi
public abstract Collection<? extends Certificate> engineGetCertificates(CertSelector selector) throws CertStoreException
Collection的Certificate指定选择器匹配秒。
如果Certificate与选择器匹配,则将返回一个空的Collection 。
对于一些CertStore类型,结果Collection可能不包含与选择器匹配的所有 Certificate 。 例如,LDAP CertStore可能不会搜索目录中的所有条目。 相反,它可能只是搜索可能包含它正在寻找的Certificate的条目。
一些CertStore实现(特别是LDAP CertStore多个)可能抛出CertStoreException除非一个非空CertSelector被提供,其包括可用于查找证书的具体标准。 发行人和/或主题名称是特别有用的标准。
selector - A CertSelector用于选择应该返回哪些Certificate 。
指定null以返回所有Certificate s(如果支持)。
Collection的
Certificate s匹配指定的选择器(从不
null )
CertStoreException - 如果发生异常
public abstract Collection<? extends CRL> engineGetCRLs(CRLSelector selector) throws CertStoreException
Collection的CRL指定选择器匹配秒。
如果没有CRL匹配选择器,将返回一个空的Collection 。
对于一些CertStore类型,结果Collection可能不包含与选择器匹配的所有 CRL 。 例如,LDAP CertStore可能不会搜索目录中的所有条目。 相反,它可能只是搜索可能包含它正在寻找的CRL的条目。
一些CertStore实现(特别是LDAP CertStore )可以抛出CertStoreException ,除非提供了包括可用于查找CRL的特定标准的非空CRLSelector 。 发行人名称和/或要检查的证书特别有用。
selector - A CRLSelector用于选择应该返回哪些CRL 。
指定null返回全部CRL s(如果支持)。
Collection的
CRL s匹配指定的选择器(从不
null )
CertStoreException - 如果发生异常
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.