public interface ServletContextHelperMapping extends ContextMapping
ServletContextHelper mapping collects all the information required to register a
ServletContextHelper to allow referencing it later. This is actually not recommended Whiteboard service,
because OSGi CMPN Whiteboard specification mentions registrations of ServletContextHelper services
directly, with supporting service registration parameters, which is the OSGi way.
Registering a ServletContextHelper can be done in two ways:
ServletContextHelper service, while required properties (mapping,
name, parameters) are specified using service registration properties/annotations
(OSGi CMPN Whiteboard approach)This interface doesn't extend ContextRelated, because it represents the context itself.
Even if getServletContextHelper() may return a singleton or a new instance on each call, this method
will be called once and the result will be treated as singleton.
EMPTY_STRING_ARRAY| Modifier and Type | Method and Description |
|---|---|
org.osgi.service.http.context.ServletContextHelper |
getServletContextHelper()
Get actual context help being registered.
|
default org.osgi.service.http.context.ServletContextHelper |
getServletContextHelper(org.osgi.framework.Bundle bundle)
Get actual context help being registered.
|
getConnectors, getContextId, getContextPath, getInitParameters, getVirtualHostsorg.osgi.service.http.context.ServletContextHelper getServletContextHelper()
Get actual context help being registered. If specified, this is the way to provide the behavioral
aspects of the context (e.g., ServletContextHelper.handleSecurity(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)). If not specified, default
ServletContextHelper will be created according to ContextMapping.getContextId().
default org.osgi.service.http.context.ServletContextHelper getServletContextHelper(org.osgi.framework.Bundle bundle)
Get actual context help being registered. This version accepts Bundle, so it's possible to
return ServletContextHelper tied to given bundle. By default, Bundle argument is ignored and
getServletContextHelper() is called.
This method reflects Whiteboard Service specification, where ServletContextHelper is recommended
to be registered as ServiceFactory.
Copyright © 2006–2024 OPS4J - Open Participation Software for Java. All rights reserved.