SchemeRegistry (Apache HttpClient 4.5.13 API)
Date: 2020-10-03

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.http.conn.scheme
Class SchemeRegistry

    java.lang.Object
      org.apache.http.conn.scheme.SchemeRegistry

Deprecated. (4.3) use `Registry`

    @Contract(threading=SAFE)
    @Deprecated
    public final class SchemeRegistry

extends Object

A set of supported protocol `Scheme`s. Schemes are identified by lowercase names.

Since:
  4.0

Constructor Summary
`SchemeRegistry()` Deprecated. Creates a new, empty scheme registry.

Method Summary
`Scheme` | `get(String name)` Deprecated. Obtains a scheme by name, if registered.
`Scheme` | `getScheme(org.apache.http.HttpHost host)` Deprecated. Obtains the scheme for a host.
`Scheme` | `getScheme(String name)` Deprecated. Obtains a scheme by name.
`List<String>` | `getSchemeNames()` Deprecated. Obtains the names of the registered schemes.
`Scheme` | `register(Scheme sch)` Deprecated. Registers a scheme.
`void` | `setItems(Map<String,Scheme> map)` Deprecated. Populates the internal collection of registered `protocol schemes` with the content of the map passed as a parameter.
`Scheme` | `unregister(String name)` Deprecated. Unregisters a scheme.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SchemeRegistry

    public SchemeRegistry()

  Deprecated.
  Creates a new, empty scheme registry.

Method Detail

### getScheme

    public final Scheme getScheme(String name)

  Deprecated.
  Obtains a scheme by name.

  Parameters:
    `name` - the name of the scheme to look up (in lowercase)
  Returns:
    the scheme, never `null`
  Throws:
    `IllegalStateException` - if the scheme with the given name is not registered

### getScheme

    public final Scheme getScheme(org.apache.http.HttpHost host)

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

  Parameters:
    `host` - the host for which to obtain the scheme
  Returns:
    the scheme for the given host, never `null`
  Throws:
    `IllegalStateException` - if a scheme with the respective name is not registered

### get

    public final Scheme get(String name)

  Deprecated.
  Obtains a scheme by name, if registered.

  Parameters:
    `name` - the name of the scheme to look up (in lowercase)
  Returns:
    the scheme, or `null` if there is none by this name

### register

    public final Scheme register(Scheme sch)

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

  Parameters:
    `sch` - the scheme to register
  Returns:
    the scheme previously registered with that name, or `null` if none was registered

### unregister

    public final Scheme unregister(String name)

  Deprecated.
  Unregisters a scheme.

  Parameters:
    `name` - the name of the scheme to unregister (in lowercase)
  Returns:
    the unregistered scheme, or `null` if there was none

### getSchemeNames

    public final List<String> getSchemeNames()

  Deprecated.
  Obtains the names of the registered schemes.

  Returns:
    List containing registered scheme names.

### setItems

    public void setItems(Map<String,Scheme> map)

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

  Parameters:
    `map` - protocol schemes

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999–2020 The Apache Software Foundation. All rights reserved.