org.mortbay.http.handler
public class ResourceHandler extends AbstractHttpHandler
Version: $Id: ResourceHandler.java,v 1.66 2005/08/24 08:18:17 gregwilkins Exp $
Constructor Summary | |
---|---|
ResourceHandler() Construct a ResourceHandler. |
Method Summary | |
---|---|
String[] | getAllowedMethods() |
String | getAllowedString() |
int | getMinGzipLength() Get minimum content length for GZIP encoding. |
boolean | getRedirectWelcome() |
protected Resource | getResource(String pathInContext) get Resource to serve.
|
void | handle(String pathInContext, String pathParams, HttpRequest request, HttpResponse response) |
void | handleGet(HttpRequest request, HttpResponse response, String pathInContext, String pathParams, Resource resource) |
boolean | isAcceptRanges() |
boolean | isDirAllowed() |
boolean | isMethodAllowed(String method) |
void | sendData(HttpRequest request, HttpResponse response, String pathInContext, Resource resource, boolean writeHeaders) |
void | setAcceptRanges(boolean ar) Set if the handler accepts range requests.
|
void | setAllowedMethods(String[] methods) |
void | setDirAllowed(boolean dirAllowed) |
void | setMinGzipLength(int minGzipLength) Set minimum content length for GZIP encoding. |
void | setRedirectWelcome(boolean redirectWelcome) |
void | start() |
void | stop() |
void | writeHeaders(HttpResponse response, Resource resource, long count) |
Returns: Minimum length of content for gzip encoding or -1 if disabled.
Returns: True if welcome files are redirected to. False if forward is used.
Parameters: pathInContext The path to find a resource for.
Returns: The resource to serve.
Parameters: ar True if the handler should accept ranges
Parameters: minGzipLength If set to a positive integer, then static content larger than this will be served as gzip content encoded if a matching resource is found ending with ".gz"
Parameters: redirectWelcome True if welcome files are redirected to. False if forward is used.