Class SharedHttpServiceImpl


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

      • SharedHttpServiceImpl

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

      • registerServlet

        public void registerServlet​(@NotNull
                                    @NotNull String alias,
                                    @NotNull
                                    @NotNull ExtServletContext httpContext,
                                    @NotNull
                                    javax.servlet.Servlet servlet,
                                    @NotNull
                                    @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 @NotNull HandlerRegistry getHandlerRegistry()
        Get the handler registry
        Returns:
        The registry