Class WhiteboardManager
- java.lang.Object
-
- org.apache.felix.http.base.internal.whiteboard.WhiteboardManager
-
public final class WhiteboardManager extends Object
-
-
Constructor Summary
Constructors Constructor Description WhiteboardManager(org.osgi.framework.BundleContext bundleContext, HttpServiceFactory httpServiceFactory, HandlerRegistry registry)
Create a new whiteboard http manager
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addContextHelper(ServletContextHelperInfo info)
Add a servlet context helper.boolean
addWhiteboardService(@NotNull WhiteboardServiceInfo<?> info)
Add new whiteboard service to the registryRegistryRuntime
getRuntimeInfo()
void
invokePreprocessors(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, org.osgi.service.http.whiteboard.Preprocessor dispatcher)
Invoke all preprocessorsvoid
removeContextHelper(ServletContextHelperInfo info)
Remove a servlet context helpervoid
removeWhiteboardService(WhiteboardServiceInfo<?> info)
Remove whiteboard service from the registry.void
sessionDestroyed(@NotNull javax.servlet.http.HttpSession session, Set<String> contextNames)
void
sessionIdChanged(@NotNull javax.servlet.http.HttpSessionEvent event, String oldSessionId, Set<String> contextNames)
Handle session id changesvoid
start(javax.servlet.ServletContext containerContext, @NotNull Dictionary<String,Object> httpServiceProps)
Start the whiteboard managervoid
stop()
Stop the instance
-
-
-
Constructor Detail
-
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 Detail
-
start
public void start(javax.servlet.ServletContext containerContext, @NotNull @NotNull Dictionary<String,Object> httpServiceProps)
Start the whiteboard manager- Parameters:
containerContext
- The servlet context
-
stop
public void stop()
Stop the instance
-
sessionDestroyed
public void sessionDestroyed(@NotNull @NotNull javax.servlet.http.HttpSession session, Set<String> contextNames)
-
sessionIdChanged
public void sessionIdChanged(@NotNull @NotNull javax.servlet.http.HttpSessionEvent event, String oldSessionId, Set<String> contextNames)
Handle session id changes- Parameters:
session
- The session where the id changedoldSessionId
- The old session idcontextIds
- The context ids using that session
-
addContextHelper
public boolean addContextHelper(ServletContextHelperInfo info)
Add a servlet context helper.- Parameters:
info
- The servlet context helper info- Returns:
true
if the service matches this http whiteboard service
-
removeContextHelper
public void removeContextHelper(ServletContextHelperInfo info)
Remove a servlet context helper- Parameters:
The
- servlet context helper info
-
addWhiteboardService
public boolean addWhiteboardService(@NotNull @NotNull WhiteboardServiceInfo<?> info)
Add new whiteboard service to the registry- Parameters:
info
- Whiteboard service info- Returns:
true
if it matches this http service runtime
-
removeWhiteboardService
public void removeWhiteboardService(WhiteboardServiceInfo<?> info)
Remove whiteboard service from the registry.- Parameters:
info
- The service id of the whiteboard service
-
getRuntimeInfo
public RegistryRuntime getRuntimeInfo()
-
invokePreprocessors
public void invokePreprocessors(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, org.osgi.service.http.whiteboard.Preprocessor dispatcher) throws javax.servlet.ServletException, IOException
Invoke all preprocessors- Parameters:
req
- The requestres
- The response- Throws:
IOException
javax.servlet.ServletException
-
-