Top Description Inners Fields Constructors Methods
sun.security.jca

pack-priv final Class ProviderConfig

extends Object
Class Inheritance
Imports
java.io.File, java.lang.reflect.*, java.util.*, java.security.*, sun.security.util.PropertyExpander

Class representing a configured provider which encapsulates configuration (provider name + optional argument), the provider loading logic, and the loaded Provider object itself.
Author
Andreas Sterbenz
Since
1.5

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final String
private static final Debug
private boolean
private static final int
private static final String
private static final String
private volatile Provider
private final String
private int

Constructor Summary

AccessConstructor and Description
pack-priv
ProviderConfig(String provName, String argument)

pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
private void
private void
private Provider

Returns:

null if the Provider could not be loaded
doLoadProvider
()

Load and instantiate the Provider described by this class.

public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

private static String
expand(final String value)

Perform property expansion of the provider value.

pack-priv Provider
getProvider()

Get the provider object.

private boolean
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

pack-priv boolean
private boolean
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

argumentback to summary
private final String argument
debugback to summary
private static final Debug debug
isLoadingback to summary
private boolean isLoading
MAX_LOAD_TRIESback to summary
private static final int MAX_LOAD_TRIES
P11_SOL_ARGback to summary
private static final String P11_SOL_ARG
P11_SOL_NAMEback to summary
private static final String P11_SOL_NAME
providerback to summary
private volatile Provider provider
provNameback to summary
private final String provName
triesback to summary
private int tries

Constructor Detail

ProviderConfigback to summary
pack-priv ProviderConfig(String provName, String argument)
ProviderConfigback to summary
pack-priv ProviderConfig(String provName)
ProviderConfigback to summary
pack-priv ProviderConfig(Provider provider)

Method Detail

checkSunPKCS11Solarisback to summary
private void checkSunPKCS11Solaris()
disableLoadback to summary
private void disableLoad()
doLoadProviderback to summary
private Provider doLoadProvider()

Load and instantiate the Provider described by this class. NOTE use of doPrivileged().

Returns:Provider

null if the Provider could not be loaded

Annotations
@SuppressWarnings:removal
Exceptions
ProviderException:
if executing the Provider's constructor throws a ProviderException. All other Exceptions are ignored.
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
expandback to summary
private static String expand(final String value)

Perform property expansion of the provider value. NOTE use of doPrivileged().

Annotations
@SuppressWarnings:removal
getProviderback to summary
pack-priv Provider getProvider()

Get the provider object. Loads the provider if it is not already loaded.

Annotations
@SuppressWarnings:deprecation
hasArgumentback to summary
private boolean hasArgument()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
isLoadedback to summary
pack-priv boolean isLoaded()
shouldLoadback to summary
private boolean shouldLoad()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

sun.security.jca back to summary

private final Class ProviderConfig.ProviderLoader

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv static final ProviderConfig.ProviderLoader
private final ServiceLoader<Provider>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private Provider
legacyLoad(String classname)

public Provider

Returns:

the Provider, or null if it cannot be found or loaded
load
(String
the name of the provider
pn
)

Loads the provider with the specified class name.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
pack-priv static final ProviderConfig.ProviderLoader INSTANCE
servicesback to summary
private final ServiceLoader<Provider> services

Constructor Detail

ProviderLoaderback to summary
private ProviderLoader()

Method Detail

legacyLoadback to summary
private Provider legacyLoad(String classname)
loadback to summary
public Provider load(String pn)

Loads the provider with the specified class name.

Parameters
pn:String

the name of the provider

Returns:Provider

the Provider, or null if it cannot be found or loaded

Exceptions
ProviderException:
all other exceptions are ignored