sun.security.mule.jgss
Class ProviderList
java.lang.Object
sun.security.mule.jgss.ProviderList
public final class ProviderList
- extends Object
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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_MECH_OID
public static final Oid DEFAULT_MECH_OID
ProviderList
public ProviderList(int caller,
boolean useNative,
Config kerberosConfig)
getMechFactory
public MechanismFactory getMechFactory(Oid mechOid)
throws GSSException
- Throws:
GSSException
getMechFactory
public MechanismFactory getMechFactory(Oid mechOid,
Provider p)
throws GSSException
- 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
- 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.
getMechs
public Oid[] getMechs()
addProviderAtFront
public void addProviderAtFront(Provider p,
Oid mechOid)
throws GSSException
- Throws:
GSSException
addProviderAtEnd
public void addProviderAtEnd(Provider p,
Oid mechOid)
throws GSSException
- Throws:
GSSException
Copyright © 2013. All Rights Reserved.