public interface HttpContextMapping extends ContextMapping
HttpContext mapping collects all the information required to register a HttpContext to
allow referencing it later.
Registering a HttpContext can be done in two ways:
HttpContext service, while required properties (mapping, name, parameters) are
specified using service registration properties (legacy Pax Web Whiteboard approach)This interface doesn't extend ContextRelated, because it represents the context itself.
Even if getHttpContext() 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.HttpContext |
getHttpContext()
Get actual context being registered.
|
default org.osgi.service.http.HttpContext |
getHttpContext(org.osgi.framework.Bundle bundle)
Get actual context being registered.
|
boolean |
isShared()
Whether the context should be shared - Whiteboard contexts are always shared, but Http Service doesn't
define such flag at all.
|
getConnectors, getContextId, getContextPath, getInitParameters, getVirtualHostsorg.osgi.service.http.HttpContext getHttpContext()
Get actual context being registered. If specified, this is the way to provide the behavioral
aspects of the context (e.g., HttpContext.handleSecurity(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)). If not specified, default
HttpContext will be created according to ContextMapping.getContextId().
default org.osgi.service.http.HttpContext getHttpContext(org.osgi.framework.Bundle bundle)
Get actual context being registered. This version accepts Bundle argument to reflect
recommendations from Whiteboard Service specification, where
ServletContextHelper is suggested to be registered as
ServiceFactory.
bundle - boolean isShared()
Copyright © 2006–2024 OPS4J - Open Participation Software for Java. All rights reserved.