public class DefaultHttpContext extends Object implements org.osgi.service.http.HttpContext
A default HTTP context, which my be shared among bundles using
the static instance returned by getInstance()
.
The method getResource(String)
look up the resource under the
context class loader of the current thread under normative path
/OSGI-INF/webapp/
.
Modifier and Type | Field and Description |
---|---|
static String |
MIME_TYPES_PROPERTY
The system property to check for an alternative mime.types file to
parse instead of the built-in classpath resource.
|
Constructor and Description |
---|
DefaultHttpContext() |
Modifier and Type | Method and Description |
---|---|
static String |
getExtension(String mimeType) |
static Map<String,String> |
getExtensionMimeTypes() |
static org.osgi.service.http.HttpContext |
getInstance() |
String |
getMimeType(String name) |
URL |
getResource(String name) |
boolean |
handleSecurity(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
public static final String MIME_TYPES_PROPERTY
public static final org.osgi.service.http.HttpContext getInstance()
public static final Map<String,String> getExtensionMimeTypes()
getMimeType(String)
mapping extensions
to MIME types.public boolean handleSecurity(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
handleSecurity
in interface org.osgi.service.http.HttpContext
IOException
public URL getResource(String name)
getResource
in interface org.osgi.service.http.HttpContext
public String getMimeType(String name)
getMimeType
in interface org.osgi.service.http.HttpContext
Copyright © 2018 Clazzes.org. All rights reserved.