org.objectledge.pipeline
Class ErrorHandlingPipeline
java.lang.Object
org.objectledge.pipeline.ErrorHandlingPipeline
- All Implemented Interfaces:
- Valve
public class ErrorHandlingPipeline
- extends Object
- implements Valve
A Pipeline composed of three sequences of Valves that provides
error handling along the lines of Java try/catch/finally rules.
The pipeline is constructed from three subpipelines
(arrays of Valve objects). The subpiplines serve three
functions:
- The try pipeline is used for normal execution of processing.
- The catch pipline is executed in case of an uncatched exception thrown in the
try pipeline. It is basically used to handle problems which may occure in normal
processing. An example problem to be handled, is the discovery of an unathorized access to the
webapplication. In this case the catch pipeline should redirect the user to a view
containing the description of the problem and a login form.
- The finally pipeline is executed always. It is used to execute cleanup actions after
both successfull execution of the
try pipeline and the errorneous execution of the
try pipeline which triggered the catch pipeline.
- Version:
- $Id: ErrorHandlingPipeline.java,v 1.5 2005/07/22 17:19:44 pablo Exp $
- Author:
- rafal@caltha.pl
|
Constructor Summary |
ErrorHandlingPipeline(org.jcontainer.dna.Logger logger,
Valve[] tryValves,
Valve[] catchValves,
Valve[] finallyValves)
Constructs a new instance of the pipeline. |
|
Method Summary |
void |
process(Context context)
Runs the connected valves. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PIPELINE_EXCEPTION
public static final String PIPELINE_EXCEPTION
- key to store the exception in the context.
- See Also:
- Constant Field Values
logger
private org.jcontainer.dna.Logger logger
tryValves
private Valve[] tryValves
catchValves
private Valve[] catchValves
finallyValves
private Valve[] finallyValves
ErrorHandlingPipeline
public ErrorHandlingPipeline(org.jcontainer.dna.Logger logger,
Valve[] tryValves,
Valve[] catchValves,
Valve[] finallyValves)
- Constructs a new instance of the pipeline.
- Parameters:
logger - the logger.tryValves - the valves to be used in the try stage.catchValves - the valves to be used in the catch stage.finallyValves - the valves to be used in the finaly stage.
process
public void process(Context context)
- Runs the connected valves.
- Specified by:
process in interface Valve
- Parameters:
context - the context.
Copyright © 2003-2006 objectledge.org. All Rights Reserved.