public interface CertStoreParameters extends Cloneable
CertStore参数。
该接口的目的是为所有CertStore参数规范分组(并提供类型安全)。 所有CertStore参数规范都必须实现此接口。
通常, CertStoreParameters对象作为参数传递给CertStore.getInstance方法之一。 getInstance方法返回一个CertStore ,用于检索Certificate s和CRL s。 该CertStore返回的初始化使用指定的参数。 所需的参数类型可能因不同类型的CertStore而异。
Object clone()
CertStoreParameters的副本。
“复制”的确切含义可能取决于CertStoreParameters对象的类别。 一个典型的实现执行这个对象的“深层复制”,但这不是绝对的要求。 一些实现可以执行该对象的某些或所有字段的“浅拷贝”。
请注意, CertStore.getInstance方法制作了指定的CertStoreParameters的CertStoreParameters 。 的深层副本实施clone是更安全和更健壮的,因为它可以防止呼叫者从破坏的共享CertStore通过随后修改其初始化参数的内容。 然而,一个浅拷贝实现clone更适合于那些需要保持对包含在参数的参考应用CertStoreParameters 。 例如,浅拷贝克隆允许应用程序立即释放特定CertStore初始化参数的资源,而不是等待垃圾回收机制。 这应该非常小心,因为CertStore可能仍然被其他线程使用。
每个子类应该说明这种方法的确切行为,以便用户和开发人员知道预期。
CertStoreParameters的副本
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.