Class BundleHttpContext

java.lang.Object
org.nuxeo.ecm.webengine.jaxrs.servlet.config.BundleHttpContext
All Implemented Interfaces:
org.osgi.service.http.HttpContext

public class BundleHttpContext extends Object implements org.osgi.service.http.HttpContext
A HttpContext that delegates resource lookup to contributed ResourcesDescriptor in the inverse order of the contribution (preserving the ordering imposed by extension mechanism)

A BundleHttpContext is created for every declated servlet when it is registered against to HttpService. The context is removed when the servlet is unregistered.

Author:
Bogdan Stefanescu
  • Field Details

  • Constructor Details

    • BundleHttpContext

      public BundleHttpContext(org.osgi.framework.Bundle bundle, String resourcesPath)
  • Method Details

    • setResources

      public void setResources(ResourcesDescriptor[] resources)
    • getMimeType

      public String getMimeType(String name)
      Specified by:
      getMimeType in interface org.osgi.service.http.HttpContext
    • getResource

      public URL getResource(String name)
      Specified by:
      getResource in interface org.osgi.service.http.HttpContext
    • handleSecurity

      public boolean handleSecurity(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
      Specified by:
      handleSecurity in interface org.osgi.service.http.HttpContext
      Throws:
      IOException