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 contributedResourcesDescriptor
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 Summary
Fields Modifier and Type Field Description protected org.osgi.framework.Bundle
bundle
protected ResourceResolver
resolver
protected ResourcesDescriptor[]
resources
-
Constructor Summary
Constructors Constructor Description BundleHttpContext(org.osgi.framework.Bundle bundle, String resourcesPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getMimeType(String name)
URL
getResource(String name)
boolean
handleSecurity(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
void
setResources(ResourcesDescriptor[] resources)
-
-
-
Field Detail
-
bundle
protected org.osgi.framework.Bundle bundle
-
resolver
protected ResourceResolver resolver
-
resources
protected volatile ResourcesDescriptor[] resources
-
-
Constructor Detail
-
BundleHttpContext
public BundleHttpContext(org.osgi.framework.Bundle bundle, String resourcesPath)
-
-
Method Detail
-
setResources
public void setResources(ResourcesDescriptor[] resources)
-
getMimeType
public String getMimeType(String name)
- Specified by:
getMimeType
in interfaceorg.osgi.service.http.HttpContext
-
getResource
public URL getResource(String name)
- Specified by:
getResource
in interfaceorg.osgi.service.http.HttpContext
-
handleSecurity
public boolean handleSecurity(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
- Specified by:
handleSecurity
in interfaceorg.osgi.service.http.HttpContext
- Throws:
IOException
-
-