public abstract class CertStoreSpi extends Object
CertStore类。所有的
CertStore实现必须包含一个类(SPI类),扩展了这类(
CertStoreSpi),提供一个构造函数带有一个参数的类型
CertStoreParameters,并实现所有的方法。一般来说,这类的实例只能通过
CertStore类访问。详情见java加密体系结构。
并发访问
所有CertStoreSpi对象的公共方法必须是线程安全的。就是说,多个线程可以同时在一个单一的CertStoreSpi对象调用这些方法(或多个)无不良影响。这允许一个CertPathBuilder寻找CRL同时搜索进一步证明,例如。
简单的CertStoreSpi实现可能会加入一个synchronized关键词他们engineGetCertificates和engineGetCRLs方法确保线程安全。更复杂的可能允许真正的并发访问。
| Constructor and Description |
|---|
CertStoreSpi(CertStoreParameters params)
唯一构造函数。
|
| Modifier and Type | Method and Description |
|---|---|
abstract Collection<? extends Certificate> |
engineGetCertificates(CertSelector selector)
返回一个
Collection,指定选择器匹配
Certificates。
|
abstract Collection<? extends CRL> |
engineGetCRLs(CRLSelector selector)
返回一个
Collection,指定选择器匹配
CRLs。
|
public CertStoreSpi(CertStoreParameters params) throws InvalidAlgorithmParameterException
params -初始化参数(可能是
null)
InvalidAlgorithmParameterException -如果初始化参数这
CertStoreSpi不当
public abstract Collection<? extends Certificate> engineGetCertificates(CertSelector selector) throws CertStoreException
Collection,指定选择器匹配
Certificates。如果没有
Certificates选择器匹配,将返回空
Collection。
对于一些CertStore类型,由此产生的Collection可能不包含的Certificates选择器匹配的全部的。例如,一个LDAP CertStore可能不在目录中搜索所有条目。相反,它可能只是搜索条目可能包含Certificates是寻找。
一些CertStore实现(尤其是LDAP CertStores)可以把一个CertStoreException除非提供一个非空的CertSelector包含特定的标准,可以用来寻找证书。发行人和/或主题的名称是特别有用的标准。
selector -
CertSelector用来选择
Certificates应该归还。指定返回所有
Certificates
null(如果支持的话)。
Collection,指定选择器匹配
Certificates(不
null)
CertStoreException -如果发生异常
public abstract Collection<? extends CRL> engineGetCRLs(CRLSelector selector) throws CertStoreException
Collection,指定选择器匹配
CRLs。如果没有
CRLs选择器匹配,将返回空
Collection。
对于一些CertStore类型,由此产生的Collection可能不包含的CRLs选择器匹配的全部的。例如,一个LDAP CertStore可能不在目录中搜索所有条目。相反,它可能只是搜索条目可能包含CRLs是寻找。
一些CertStore实现(尤其是LDAP CertStores)可以把一个CertStoreException除非提供一个非空的CRLSelector包含特定的标准,可以用来寻找CRL。发行人的名称和/或要检查的证书是特别有用的。
selector -
CRLSelector用来选择
CRLs应该归还。指定返回所有
CRLs
null(如果支持的话)。
Collection,指定选择器匹配
CRLs(不
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.