public final class AuthSchemeRegistry
extends java.lang.Object
Constructor and Description |
---|
AuthSchemeRegistry() |
Modifier and Type | Method and Description |
---|---|
AuthScheme |
getAuthScheme(java.lang.String name,
HttpParams params)
Gets the
authentication scheme with the given name. |
java.util.List |
getSchemeNames()
Obtains a list containing names of all registered
authentication
schemes in their default order. |
void |
register(java.lang.String name,
AuthSchemeFactory factory)
Registers a
AuthSchemeFactory with the given identifier. |
void |
setItems(java.util.Map map)
Populates the internal collection of registered
authentication schemes
with the content of the map passed as a parameter. |
void |
unregister(java.lang.String name)
Unregisters the class implementing an
authentication scheme with
the given name. |
public void register(java.lang.String name, AuthSchemeFactory factory)
AuthSchemeFactory
with the given identifier. If a factory with the
given name already exists it will be overridden. This name is the same one used to
retrieve the authentication scheme
from getAuthScheme(java.lang.String, org.apache.http.params.HttpParams)
.
Please note that custom authentication preferences, if used, need to be updated accordingly
for the new authentication scheme
to take effect.
name
- the identifier for this schemefactory
- the AuthSchemeFactory
class to registergetAuthScheme(java.lang.String, org.apache.http.params.HttpParams)
public void unregister(java.lang.String name)
authentication scheme
with
the given name.name
- the identifier of the class to unregisterpublic AuthScheme getAuthScheme(java.lang.String name, HttpParams params) throws java.lang.IllegalStateException
authentication scheme
with the given name.name
- the authentication scheme
identifierparams
- the HTTP parameters
for the authentication
scheme.authentication scheme
java.lang.IllegalStateException
- if a scheme with the given name cannot be foundpublic java.util.List getSchemeNames()
authentication
schemes
in their default order.public void setItems(java.util.Map map)
authentication schemes
with the content of the map passed as a parameter.map
- authentication schemes