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
    Modifier
    Constructor
    Description
    protected
    WrappingHttpContext(org.osgi.framework.Bundle bundle)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract org.osgi.service.servlet.context.ServletContextHelper
    wrap(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.