juju.reattore.server.intercept.impl
Class ErrorInterceptor

java.lang.Object
  |
  +--juju.reattore.server.intercept.impl.ErrorInterceptor
All Implemented Interfaces:
Interceptor

public class ErrorInterceptor
extends java.lang.Object
implements Interceptor

Interceptor that serves an error document if the main path can't find anything. The main path will be given the first chance to handle the request. If the main path cannot then the error path is given a chance.


Constructor Summary
ErrorInterceptor()
           
 
Method Summary
 void addChild(Interceptor child)
          Accessor to help Digester configuration.
 boolean process(HttpRequest req, HttpResponse resp)
          Process an incoming HTTP request if possible, filling in the given response as it goes.
 void setErrorPath(Interceptor path)
          Sets the root of the error path to go through.
 void setMainPath(Interceptor path)
          Sets the root of the main path to go through.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorInterceptor

public ErrorInterceptor()
Method Detail

addChild

public void addChild(Interceptor child)
Accessor to help Digester configuration. First sets the main path, then the error path.

Parameters:
child - Path to use.

setMainPath

public void setMainPath(Interceptor path)
Sets the root of the main path to go through.

Parameters:
path - The root of the main path.

setErrorPath

public void setErrorPath(Interceptor path)
Sets the root of the error path to go through.

Parameters:
path - The root of the main path.

process

public boolean process(HttpRequest req,
                       HttpResponse resp)
Description copied from interface: Interceptor
Process an incoming HTTP request if possible, filling in the given response as it goes. An interceptor may have side effects without actually performing the main processing and may pass it on to another interceptor. A authentication interceptor is a good example.

Specified by:
process in interface Interceptor
Parameters:
req - HTTP request to process
resp - Response to fill in
Returns:
true if the request was recognised and processed.
See Also:
Interceptor


Copyright © 2002-2003 Michael Hope. All Rights Reserved.