Top Description Fields Constructors Methods
org.apache.http.conn.scheme

public final Class SchemeRegistry

extends Object
Class Inheritance
Annotations
@Contract
threading:SAFE
@Deprecated
Imports
java.util.ArrayList, .List, .Map, java.util.concurrent.ConcurrentHashMap, org.apache.http.HttpHost, org.apache.http.annotation.Contract, .ThreadingBehavior, org.apache.http.util.Args

Deprecated

(4.3) use org.apache.http.config.Registry

A set of supported protocol Schemes. Schemes are identified by lowercase names.
Since
4.0

Field Summary

Modifier and TypeField and Description
private final ConcurrentHashMap<String, Scheme>
registeredSchemes

The available schemes in this registry.

Constructor Summary

AccessConstructor and Description
public
SchemeRegistry()

Creates a new, empty scheme registry.

Method Summary

Modifier and TypeMethod and Description
public Scheme

Returns:

the scheme, or null if there is none by this name
get
(final String
the name of the scheme to look up (in lowercase)
name
)

Deprecated as a consequence of Scheme being deprecated.
Obtains a scheme by name, if registered.
public Scheme

Returns:

the scheme, never null
getScheme
(final String
the name of the scheme to look up (in lowercase)
name
)

Deprecated as a consequence of Scheme being deprecated.
Obtains a scheme by name.
public Scheme

Returns:

the scheme for the given host, never null
getScheme
(final HttpHost
the host for which to obtain the scheme
host
)

Deprecated as a consequence of Scheme being deprecated.
Obtains the scheme for a host.
public List<String>

Returns:

List containing registered scheme names.
getSchemeNames
()

Obtains the names of the registered schemes.

public Scheme

Returns:

the scheme previously registered with that name, or null if none was registered
register
(final Scheme
the scheme to register
sch
)

Deprecated as a consequence of Scheme being deprecated.
Registers a scheme.
public void
setItems(final Map<String, Scheme>
protocol schemes
map
)

Populates the internal collection of registered protocol schemes with the content of the map passed as a parameter.

public Scheme

Returns:

the unregistered scheme, or null if there was none
unregister
(final String
the name of the scheme to unregister (in lowercase)
name
)

Deprecated as a consequence of Scheme being deprecated.
Unregisters a scheme.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

registeredSchemesback to summary
private final ConcurrentHashMap<String, Scheme> registeredSchemes

The available schemes in this registry.

Constructor Detail

SchemeRegistryback to summary
public SchemeRegistry()

Creates a new, empty scheme registry.

Method Detail

getback to summary
public Scheme get(final String name)

Deprecated

as a consequence of Scheme being deprecated. See corresponding docs for further information.

Obtains a scheme by name, if registered.

Parameters
name:String

the name of the scheme to look up (in lowercase)

Returns:Scheme

the scheme, or null if there is none by this name

getSchemeback to summary
public Scheme getScheme(final String name)

Deprecated

as a consequence of Scheme being deprecated. See corresponding docs for further information.

Obtains a scheme by name.

Parameters
name:String

the name of the scheme to look up (in lowercase)

Returns:Scheme

the scheme, never null

Exceptions
IllegalStateException:
if the scheme with the given name is not registered
getSchemeback to summary
public Scheme getScheme(final HttpHost host)

Deprecated

as a consequence of Scheme being deprecated. See corresponding docs for further information.

Obtains the scheme for a host. Convenience method for getScheme(host.getSchemeName())

Parameters
host:HttpHost

the host for which to obtain the scheme

Returns:Scheme

the scheme for the given host, never null

Exceptions
IllegalStateException:
if a scheme with the respective name is not registered
getSchemeNamesback to summary
public List<String> getSchemeNames()

Obtains the names of the registered schemes.

Returns:List<String>

List containing registered scheme names.

registerback to summary
public Scheme register(final Scheme sch)

Deprecated

as a consequence of Scheme being deprecated. See corresponding docs for further information.

Registers a scheme. The scheme can later be retrieved by its name using getScheme or get.

Parameters
sch:Scheme

the scheme to register

Returns:Scheme

the scheme previously registered with that name, or null if none was registered

setItemsback to summary
public void setItems(final Map<String, Scheme> map)

Populates the internal collection of registered protocol schemes with the content of the map passed as a parameter.

Parameters
map:Map<String, Scheme>

protocol schemes

unregisterback to summary
public Scheme unregister(final String name)

Deprecated

as a consequence of Scheme being deprecated. See corresponding docs for further information.

Unregisters a scheme.

Parameters
name:String

the name of the scheme to unregister (in lowercase)

Returns:Scheme

the unregistered scheme, or null if there was none