Package org.openhab.core.io.http
Class WrappingHttpContext
java.lang.Object
org.osgi.service.servlet.context.ServletContextHelper
org.openhab.core.io.http.WrappingHttpContext
public abstract class WrappingHttpContext
extends org.osgi.service.servlet.context.ServletContextHelper
Extension of
ServletContextHelper which allows creation of "sub contexts".
These sub contexts are nothing else but custom resource locators which provide new files to host, but should not
influence overall processing logic of
ServletContextHelper.handleSecurity(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse) and
ServletContextHelper.getMimeType(String).- Author:
- Ćukasz Dywicki - Initial contribution
-
Field Summary
Fields inherited from class org.osgi.service.servlet.context.ServletContextHelper
AUTHENTICATION_TYPE, AUTHORIZATION, REMOTE_USER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract org.osgi.service.servlet.context.ServletContextHelperwrap(org.osgi.framework.Bundle bundle) Creates new http context which hosts resources from given bundle.Methods inherited from class org.osgi.service.servlet.context.ServletContextHelper
finishSecurity, getMimeType, getRealPath, getResource, getResourcePaths, handleSecurity
-
Constructor Details
-
WrappingHttpContext
protected WrappingHttpContext(org.osgi.framework.Bundle bundle)
-
-
Method Details
-
wrap
public abstract org.osgi.service.servlet.context.ServletContextHelper wrap(org.osgi.framework.Bundle bundle) Creates new http context which hosts resources from given bundle.- Parameters:
bundle- Bundle with resources.- Returns:
- New context instance.
-