KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > net > ssl > TrustManagerFactorySpi


1 /*
2  * @(#)TrustManagerFactorySpi.java 1.8 04/02/16
3  *
4  * Copyright (c) 2004 Sun Microsystems, Inc. All Rights Reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7   
8 /*
9  * NOTE:
10  * Because of various external restrictions (i.e. US export
11  * regulations, etc.), the actual source code can not be provided
12  * at this time. This file represents the skeleton of the source
13  * file, so that javadocs of the API can be created.
14  */

15
16 package javax.net.ssl;
17
18 import java.security.*;
19
20 /**
21  * This class defines the <i>Service Provider Interface</i> (<b>SPI</b>)
22  * for the <code>TrustManagerFactory</code> class.
23  *
24  * <p> All the abstract methods in this class must be implemented by each
25  * cryptographic service provider who wishes to supply the implementation
26  * of a particular trust manager factory.
27  *
28  * @since 1.4
29  * @see TrustManagerFactory
30  * @see TrustManager
31  * @version 1.12
32  */

33 public abstract class TrustManagerFactorySpi
34 {
35
36     public TrustManagerFactorySpi() { }
37
38     /**
39      * Initializes this factory with a source of certificate
40      * authorities and related trust material.
41      *
42      * @param ks the key store or null
43      * @throws KeyStoreException if this operation fails
44      * @see TrustManagerFactory#init(KeyStore)
45      */

46     protected abstract void engineInit(KeyStore ks) throws KeyStoreException;
47
48     /**
49      * Initializes this factory with a source of provider-specific
50      * key material.
51      * <P>
52      * In some cases, initialization parameters other than a keystore
53      * may be needed by a provider. Users of that
54      * particular provider are expected to pass an implementation of
55      * the appropriate <CODE>ManagerFactoryParameters</CODE> as
56      * defined by the provider. The provider can then call the
57      * specified methods in the <CODE>ManagerFactoryParameters</CODE>
58      * implementation to obtain the needed information.
59      *
60      * @param spec an implementation of a provider-specific parameter
61      * specification
62      * @throws InvalidAlgorithmParameterException if there is problem
63      * with the parameters
64      * @see TrustManagerFactory#init(ManagerFactoryParameters spec)
65      */

66     protected abstract void engineInit(ManagerFactoryParameters spec)
67         throws InvalidAlgorithmParameterException;
68
69     /**
70      * Returns one trust manager for each type of trust material.
71      *
72      * @return the trust managers
73      */

74     protected abstract TrustManager[] engineGetTrustManagers();
75 }
76
Popular Tags