Class WhiteboardManager
java.lang.Object
org.apache.felix.http.base.internal.whiteboard.WhiteboardManager
-
Constructor Summary
ConstructorsConstructorDescriptionWhiteboardManager(org.osgi.framework.BundleContext bundleContext, HttpServiceFactory httpServiceFactory, HandlerRegistry registry) Create a new whiteboard http manager -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdd a servlet context helper.booleanAdd new whiteboard service to the registryvoidinvokePreprocessors(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, org.osgi.service.servlet.whiteboard.Preprocessor dispatcher) Invoke all preprocessorsvoidRemove a servlet context helpervoidRemove whiteboard service from the registry.voidsessionDestroyed(jakarta.servlet.http.HttpSession session, Set<String> contextNames) voidsessionIdChanged(jakarta.servlet.http.HttpSessionEvent event, String oldSessionId, Set<String> contextNames) Handle session id changesvoidstart(jakarta.servlet.ServletContext containerContext, Dictionary<String, Object> httpServiceProps) Start the whiteboard managervoidstop()Stop the instance
-
Constructor Details
-
WhiteboardManager
public WhiteboardManager(org.osgi.framework.BundleContext bundleContext, HttpServiceFactory httpServiceFactory, HandlerRegistry registry) Create a new whiteboard http manager- Parameters:
bundleContext- The bundle context of the http bundlehttpServiceFactory- The http service factoryregistry- The handler registry
-
-
Method Details
-
start
public void start(jakarta.servlet.ServletContext containerContext, @NotNull Dictionary<String, Object> httpServiceProps) Start the whiteboard manager- Parameters:
containerContext- The servlet context
-
stop
public void stop()Stop the instance -
sessionDestroyed
-
sessionIdChanged
public void sessionIdChanged(@NotNull jakarta.servlet.http.HttpSessionEvent event, String oldSessionId, Set<String> contextNames) Handle session id changes- Parameters:
event- The session eventoldSessionId- The old session idcontextNames- The context names using that session
-
addContextHelper
Add a servlet context helper.- Parameters:
info- The servlet context helper info- Returns:
trueif the service matches this http whiteboard service
-
removeContextHelper
Remove a servlet context helper- Parameters:
info- The servlet context helper info
-
addWhiteboardService
Add new whiteboard service to the registry- Parameters:
info- Whiteboard service info- Returns:
trueif it matches this http service runtime
-
removeWhiteboardService
Remove whiteboard service from the registry.- Parameters:
info- The service id of the whiteboard service
-
getRuntimeInfo
-
invokePreprocessors
public void invokePreprocessors(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, org.osgi.service.servlet.whiteboard.Preprocessor dispatcher) throws jakarta.servlet.ServletException, IOException Invoke all preprocessors- Parameters:
req- The requestres- The responsedispatcher- The dispatcher- Throws:
IOExceptionjakarta.servlet.ServletException
-