public class StaticContentHandler extends ResourceHandler
Modifier and Type | Field and Description |
---|---|
static int |
SERVER_DELAY |
Constructor and Description |
---|
StaticContentHandler(String debugURL,
boolean proxyInjectionMode) |
Modifier and Type | Method and Description |
---|---|
void |
addStaticContent(ResourceLocator locator) |
protected void |
callSuperHandle(String pathInContext,
String pathParams,
HttpRequest httpRequest,
HttpResponse httpResponse) |
protected Resource |
getResource(String pathInContext)
get Resource to serve.
|
static boolean |
getSlowResources() |
void |
handle(String pathInContext,
String pathParams,
HttpRequest httpRequest,
HttpResponse httpResponse)
Handle a request.
|
void |
sendData(HttpRequest request,
HttpResponse response,
String pathInContext,
Resource resource,
boolean writeHeaders) |
static void |
setSlowResources(boolean slowResources) |
getAllowedMethods, getAllowedString, getMinGzipLength, getRedirectWelcome, handleGet, isAcceptRanges, isDirAllowed, isMethodAllowed, setAcceptRanges, setAllowedMethods, setDirAllowed, setMinGzipLength, setRedirectWelcome, start, stop, writeHeaders
getHttpContext, getName, handleTrace, initialize, isStarted, setName, toString
public static final int SERVER_DELAY
public StaticContentHandler(String debugURL, boolean proxyInjectionMode)
public void handle(String pathInContext, String pathParams, HttpRequest httpRequest, HttpResponse httpResponse) throws IOException
HttpHandler
handle
in interface HttpHandler
handle
in class ResourceHandler
pathInContext
- The context pathpathParams
- Path parameters such as encoded Session IDhttpRequest
- The HttpRequest requesthttpResponse
- The HttpResponse responseIOException
protected void callSuperHandle(String pathInContext, String pathParams, HttpRequest httpRequest, HttpResponse httpResponse) throws IOException
IOException
protected Resource getResource(String pathInContext) throws IOException
ResourceHandler
getResource
in class ResourceHandler
pathInContext
- The path to find a resource for.IOException
public void addStaticContent(ResourceLocator locator)
public void sendData(HttpRequest request, HttpResponse response, String pathInContext, Resource resource, boolean writeHeaders) throws IOException
sendData
in class ResourceHandler
IOException
public static void setSlowResources(boolean slowResources)
public static boolean getSlowResources()
Copyright © 2013. All rights reserved.