org.nuxeo.ecm.webengine.jaxrs.servlet.config
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
Fields inherited from interface org.osgi.service.http.HttpContext |
AUTHENTICATION_TYPE, AUTHORIZATION, REMOTE_USER |
BundleHttpContext
public BundleHttpContext(org.osgi.framework.Bundle bundle,
String resourcesPath)
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(HttpServletRequest request,
HttpServletResponse response)
throws IOException
- Specified by:
handleSecurity
in interface org.osgi.service.http.HttpContext
- Throws:
IOException
Copyright © 2011 Nuxeo SAS. All Rights Reserved.