JavaTM Platform
Standard Ed. 6

java.security.cert
类 CollectionCertStoreParameters

java.lang.Object
  继承者 java.security.cert.CollectionCertStoreParameters
所有已实现的接口:
Cloneable, CertStoreParameters

public class CollectionCertStoreParameters
extends Object
implements CertStoreParameters

用作 Collection CertStore 算法输入的参数。

此类用于为 Collection CertStore 算法的实现提供必需的配置参数。此类中所包括的唯一参数是 Collection,CertStore 将从中获取证书和 CRL。

并发访问

除非另行指定,否则此类中所定义的方法不是线程安全的。需要并发访问单个对象的多个线程应该在它们之间实现同步并提供所需的锁定。对于每个线程都操作一个不同对象的多个线程而言,无需实现同步。

从以下版本开始:
1.4
另请参见:
Collection, CertStore

构造方法摘要
CollectionCertStoreParameters()
          创建具有默认参数值(一个空的并且不可变的 Collection)的 CollectionCertStoreParameters 的实例
CollectionCertStoreParameters(Collection<?> collection)
          创建 CollectionCertStoreParameters 的一个实例,它允许从指定的 Collection 中获取证书和 CRL。
 
方法摘要
 Object clone()
          返回此对象的副本。
 Collection<?> getCollection()
          返回从中获取 Certificate 和 CRL 的 Collection。
 String toString()
          返回描述该参数的格式化字符串。
 
从类 java.lang.Object 继承的方法
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

CollectionCertStoreParameters

public CollectionCertStoreParameters(Collection<?> collection)
创建 CollectionCertStoreParameters 的一个实例,它允许从指定的 Collection 中获取证书和 CRL。如果指定的 Collection 包含不是 Certificate 或 CRL 的对象,则该 Collection CertStore 将忽略该对象。

该 Collection 不是复制的。相反,使用的是一个引用。这就允许调用方随后从 Collection 中添加或移除 Certificates 或 CRL,从而更改 CertStore 可用的 Certificates 或 CRL 集。Collection CertStore 不会修改该 Collection 的内容。

如果某个线程修改此 Collection 的同时,另一个线程正在调用已使用此 Collection 初始化的 Collection CertStore 方法,则该 Collection 必须具有快速失败的迭代器。

参数:
collection - Certificate 和 CRL 的 Collection
抛出:
NullPointerException - 如果 collection 为 null

CollectionCertStoreParameters

public CollectionCertStoreParameters()
创建具有默认参数值(一个空的并且不可变的 Collection)的 CollectionCertStoreParameters 的实例

方法详细信息

getCollection

public Collection<?> getCollection()
返回从中获取 Certificate 和 CRL 的 Collection。这不是该 Collection 的副本,它是一个引用。这就允许调用方随后从该 Collection 中添加或移除 Certificates 或 CRL。

返回:
Collection(不会为 null)

clone

public Object clone()
返回此对象的副本。注意,仅复制对该 Collection 引用,而不复制内容。

指定者:
接口 CertStoreParameters 中的 clone
覆盖:
类 Object 中的 clone
返回:
副本
另请参见:
Cloneable

toString

public String toString()
返回描述该参数的格式化字符串。

覆盖:
类 Object 中的 toString
返回:
描述该参数的格式化字符串

JavaTM Platform
Standard Ed. 6

提交错误或意见
有关更多的 API 参考资料和开发人员文档,请参阅 Java SE 开发人员文档。该文档包含更详细的、面向开发人员的描述,以及总体概述、术语定义、使用技巧和工作代码示例。

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。