org.apache.struts.chain.commands
Class AbstractExceptionHandler

java.lang.Object
  extended by org.apache.struts.chain.commands.ActionCommandBase
      extended by org.apache.struts.chain.commands.AbstractExceptionHandler
All Implemented Interfaces:
org.apache.commons.chain.Command, ActionCommand
Direct Known Subclasses:
ExceptionHandler

public abstract class AbstractExceptionHandler
extends ActionCommandBase

Invoke the local or global exception handler configured for the exception class that occurred.

Version:
$Rev: 471754 $ $Date: 2005-11-12 13:01:44 -0500 (Sat, 12 Nov 2005) $

Field Summary
 
Fields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
 
Constructor Summary
AbstractExceptionHandler()
           
 
Method Summary
 boolean execute(ActionContext actionCtx)
          Invoke the appropriate Action for this request, and cache the returned ActionForward.
protected abstract  ForwardConfig handle(ActionContext context, java.lang.Exception exception, ExceptionConfig exceptionConfig, ActionConfig actionConfig, ModuleConfig moduleConfig)
          Perform the required handling of the specified exception.
 
Methods inherited from class org.apache.struts.chain.commands.ActionCommandBase
execute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractExceptionHandler

public AbstractExceptionHandler()
Method Detail

execute

public boolean execute(ActionContext actionCtx)
                throws java.lang.Exception

Invoke the appropriate Action for this request, and cache the returned ActionForward.

Specified by:
execute in interface ActionCommand
Specified by:
execute in class ActionCommandBase
Parameters:
actionCtx - The Context for the current request
Returns:
false if a ForwardConfig is returned, else true to complete processing
Throws:
java.lang.Exception - if thrown by the Action class and not declared by an Exception Handler

handle

protected abstract ForwardConfig handle(ActionContext context,
                                        java.lang.Exception exception,
                                        ExceptionConfig exceptionConfig,
                                        ActionConfig actionConfig,
                                        ModuleConfig moduleConfig)
                                 throws java.lang.Exception

Perform the required handling of the specified exception.

Parameters:
context - The Context for this request
exception - The exception being handled
exceptionConfig - The corresponding ExceptionConfig
actionConfig - The ActionConfig for this request
moduleConfig - The ModuleConfig for this request
Returns:
the ForwardConfig to be processed next (if any), or null if processing has been completed
Throws:
java.lang.Exception - if there are any problems handling the exception


Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.