01 /*
02 * Copyright 2000-2001 Sun Microsystems, Inc. All Rights Reserved.
03 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
04 *
05 * This code is free software; you can redistribute it and/or modify it
06 * under the terms of the GNU General Public License version 2 only, as
07 * published by the Free Software Foundation. Sun designates this
08 * particular file as subject to the "Classpath" exception as provided
09 * by Sun in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22 * CA 95054 USA or visit www.sun.com if you need additional information or
23 * have any questions.
24 */
25
26 package java.security.cert;
27
28 import java.security.InvalidAlgorithmParameterException;
29
30 /**
31 * The <i>Service Provider Interface</i> (<b>SPI</b>)
32 * for the {@link CertPathBuilder CertPathBuilder} class. All
33 * <code>CertPathBuilder</code> implementations must include a class (the
34 * SPI class) that extends this class (<code>CertPathBuilderSpi</code>) and
35 * implements all of its methods. In general, instances of this class should
36 * only be accessed through the <code>CertPathBuilder</code> class. For
37 * details, see the Java Cryptography Architecture.
38 * <p>
39 * <b>Concurrent Access</b>
40 * <p>
41 * Instances of this class need not be protected against concurrent
42 * access from multiple threads. Threads that need to access a single
43 * <code>CertPathBuilderSpi</code> instance concurrently should synchronize
44 * amongst themselves and provide the necessary locking before calling the
45 * wrapping <code>CertPathBuilder</code> object.
46 * <p>
47 * However, implementations of <code>CertPathBuilderSpi</code> may still
48 * encounter concurrency issues, since multiple threads each
49 * manipulating a different <code>CertPathBuilderSpi</code> instance need not
50 * synchronize.
51 *
52 * @version 1.12 05/05/07
53 * @since 1.4
54 * @author Sean Mullan
55 */
56 public abstract class CertPathBuilderSpi {
57
58 /**
59 * The default constructor.
60 */
61 public CertPathBuilderSpi() {
62 }
63
64 /**
65 * Attempts to build a certification path using the specified
66 * algorithm parameter set.
67 *
68 * @param params the algorithm parameters
69 * @return the result of the build algorithm
70 * @throws CertPathBuilderException if the builder is unable to construct
71 * a certification path that satisfies the specified parameters
72 * @throws InvalidAlgorithmParameterException if the specified parameters
73 * are inappropriate for this <code>CertPathBuilder</code>
74 */
75 public abstract CertPathBuilderResult engineBuild(
76 CertPathParameters params) throws CertPathBuilderException,
77 InvalidAlgorithmParameterException;
78 }
|