| java.lang.Object |
| ↳ |
sun.security.mule.jgss.ProviderList |
Class Overview
This class stores the list of providers that this
GSS-Implementation is configured to use. The GSSManagerImpl class
queries this class whenever it needs a mechanism's factory.
This class stores an ordered list of pairs of the form . When it attempts to
instantiate a mechanism defined by oid o, it steps through the list looking for an entry with
oid=o, or with oid=null. (An entry with oid=null matches all mechanisms.) When it finds such an
entry, the corresponding provider is approached for the mechanism's factory class. At
instantiation time this list in initialized to contain those system wide providers that contain a
property of the form "GssApiMechanism.x.y.z..." where "x.y.z..." is a numeric object identifier
with numbers x, y, z, etc. Such a property is defined to map to that provider's implementation of
the MechanismFactory interface for the mechanism x.y.z... As and when a MechanismFactory is
instantiated, it is cached for future use.
An application can cause more providers to be added by means of the addProviderAtFront and
addProviderAtEnd methods on GSSManager which get delegated to this class. The addProviderAtFront
method can also cause a change in the ordering of the providers without adding any new providers,
by causing a provider to move up in a list. The method addProviderAtEnd can only add providers at
the end of the list if they are not already in the list. The rationale is that an application
will call addProviderAtFront when it wants a provider to be used in preference over the default
ones. And it will call addProviderAtEnd when it wants a provider to be used in case the system
ones don't suffice.
If a mechanism's factory is being obtained from a provider as a result of encountering a entryof
the form where oid is non-null, then the assumption is that the application added
this entry and it wants this mechanism to be obtained from this provider. Thus is the provider
does not actually contain the requested mechanism, an exception will be thrown. However, if the
entry were of the form , then it is viewed more liberally and is simply skipped
over if the provider does not claim to support the requested mechanism.
Summary
|
[Expand]
Inherited Methods |
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
Constants
private
static
final
String
DEFAULT_MECH_PROP
Constant Value:
"sun.security.mule.jgss.mechanism"
private
static
final
String
PROV_PROP_PREFIX
Constant Value:
"GssApiMechanism."
private
static
final
String
SPI_MECH_FACTORY_TYPE
Constant Value:
"sun.security.mule.jgss.spi.MechanismFactory"
Fields
public
static
final
Oid
DEFAULT_MECH_OID
private
static
final
int
PROV_PROP_PREFIX_LEN
private
HashSet<Oid>
mechs
private
ArrayList<ProviderList.PreferencesEntry>
preferences
Public Constructors
public
ProviderList
(int caller, boolean useNative, Config kerberosConfig)
Parameters
| caller
| |
| useNative
| |
| kerberosConfig
| |
Public Methods
public
synchronized
void
addProviderAtEnd
(Provider p, Oid mechOid)
public
synchronized
void
addProviderAtFront
(Provider p, Oid mechOid)
public
synchronized
MechanismFactory
getMechFactory
(Oid mechOid, Provider p)
Obtains a MechanismFactory for a given mechanism. If the
specified provider is not null, then the impl from the
provider is used. Otherwise, the most preferred impl based
on the configured preferences is used.
Parameters
| mechOid
| The oid of the desired mechanism |
| p
| |
Returns
- a MechanismFactory for the desired mechanism.
Throws
| GSSException
| when the specified provider does not
support the desired mechanism, or when no provider supports
the desired mechanism.
|