KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)CertPathValidatorSpi.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 import java.security.InvalidAlgorithmParameterException JavaDoc;
11
12 /**
13  *
14  * The <i>Service Provider Interface</i> (<b>SPI</b>)
15  * for the {@link CertPathValidator CertPathValidator} class. All
16  * <code>CertPathValidator</code> implementations must include a class (the
17  * SPI class) that extends this class (<code>CertPathValidatorSpi</code>)
18  * and implements all of its methods. In general, instances of this class
19  * should only be accessed through the <code>CertPathValidator</code> class.
20  * For details, see the Java Cryptography Architecture.
21  * <p>
22  * <b>Concurrent Access</b>
23  * <p>
24  * Instances of this class need not be protected against concurrent
25  * access from multiple threads. Threads that need to access a single
26  * <code>CertPathValidatorSpi</code> instance concurrently should synchronize
27  * amongst themselves and provide the necessary locking before calling the
28  * wrapping <code>CertPathValidator</code> object.
29  * <p>
30  * However, implementations of <code>CertPathValidatorSpi</code> may still
31  * encounter concurrency issues, since multiple threads each
32  * manipulating a different <code>CertPathValidatorSpi</code> instance need not
33  * synchronize.
34  *
35  * @version 1.5 12/19/03
36  * @since 1.4
37  * @author Yassir Elley
38  */

39 public abstract class CertPathValidatorSpi {
40
41     /**
42      * The default constructor.
43      */

44     public CertPathValidatorSpi() {}
45
46     /**
47      * Validates the specified certification path using the specified
48      * algorithm parameter set.
49      * <p>
50      * The <code>CertPath</code> specified must be of a type that is
51      * supported by the validation algorithm, otherwise an
52      * <code>InvalidAlgorithmParameterException</code> will be thrown. For
53      * example, a <code>CertPathValidator</code> that implements the PKIX
54      * algorithm validates <code>CertPath</code> objects of type X.509.
55      *
56      * @param certPath the <code>CertPath</code> to be validated
57      * @param params the algorithm parameters
58      * @return the result of the validation algorithm
59      * @exception CertPathValidatorException if the <code>CertPath</code>
60      * does not validate
61      * @exception InvalidAlgorithmParameterException if the specified
62      * parameters or the type of the specified <code>CertPath</code> are
63      * inappropriate for this <code>CertPathValidator</code>
64      */

65     public abstract CertPathValidatorResult JavaDoc
66     engineValidate(CertPath JavaDoc certPath, CertPathParameters JavaDoc params)
67     throws CertPathValidatorException JavaDoc, InvalidAlgorithmParameterException JavaDoc;
68 }
69
Popular Tags