org.glassfish.osgihttp
Class DefaultHttpContext
java.lang.Object
org.glassfish.osgihttp.DefaultHttpContext
- All Implemented Interfaces:
- org.osgi.service.http.HttpContext
public class DefaultHttpContext
- extends Object
- implements org.osgi.service.http.HttpContext
Default implementation of HttpContext.
As per the spec (OSGi R4 Compendium, section #102.4):
1. the default implementation of getResource() must map the resource request
to the Bundle.getResource(String).
2. the getMime(String) implementation of the default HttpContext object
should return a reasonable mapping.
3. Its handleSecurity(HttpServlet Request,HttpServletResponse)
may implement an authentication mecha-nism that is implementation-dependent.
org.osgi.service.http.HttpService#createDefaultHttpContext()
- Author:
- Sanjeeb.Sahoo@Sun.COM
| Fields inherited from interface org.osgi.service.http.HttpContext |
AUTHENTICATION_TYPE, AUTHORIZATION, REMOTE_USER |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultHttpContext
public DefaultHttpContext(org.osgi.framework.Bundle registeringBundle)
handleSecurity
public boolean handleSecurity(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
throws IOException
- Specified by:
handleSecurity in interface org.osgi.service.http.HttpContext
- Throws:
IOException
getResource
public URL getResource(String s)
- Specified by:
getResource in interface org.osgi.service.http.HttpContext
- Parameters:
s -
- Returns:
- URL
getMimeType
public String getMimeType(String s)
- Specified by:
getMimeType in interface org.osgi.service.http.HttpContext
Copyright © 2012 GlassFish Community. All Rights Reserved.