Class SharedHttpServiceImpl

java.lang.Object
org.apache.felix.http.base.internal.service.SharedHttpServiceImpl

public final class SharedHttpServiceImpl extends Object
Shared http service implementation This implementation is shared by all bundles using the http service.
  • Constructor Details

    • SharedHttpServiceImpl

      public SharedHttpServiceImpl(HandlerRegistry handlerRegistry)
      Create a new implementation
      Parameters:
      handlerRegistry - The handler registry
  • Method Details

    • registerServlet

      public void registerServlet(@NotNull String alias, @NotNull ExtServletContext httpContext, @NotNull javax.servlet.Servlet servlet, @NotNull ServletInfo servletInfo) throws javax.servlet.ServletException, org.osgi.service.http.NamespaceException
      Register a servlet
      Parameters:
      alias - The alias
      httpContext - The servlet context
      servlet - The servlet
      servletInfo - The info for the servlet
      Throws:
      javax.servlet.ServletException - If registration fails
      org.osgi.service.http.NamespaceException - If a servlet for the same alias already exists
    • unregister

      public javax.servlet.Servlet unregister(String alias)
      Unregister a servlet
      Parameters:
      alias - The alias
      Returns:
      The servlet or null
      See Also:
      • HttpService.unregister(java.lang.String)
    • unregisterServlet

      public void unregisterServlet(javax.servlet.Servlet servlet)
      Unregister a servlet
      Parameters:
      servlet - The servlet
    • getHandlerRegistry

      @NotNull public HandlerRegistry getHandlerRegistry()
      Get the handler registry
      Returns:
      The registry