public final class HttpContextFactory

This factory is responsible for creating org.osgi.service.http.HttpContext decorator objects for bundles. If dynamic resource loading is set for a given bundle, meaning the ENVIRONMENT variable is set to DEVELOPMENT and variable with an underscored version of the bundle symbolic name is defined, an instance of FileSystemAwareUIHttpContext will be created for the bundle. In other cases the provided contex is unchaged.



public static HttpContext getHttpContext(HttpContext httpContext, Bundle bundle)

Decorates the given HttpContext with a @{link FileSystemAwareUIHttpContext} if dynamic resource loading is set up.

  • httpContext – the default http context for a given bundle
  • bundle – the bundle for which this http context will be registered

the decorated instance of the provided context if dynamic loading was set up, the original instance otherwise