Package org.ops4j.pax.web.service
Interface MultiBundleWebContainerContext
-
- All Superinterfaces:
org.osgi.service.http.HttpContext
,WebContainerContext
@Review("\"shared\" flag should be in WebContainerContext, new Whiteboard context (ServletContextHelper) shouldbe shared by default an this interface should be for \"pax-web shared contexts\".\"sharing\" in new Whiteboard is about allowing the contribution of web elements to cross-bundle webapp.\"sharing\" in PaxWeb Whiteboard is about accessing more bundles in search for resources.") public interface MultiBundleWebContainerContext extends WebContainerContext
WebContainerContext
that can be shared between different bundles. Users may obtain such context by name usingWebContainer.createDefaultSharedHttpContext(String)
and register different bundles for shared context access.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ops4j.pax.web.service.WebContainerContext
WebContainerContext.DefaultContextIds
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
deregisterBundle(org.osgi.framework.Bundle bundle)
Unrgister givenBundle
as a bundle using given shared context.default boolean
isShared()
Should this context (as defined in "102 Http Service" specification, not in "140 Whiteboard Service" specification) be allowed to be used by different bundles?boolean
registerBundle(org.osgi.framework.Bundle bundle)
Register givenBundle
as a bundle using given shared context.-
Methods inherited from interface org.osgi.service.http.HttpContext
getMimeType, getResource, handleSecurity
-
Methods inherited from interface org.ops4j.pax.web.service.WebContainerContext
finishSecurity, getBundle, getContextId, getRealPath, getResourcePaths
-
-
-
-
Method Detail
-
registerBundle
boolean registerBundle(org.osgi.framework.Bundle bundle)
Register givenBundle
as a bundle using given shared context.- Parameters:
bundle
-- Returns:
-
deregisterBundle
boolean deregisterBundle(org.osgi.framework.Bundle bundle)
Unrgister givenBundle
as a bundle using given shared context.- Parameters:
bundle
-- Returns:
-
isShared
default boolean isShared()
Description copied from interface:WebContainerContext
Should this context (as defined in "102 Http Service" specification, not in "140 Whiteboard Service" specification) be allowed to be used by different bundles?
In Whiteboard Service scenario (to wrap
ServletContextHelper
) the context should be shared by default and there's no real way to make a context not shared.In Http Service scenario, but default, a context is not shared. It means that if a web element is being registered through such context, but with different bundle, exception should be thrown.
- Specified by:
isShared
in interfaceWebContainerContext
- Returns:
-
-