KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)CertSelector.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 selector that defines a set of criteria for selecting
12  * <code>Certificate</code>s. Classes that implement this interface
13  * are often used to specify which <code>Certificate</code>s should
14  * be retrieved from a <code>CertStore</code>.
15  * <p>
16  * <b>Concurrent Access</b>
17  * <p>
18  * Unless otherwise specified, the methods defined in this interface are not
19  * thread-safe. Multiple threads that need to access a single
20  * object concurrently should synchronize amongst themselves and
21  * provide the necessary locking. Multiple threads each manipulating
22  * separate objects need not synchronize.
23  *
24  * @see Certificate
25  * @see CertStore
26  * @see CertStore#getCertificates
27  *
28  * @version 1.5 12/19/03
29  * @author Steve Hanna
30  * @since 1.4
31  */

32 public interface CertSelector extends Cloneable JavaDoc {
33
34     /**
35      * Decides whether a <code>Certificate</code> should be selected.
36      *
37      * @param cert the <code>Certificate</code> to be checked
38      * @return <code>true</code> if the <code>Certificate</code>
39      * should be selected, <code>false</code> otherwise
40      */

41     boolean match(Certificate JavaDoc cert);
42
43     /**
44      * Makes a copy of this <code>CertSelector</code>. Changes to the
45      * copy will not affect the original and vice versa.
46      *
47      * @return a copy of this <code>CertSelector</code>
48      */

49     Object JavaDoc clone();
50 }
51
Popular Tags