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 ,指定选择器匹配
Certificate s。
|
abstract Collection<? extends CRL> |
engineGetCRLs(CRLSelector selector)
返回一个
Collection ,指定选择器匹配
CRL s。
|
public CertStoreSpi(CertStoreParameters params) throws InvalidAlgorithmParameterException
params
-初始化参数(可能是
null
)
InvalidAlgorithmParameterException
-如果初始化参数这
CertStoreSpi
不当
public abstract Collection<? extends Certificate> engineGetCertificates(CertSelector selector) throws CertStoreException
Collection
,指定选择器匹配
Certificate
s。如果没有
Certificate
s选择器匹配,将返回空
Collection
。
对于一些CertStore
类型,由此产生的Collection
可能不包含的Certificate
s选择器匹配的全部的。例如,一个LDAP CertStore
可能不在目录中搜索所有条目。相反,它可能只是搜索条目可能包含Certificate
s是寻找。
一些CertStore
实现(尤其是LDAP CertStore
s)可以把一个CertStoreException
除非提供一个非空的CertSelector
包含特定的标准,可以用来寻找证书。发行人和/或主题的名称是特别有用的标准。
selector
-
CertSelector
用来选择
Certificate
s应该归还。指定返回所有
Certificate
s
null
(如果支持的话)。
Collection
,指定选择器匹配
Certificate
s(不
null
)
CertStoreException
-如果发生异常
public abstract Collection<? extends CRL> engineGetCRLs(CRLSelector selector) throws CertStoreException
Collection
,指定选择器匹配
CRL
s。如果没有
CRL
s选择器匹配,将返回空
Collection
。
对于一些CertStore
类型,由此产生的Collection
可能不包含的CRL
s选择器匹配的全部的。例如,一个LDAP CertStore
可能不在目录中搜索所有条目。相反,它可能只是搜索条目可能包含CRL
s是寻找。
一些CertStore
实现(尤其是LDAP CertStore
s)可以把一个CertStoreException
除非提供一个非空的CRLSelector
包含特定的标准,可以用来寻找CRL。发行人的名称和/或要检查的证书是特别有用的。
selector
-
CRLSelector
用来选择
CRL
s应该归还。指定返回所有
CRL
s
null
(如果支持的话)。
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.