src/java.base/share/classes/sun/security/jca/ProviderConfig.java

Print this page




  34 
  35 /**
  36  * Class representing a configured provider. Encapsulates configuration
  37  * (className plus optional argument), the provider loading logic, and
  38  * the loaded Provider object itself.
  39  *
  40  * @author  Andreas Sterbenz
  41  * @since   1.5
  42  */
  43 final class ProviderConfig {
  44 
  45     private final static sun.security.util.Debug debug =
  46         sun.security.util.Debug.getInstance("jca", "ProviderConfig");
  47 
  48     // classname of the SunPKCS11-Solaris provider
  49     private static final String P11_SOL_NAME =
  50         "sun.security.pkcs11.SunPKCS11";
  51 
  52     // config file argument of the SunPKCS11-Solaris provider
  53     private static final String P11_SOL_ARG  =
  54         "${java.home}/lib/security/sunpkcs11-solaris.cfg";
  55 
  56     // maximum number of times to try loading a provider before giving up
  57     private final static int MAX_LOAD_TRIES = 30;
  58 
  59     // parameters for the Provider(String) constructor,
  60     // use by doLoadProvider()
  61     private final static Class<?>[] CL_STRING = { String.class };
  62 
  63     // name of the provider class
  64     private final String className;
  65 
  66     // argument to the provider constructor,
  67     // empty string indicates no-arg constructor
  68     private final String argument;
  69 
  70     // number of times we have already tried to load this provider
  71     private int tries;
  72 
  73     // Provider object, if loaded
  74     private volatile Provider provider;




  34 
  35 /**
  36  * Class representing a configured provider. Encapsulates configuration
  37  * (className plus optional argument), the provider loading logic, and
  38  * the loaded Provider object itself.
  39  *
  40  * @author  Andreas Sterbenz
  41  * @since   1.5
  42  */
  43 final class ProviderConfig {
  44 
  45     private final static sun.security.util.Debug debug =
  46         sun.security.util.Debug.getInstance("jca", "ProviderConfig");
  47 
  48     // classname of the SunPKCS11-Solaris provider
  49     private static final String P11_SOL_NAME =
  50         "sun.security.pkcs11.SunPKCS11";
  51 
  52     // config file argument of the SunPKCS11-Solaris provider
  53     private static final String P11_SOL_ARG  =
  54         "${java.home}/conf/security/sunpkcs11-solaris.cfg";
  55 
  56     // maximum number of times to try loading a provider before giving up
  57     private final static int MAX_LOAD_TRIES = 30;
  58 
  59     // parameters for the Provider(String) constructor,
  60     // use by doLoadProvider()
  61     private final static Class<?>[] CL_STRING = { String.class };
  62 
  63     // name of the provider class
  64     private final String className;
  65 
  66     // argument to the provider constructor,
  67     // empty string indicates no-arg constructor
  68     private final String argument;
  69 
  70     // number of times we have already tried to load this provider
  71     private int tries;
  72 
  73     // Provider object, if loaded
  74     private volatile Provider provider;