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

## Class ServletRegistry

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

    public final class ServletRegistry
    extends Object

The servlet registry keeps the mappings for all servlets (by using their pattern) for a single servlet context.

### Constructor Summary

Constructors
`ServletRegistry()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addServlet​(@NotNull ServletHandler handler)` Add a servlet.
`void` `cleanup()`
`void` `getRuntimeInfo​(org.osgi.service.http.runtime.dto.ServletContextDTO servletContextDTO, Collection<org.osgi.service.http.runtime.dto.FailedServletDTO> allFailedServletDTOs, Collection<org.osgi.service.http.runtime.dto.FailedResourceDTO> allFailedResourceDTOs)`
`void` `removeServlet​(@NotNull ServletInfo info, boolean destroy)` Remove a servlet
`PathResolution` `resolve​(@NotNull String relativeRequestURI)` Resolve a request uri
`ServletHandler` `resolveByName​(@NotNull String name)`

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

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

### Constructor Detail

#### ServletRegistry

    public ServletRegistry()

### Method Detail

#### resolve

    public PathResolution resolve​(@NotNull
                                  @NotNull String relativeRequestURI)

Resolve a request uri

Parameters:
  `relativeRequestURI` - The request uri
Returns:
  A path resolution if a servlet matched, `null` otherwise

#### addServlet

    public void addServlet​(@NotNull
                           @NotNull ServletHandler handler)

Add a servlet.

Parameters:
  `handler` - The servlet handler

#### removeServlet

    public void removeServlet​(@NotNull
                              @NotNull ServletInfo info,
                              boolean destroy)

Remove a servlet

Parameters:
  `info` - The servlet info

#### cleanup

    public void cleanup()

#### resolveByName

    public ServletHandler resolveByName​(@NotNull
                                        @NotNull String name)

#### getRuntimeInfo

    public void getRuntimeInfo​(org.osgi.service.http.runtime.dto.ServletContextDTO servletContextDTO,
                               Collection<org.osgi.service.http.runtime.dto.FailedServletDTO> allFailedServletDTOs,
                               Collection<org.osgi.service.http.runtime.dto.FailedResourceDTO> allFailedResourceDTOs)