org.apache.hc.core5.http.protocol

## Interface LookupRegistry<T>

- Type Parameters:
    `T` - The type of objects to register and lookup.
  All Known Implementing Classes:
    UriPatternMatcher, UriPatternOrderedMatcher, UriRegexMatcher

      public interface LookupRegistry<T>

  A lookup registry.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `lookup(String value)` Looks up an object matching the given request path.
    `void` | `register(String pattern, T obj)` Registers the given object for URIs matching the given pattern.
    `void` | `unregister(String pattern)` Removes registered object, if exists, for the given pattern.

- - ### Method Detail

    - #### register

          void register(String pattern,
                        T obj)

      Registers the given object for URIs matching the given pattern.
      Parameters:
        `pattern` - the pattern to register the handler for.
        `obj` - the object.

    - #### lookup

          T lookup(String value)

      Looks up an object matching the given request path.
      Parameters:
        `value` - the request path
      Returns:
        object or `null` if no match is found.

    - #### unregister

          void unregister(String pattern)

      Removes registered object, if exists, for the given pattern.
      Parameters:
        `pattern` - the pattern to unregister.

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