|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mortbay.http.handler.AbstractHttpHandler
ccs.http.AbstractXhtmlHandler
ccs.http.ThrowingHandler
public abstract class ThrowingHandler
A superclass for HttpHandlers which, in conjunction with ExceptionHandler, provides an communal exception-handling framework for Jetty-based HTTP servers. Note, off-topic but this seems the most effective place to put it - both HttpRequest and HttpResponse offer "fields" (header lines in the HTTP request / response, "parameters" (obtained by parsing any query string) and "attributes". This last allows you to add your own data to the request / response as they travel down the handler chain. It is used by the rest of the system in various places; to avoid clashes, make all your names Strings, and prefix them with your package name. This is a good way for your up-chain handlers to talk to their down-chain compadres.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ccs.http.AbstractXhtmlHandler |
---|
AbstractXhtmlHandler.XHMode |
Field Summary | |
---|---|
protected static java.lang.ThreadLocal<HDate> |
hdate
An HDate for parsing dates within the HTTP protocol; eg. for cache checking. |
Fields inherited from class ccs.http.AbstractXhtmlHandler |
---|
isEnabled, mrp |
Constructor Summary | |
---|---|
ThrowingHandler(MimeRegProvider mrp)
Construct a ThrowingHandler. |
Method Summary | |
---|---|
void |
handle(java.lang.String subpath,
java.lang.String pathParams,
org.mortbay.http.HttpRequest ha,
org.mortbay.http.HttpResponse hq)
|
protected void |
handleGet(java.lang.String subpath,
java.lang.String pathParams,
org.mortbay.http.HttpRequest ha,
org.mortbay.http.HttpResponse hq)
Handle GET requests. |
protected void |
handleHead(java.lang.String subpath,
java.lang.String pathParams,
org.mortbay.http.HttpRequest ha,
org.mortbay.http.HttpResponse hq)
Handle HEAD requests. |
protected void |
handleOptions(java.lang.String subpath,
java.lang.String pathParams,
org.mortbay.http.HttpRequest ha,
org.mortbay.http.HttpResponse hq)
Handle OPTIONS requests. |
protected void |
handlePost(java.lang.String subpath,
java.lang.String pathParams,
org.mortbay.http.HttpRequest ha,
org.mortbay.http.HttpResponse hq)
Handle POST requests. |
protected void |
handlePut(java.lang.String subpath,
java.lang.String pathParams,
org.mortbay.http.HttpRequest ha,
org.mortbay.http.HttpResponse hq)
Handle PUT requests. |
Methods inherited from class ccs.http.AbstractXhtmlHandler |
---|
getDefaultXHMode, isXhtmlUA, makeUncacheable, sendBuffer, sendCDBFile, sendStream, setXHMode |
Methods inherited from class org.mortbay.http.handler.AbstractHttpHandler |
---|
getHttpContext, getName, handleTrace, initialize, isStarted, setName, start, stop, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static java.lang.ThreadLocal<HDate> hdate
Constructor Detail |
---|
public ThrowingHandler(MimeRegProvider mrp)
mrp
- provides the MimeRegistry to be used by sendBuffer
to determine the correct MIME type of buffers which don't specify their own
MIME type. If null, a default provider will be used.Method Detail |
---|
public final void handle(java.lang.String subpath, java.lang.String pathParams, org.mortbay.http.HttpRequest ha, org.mortbay.http.HttpResponse hq) throws org.mortbay.http.HttpException, java.io.IOException
org.mortbay.http.HttpException
java.io.IOException
protected void handleHead(java.lang.String subpath, java.lang.String pathParams, org.mortbay.http.HttpRequest ha, org.mortbay.http.HttpResponse hq) throws java.lang.Exception
handleGet
.
subpath
- The path, less the appID (context) prefix.pathParams
- Parameters appended to the path. Usually null.ha
- The request.hq
- The response.
java.lang.Exception
protected void handleGet(java.lang.String subpath, java.lang.String pathParams, org.mortbay.http.HttpRequest ha, org.mortbay.http.HttpResponse hq) throws java.lang.Exception
subpath
- The path, less the appID (context) prefix.pathParams
- Parameters appended to the path. Usually null.ha
- The request.hq
- The response.
java.lang.Exception
protected void handlePost(java.lang.String subpath, java.lang.String pathParams, org.mortbay.http.HttpRequest ha, org.mortbay.http.HttpResponse hq) throws java.lang.Exception
subpath
- The path, less the appID (context) prefix.pathParams
- Parameters appended to the path. Usually null.ha
- The request.hq
- The response.
java.lang.Exception
protected void handleOptions(java.lang.String subpath, java.lang.String pathParams, org.mortbay.http.HttpRequest ha, org.mortbay.http.HttpResponse hq) throws java.lang.Exception
subpath
- The path, less the appID (context) prefix.pathParams
- Parameters appended to the path. Usually null.ha
- The request.hq
- The response.
java.lang.Exception
protected void handlePut(java.lang.String subpath, java.lang.String pathParams, org.mortbay.http.HttpRequest ha, org.mortbay.http.HttpResponse hq) throws java.lang.Exception
subpath
- The path, less the appID (context) prefix.pathParams
- Parameters appended to the path. Usually null.ha
- The request.hq
- The response.
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |