Class PerBundleHttpServiceImpl
- java.lang.Object
-
- org.apache.felix.http.base.internal.service.PerBundleHttpServiceImpl
-
- All Implemented Interfaces:
org.osgi.service.http.HttpService
public final class PerBundleHttpServiceImpl extends Object implements org.osgi.service.http.HttpService
This implementation of theHttpService
implements the front end used by client bundles. It performs the validity checks and passes the real operation to the shared http service.
-
-
Constructor Summary
Constructors Constructor Description PerBundleHttpServiceImpl(org.osgi.framework.Bundle bundle, SharedHttpServiceImpl sharedHttpService, jakarta.servlet.ServletContext context, boolean sharedContextAttributes)
Create a new http service front end
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.osgi.service.http.HttpContext
createDefaultHttpContext()
@NotNull ExtServletContext
getServletContext(org.osgi.service.http.HttpContext context)
Get a servlet contextvoid
registerResources(String alias, String name, org.osgi.service.http.HttpContext context)
No need to sync this method, syncing is done viaregisterServlet(String, javax.servlet.Servlet, Dictionary, HttpContext)
void
registerServlet(String alias, javax.servlet.Servlet servlet, Dictionary initParams, org.osgi.service.http.HttpContext context)
void
unregister(String alias)
void
unregisterAll()
Remove all registered servlets
-
-
-
Constructor Detail
-
PerBundleHttpServiceImpl
public PerBundleHttpServiceImpl(org.osgi.framework.Bundle bundle, SharedHttpServiceImpl sharedHttpService, jakarta.servlet.ServletContext context, boolean sharedContextAttributes)
Create a new http service front end- Parameters:
bundle
- The using bundlesharedHttpService
- The shared servicecontext
- The contextsharedContextAttributes
- Shared context attributes?
-
-
Method Detail
-
createDefaultHttpContext
public org.osgi.service.http.HttpContext createDefaultHttpContext()
- Specified by:
createDefaultHttpContext
in interfaceorg.osgi.service.http.HttpService
-
registerResources
public void registerResources(String alias, String name, org.osgi.service.http.HttpContext context) throws org.osgi.service.http.NamespaceException
No need to sync this method, syncing is done viaregisterServlet(String, javax.servlet.Servlet, Dictionary, HttpContext)
- Specified by:
registerResources
in interfaceorg.osgi.service.http.HttpService
- Throws:
org.osgi.service.http.NamespaceException
- See Also:
HttpService.registerResources(java.lang.String, java.lang.String, org.osgi.service.http.HttpContext)
-
registerServlet
public void registerServlet(String alias, javax.servlet.Servlet servlet, Dictionary initParams, org.osgi.service.http.HttpContext context) throws javax.servlet.ServletException, org.osgi.service.http.NamespaceException
- Specified by:
registerServlet
in interfaceorg.osgi.service.http.HttpService
- Throws:
javax.servlet.ServletException
org.osgi.service.http.NamespaceException
- See Also:
HttpService.registerServlet(java.lang.String, javax.servlet.Servlet, java.util.Dictionary, org.osgi.service.http.HttpContext)
-
unregister
public void unregister(String alias)
- Specified by:
unregister
in interfaceorg.osgi.service.http.HttpService
- See Also:
HttpService.unregister(java.lang.String)
-
unregisterAll
public void unregisterAll()
Remove all registered servlets
-
getServletContext
@NotNull public @NotNull ExtServletContext getServletContext(org.osgi.service.http.HttpContext context)
Get a servlet context- Parameters:
context
- http context- Returns:
- servlet context
-
-