org.apache.hc.core5.http.protocol

## Class RequestHandlerRegistry<T>

- java.lang.Object
- - org.apache.hc.core5.http.protocol.RequestHandlerRegistry<T>

- Type Parameters:
    `T` - request handler type.
  All Implemented Interfaces:
    HttpRequestMapper<T>

  Deprecated.
  Use `RequestRouter`.

      @Contract(threading=SAFE_CONDITIONAL)
       @Deprecated
      public class RequestHandlerRegistry<T>
      extends Object
      implements HttpRequestMapper<T>

  Generic registry of request handlers that can be resolved by properties of request messages.
  Since:
    5.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RequestHandlerRegistry()` Deprecated.
    `RequestHandlerRegistry(String canonicalHostName, Supplier<LookupRegistry<T>> registrySupplier)` Deprecated.
    `RequestHandlerRegistry(String canonicalHostName, UriPatternType patternType)` Deprecated.
    `RequestHandlerRegistry(UriPatternType patternType)` Deprecated.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `register(String hostname, String uriPattern, T object)` Deprecated.
    `T` | `resolve(HttpRequest request, HttpContext context)` Deprecated. Resolves a handler matching the given request.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RequestHandlerRegistry

          public RequestHandlerRegistry(String canonicalHostName,
                                        Supplier<LookupRegistry<T>> registrySupplier)

      Deprecated.

    - #### RequestHandlerRegistry

          public RequestHandlerRegistry(String canonicalHostName,
                                        UriPatternType patternType)

      Deprecated.

    - #### RequestHandlerRegistry

          public RequestHandlerRegistry(UriPatternType patternType)

      Deprecated.

    - #### RequestHandlerRegistry

          public RequestHandlerRegistry()

      Deprecated.

  - ### Method Detail

    - #### resolve

          public T resolve(HttpRequest request,
                           HttpContext context)
                    throws MisdirectedRequestException

      Deprecated.
      Description copied from interface: `HttpRequestMapper`
      Resolves a handler matching the given request.
      Specified by:
        `resolve` in interface `HttpRequestMapper<T>`
      Parameters:
        `request` - the request to map to a handler
      Returns:
        HTTP request handler or `null` if no match is found.
      Throws:
        `MisdirectedRequestException`

    - #### register

          public void register(String hostname,
                               String uriPattern,
                               T object)

      Deprecated.

Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.