Package org.apache.felix.http.base.internal.registry

## Class HandlerRegistry

- java.lang.Object
- - org.apache.felix.http.base.internal.registry.HandlerRegistry

    public final class HandlerRegistry
    extends Object

Registry for all services. The registry is organized per servlet context and is dispatching to one of the `PerContextHandlerRegistry` registries.

### Constructor Summary

Constructors
`HandlerRegistry​(org.apache.felix.http.base.internal.HttpConfig config)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `add​(@NotNull PerContextHandlerRegistry registry)` Add a new context registration.
`PerContextHandlerRegistry` `getBestMatchingRegistry​(String requestURI)`
`org.apache.felix.http.base.internal.HttpConfig` `getConfig()`
`@Nullable ServletResolution` `getErrorHandler​(@NotNull String requestURI, Long serviceId, int code, Throwable exception)`
`FilterHandler[]` `getFilters​(@NotNull ServletResolution pr, @NotNull javax.servlet.DispatcherType dispatcherType, @NotNull String requestURI)`
`PerContextHandlerRegistry` `getRegistry​(long key)`
`boolean` `getRuntimeInfo​(@NotNull org.osgi.service.http.runtime.dto.ServletContextDTO dto, @NotNull FailedDTOHolder failedDTOHolder)`
`void` `init()` Register default context registry for Http Service
`void` `remove​(@NotNull ServletContextHelperInfo info)` Remove a context registration.
`void` `reset()` Reset to initial state
`PathResolution` `resolveServlet​(@NotNull String requestURI)`
`ServletResolution` `resolveServletByName​(long contextId, @NotNull String name)` Get the servlet handler for a servlet by name
`void` `shutdown()` Shutdown

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

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

### Constructor Detail

#### HandlerRegistry

    public HandlerRegistry​(org.apache.felix.http.base.internal.HttpConfig config)

### Method Detail

#### getConfig

    public org.apache.felix.http.base.internal.HttpConfig getConfig()

#### init

    public void init()

Register default context registry for Http Service

#### reset

    public void reset()

Reset to initial state

#### shutdown

    public void shutdown()

Shutdown

#### remove

    public void remove​(@NotNull
                       @NotNull ServletContextHelperInfo info)

Remove a context registration.

Parameters:
  `info` - The servlet context helper info

#### add

    public void add​(@NotNull
                    @NotNull PerContextHandlerRegistry registry)

Add a new context registration.

#### getRegistry

    public PerContextHandlerRegistry getRegistry​(long key)

#### getErrorHandler

    @Nullable
    public @Nullable ServletResolution getErrorHandler​(@NotNull
                                                       @NotNull String requestURI,
                                                       Long serviceId,
                                                       int code,
                                                       Throwable exception)

#### getFilters

    public FilterHandler[] getFilters​(@NotNull
                                      @NotNull ServletResolution pr,
                                      @NotNull
                                      @NotNull javax.servlet.DispatcherType dispatcherType,
                                      @NotNull
                                      @NotNull String requestURI)

#### resolveServlet

    public PathResolution resolveServlet​(@NotNull
                                         @NotNull String requestURI)

#### resolveServletByName

    public ServletResolution resolveServletByName​(long contextId,
                                                  @NotNull
                                                  @NotNull String name)

Get the servlet handler for a servlet by name

Parameters:
  `contextId` - The context id
  `name` - The servlet name
Returns:
  The servlet handler or `null`

#### getRuntimeInfo

    public boolean getRuntimeInfo​(@NotNull
                                  @NotNull org.osgi.service.http.runtime.dto.ServletContextDTO dto,
                                  @NotNull
                                  @NotNull FailedDTOHolder failedDTOHolder)

#### getBestMatchingRegistry

    public PerContextHandlerRegistry getBestMatchingRegistry​(String requestURI)