Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.webengine.jaxrs.servlet.config
Class BundleHttpContext

java.lang.Object
  extended by 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 Summary
 
Fields inherited from interface org.osgi.service.http.HttpContext
AUTHENTICATION_TYPE, AUTHORIZATION, REMOTE_USER
 
Constructor Summary
BundleHttpContext(org.osgi.framework.Bundle bundle, String resourcesPath)
           
 
Method Summary
 String getMimeType(String name)
           
 URL getResource(String name)
           
 boolean handleSecurity(HttpServletRequest request, HttpServletResponse response)
           
 void setResources(ResourcesDescriptor[] resources)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 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

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.