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 contributedResourcesDescriptorin 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.Bundlebundleprotected ResourceResolverresolverprotected 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 StringgetMimeType(String name)URLgetResource(String name)booleanhandleSecurity(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)voidsetResources(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:
getMimeTypein interfaceorg.osgi.service.http.HttpContext
-
getResource
public URL getResource(String name)
- Specified by:
getResourcein interfaceorg.osgi.service.http.HttpContext
-
handleSecurity
public boolean handleSecurity(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException- Specified by:
handleSecurityin interfaceorg.osgi.service.http.HttpContext- Throws:
IOException
-
-