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 Summary
Constructors Constructor Description SharedHttpServiceImpl(HandlerRegistry handlerRegistry)
Create a new implementation
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull HandlerRegistry
getHandlerRegistry()
Get the handler registryvoid
registerServlet(@NotNull String alias, @NotNull ExtServletContext httpContext, javax.servlet.Servlet servlet, @NotNull ServletInfo servletInfo)
Register a servletjavax.servlet.Servlet
unregister(String alias)
Unregister a servletvoid
unregisterServlet(javax.servlet.Servlet servlet)
Unregister a servlet
-
-
-
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 aliashttpContext
- The servlet contextservlet
- The servletservletInfo
- The info for the servlet- Throws:
javax.servlet.ServletException
- If registration failsorg.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
-
-