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 Details

    • HandlerRegistry

      public HandlerRegistry(org.apache.felix.http.base.internal.HttpConfig config)
  • Method Details

    • 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.
      Parameters:
      registry - The registry
    • 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 jakarta.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.servlet.runtime.dto.ServletContextDTO dto, @NotNull @NotNull FailedDTOHolder failedDTOHolder)
    • getBestMatchingRegistry

      public PerContextHandlerRegistry getBestMatchingRegistry(String requestURI)