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
Constructor
Description
`ServletRegistry()`

## Method Summary

Modifier and Type
Method
Description
`void`
`addServlet(@NotNull ServletHandler handler)`
Add a servlet.
`void`
`cleanup()`
`void`
`getRuntimeInfo(org.osgi.service.servlet.runtime.dto.ServletContextDTO servletContextDTO, Collection<org.osgi.service.servlet.runtime.dto.FailedServletDTO> allFailedServletDTOs, Collection<org.osgi.service.servlet.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 Details

### ServletRegistry

public ServletRegistry()

## Method Details

### 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
  `destroy` - Unused

### cleanup

public void cleanup()

### resolveByName

public ServletHandler resolveByName(@NotNull @NotNull String name)

### getRuntimeInfo

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