Class AsyncSchemeRegistry

java.lang.Object
org.apache.http.nio.conn.scheme.AsyncSchemeRegistry

@Deprecated public final class AsyncSchemeRegistry extends Object
Deprecated.
A set of supported protocol AsyncSchemes. Schemes are identified by lowercase names.
  • Field Details

    • registeredSchemes

      private final Map<String,AsyncScheme> registeredSchemes
      Deprecated.
      The available schemes in this registry.
  • Constructor Details

    • AsyncSchemeRegistry

      public AsyncSchemeRegistry()
      Deprecated.
      Creates a new, empty scheme registry.
  • Method Details

    • getScheme

      public final AsyncScheme 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 AsyncScheme 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 AsyncScheme 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 AsyncScheme register(AsyncScheme 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 AsyncScheme 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,AsyncScheme> map)
      Deprecated.
      Populates the internal collection of registered protocol schemes with the content of the map passed as a parameter.
      Parameters:
      map - protocol schemes