KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > security > cert > CertStoreParameters


1 /*
2  * @(#)CertStoreParameters.java 1.5 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.security.cert;
9
10 /**
11  * A specification of <code>CertStore</code> parameters.
12  * <p>
13  * The purpose of this interface is to group (and provide type safety for)
14  * all <code>CertStore</code> parameter specifications. All
15  * <code>CertStore</code> parameter specifications must implement this
16  * interface.
17  * <p>
18  * Typically, a <code>CertStoreParameters</code> object is passed as a parameter
19  * to one of the {@link CertStore#getInstance CertStore.getInstance} methods.
20  * The <code>getInstance</code> method returns a <code>CertStore</code> that
21  * is used for retrieving <code>Certificate</code>s and <code>CRL</code>s. The
22  * <code>CertStore</code> that is returned is initialized with the specified
23  * parameters. The type of parameters needed may vary between different types
24  * of <code>CertStore</code>s.
25  *
26  * @see CertStore#getInstance
27  *
28  * @version 1.5 12/19/03
29  * @since 1.4
30  * @author Steve Hanna
31  */

32 public interface CertStoreParameters extends Cloneable JavaDoc {
33
34     /**
35      * Makes a copy of this <code>CertStoreParameters</code>.
36      * <p>
37      * The precise meaning of "copy" may depend on the class of
38      * the <code>CertStoreParameters</code> object. A typical implementation
39      * performs a "deep copy" of this object, but this is not an absolute
40      * requirement. Some implementations may perform a "shallow copy" of some
41      * or all of the fields of this object.
42      * <p>
43      * Note that the <code>CertStore.getInstance</code> methods make a copy
44      * of the specified <code>CertStoreParameters</code>. A deep copy
45      * implementation of <code>clone</code> is safer and more robust, as it
46      * prevents the caller from corrupting a shared <code>CertStore</code> by
47      * subsequently modifying the contents of its initialization parameters.
48      * However, a shallow copy implementation of <code>clone</code> is more
49      * appropriate for applications that need to hold a reference to a
50      * parameter contained in the <code>CertStoreParameters</code>. For example,
51      * a shallow copy clone allows an application to release the resources of
52      * a particular <code>CertStore</code> initialization parameter immediately,
53      * rather than waiting for the garbage collection mechanism. This should
54      * be done with the utmost care, since the <code>CertStore</code> may still
55      * be in use by other threads.
56      * <p>
57      * Each subclass should state the precise behavior of this method so
58      * that users and developers know what to expect.
59      *
60      * @return a copy of this <code>CertStoreParameters</code>
61      */

62     Object JavaDoc clone();
63 }
64
Popular Tags