|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.grizzly.http.servlet.ServletContextImpl
com.sun.grizzly.osgi.httpservice.OSGiServletContext
public class OSGiServletContext
OSGi ServletContextImpl
integration.
Constructor Summary | |
---|---|
OSGiServletContext(org.osgi.service.http.HttpContext httpContext,
Logger logger)
Default constructor. |
Method Summary | |
---|---|
String |
getMimeType(String file)
OSGi integration. |
URL |
getResource(String path)
OSGi integration. |
InputStream |
getResourceAsStream(String path)
OSGi integration. |
Methods inherited from class com.sun.grizzly.http.servlet.ServletContextImpl |
---|
destroyListeners, getAttribute, getAttributeNames, getBasePath, getContext, getContextPath, getInitParameter, getInitParameterNames, getListeners, getMajorVersion, getMinorVersion, getNamedDispatcher, getRealPath, getRequestDispatcher, getResourcePaths, getServerInfo, getServlet, getServletContextName, getServletNames, getServlets, initListeners, log, log, log, normalize, removeAttribute, setAttribute, setBasePath, setContextPath, setDisplayName, setInitParameter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OSGiServletContext(org.osgi.service.http.HttpContext httpContext, Logger logger)
httpContext
- HttpContext
to provide integration with OSGi.logger
- Logger util.Method Detail |
---|
public URL getResource(String path) throws MalformedURLException
HttpContext.getResource(String)
.
Return the URL to the resource that is mapped to a specified path.
The path must begin with a "/" and is interpreted as relative to the
current context root.
getResource
in interface ServletContext
getResource
in class ServletContextImpl
path
- The path to the desired resource
MalformedURLException
- if the path is not given
in the correct formpublic InputStream getResourceAsStream(String path)
HttpContext.getResource(String)
.
Return the requested resource as an InputStream
. The
path must be specified according to the rules described under
getResource
. If no such resource can be identified,
return null
.
getResourceAsStream
in interface ServletContext
getResourceAsStream
in class ServletContextImpl
path
- The path to the desired resource.public String getMimeType(String file)
HttpContext.getMimeType(String)
.
Return the MIME type of the specified file, or null
if
the MIME type cannot be determined.
getMimeType
in interface ServletContext
getMimeType
in class ServletContextImpl
file
- Filename for which to identify a MIME type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |