org.apache.beehive.netui.pageflow.internal
Class DefaultExceptionsHandler
Object
BaseHandler
DefaultHandler
DefaultExceptionsHandler
- All Implemented Interfaces:
- Serializable, ExceptionsHandler, Handler
public class DefaultExceptionsHandler
- extends DefaultHandler
- implements ExceptionsHandler
- See Also:
- Serialized Form
Method Summary |
boolean |
eatUnhandledException(FlowControllerHandlerContext context,
Throwable ex)
|
void |
exposeException(FlowControllerHandlerContext context,
Throwable ex,
ActionMapping actionMapping)
|
protected ExceptionConfig |
getExceptionConfig(Class exceptionType,
ModuleConfig moduleConfig)
|
protected Method |
getExceptionHandlerMethod(FlowControllerHandlerContext context,
String methodName,
Throwable ex,
Object formBean)
Get an Exception handler method. |
protected FlowController |
getFallbackFlowController(FlowController originalFlowController,
Class exClass,
ServletRequest request,
ServletResponse response,
ServletContext servletContext)
|
protected String |
getMessage(FlowControllerHandlerContext context,
String messageKey,
String bundle,
Object[] args)
|
ExceptionsHandler |
getRegisteredHandler()
|
ActionForward |
handleException(FlowControllerHandlerContext context,
Throwable ex,
ActionMapping actionMapping,
ActionForm form)
|
protected ActionForward |
invokeExceptionHandlerClass(FlowControllerHandlerContext context,
Throwable throwable,
ExceptionConfig exceptionConfig,
ActionMapping actionMapping,
ActionForm form)
|
protected ActionForward |
invokeExceptionHandlerMethod(FlowControllerHandlerContext context,
Throwable ex,
PageFlowExceptionConfig exceptionConfig,
ActionForm form,
ActionMapping actionMapping)
|
void |
reinit(ServletContext servletContext)
Reinitialize, normally used to reconsitute transient data that was lost during serialization. |
protected static void |
storeException(HttpServletRequest request,
String key,
ActionMessage error,
String scope)
|
Throwable |
unwrapException(FlowControllerHandlerContext context,
Throwable ex)
|
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultExceptionsHandler
public DefaultExceptionsHandler(ServletContext servletContext)
reinit
public void reinit(ServletContext servletContext)
- Description copied from interface:
Handler
- Reinitialize, normally used to reconsitute transient data that was lost during serialization.
- Specified by:
reinit
in interface Handler
- Overrides:
reinit
in class BaseHandler
- Parameters:
servletContext
- the ServletContext for the webapp that is reinitializing this object.
handleException
public ActionForward handleException(FlowControllerHandlerContext context,
Throwable ex,
ActionMapping actionMapping,
ActionForm form)
throws IOException,
ServletException
- Specified by:
handleException
in interface ExceptionsHandler
- Throws:
IOException
ServletException
unwrapException
public Throwable unwrapException(FlowControllerHandlerContext context,
Throwable ex)
- Specified by:
unwrapException
in interface ExceptionsHandler
exposeException
public void exposeException(FlowControllerHandlerContext context,
Throwable ex,
ActionMapping actionMapping)
- Specified by:
exposeException
in interface ExceptionsHandler
getExceptionConfig
protected ExceptionConfig getExceptionConfig(Class exceptionType,
ModuleConfig moduleConfig)
getFallbackFlowController
protected FlowController getFallbackFlowController(FlowController originalFlowController,
Class exClass,
ServletRequest request,
ServletResponse response,
ServletContext servletContext)
invokeExceptionHandlerClass
protected ActionForward invokeExceptionHandlerClass(FlowControllerHandlerContext context,
Throwable throwable,
ExceptionConfig exceptionConfig,
ActionMapping actionMapping,
ActionForm form)
throws IOException,
ServletException
- Throws:
IOException
ServletException
invokeExceptionHandlerMethod
protected ActionForward invokeExceptionHandlerMethod(FlowControllerHandlerContext context,
Throwable ex,
PageFlowExceptionConfig exceptionConfig,
ActionForm form,
ActionMapping actionMapping)
throws IOException,
ServletException
- Throws:
IOException
ServletException
storeException
protected static void storeException(HttpServletRequest request,
String key,
ActionMessage error,
String scope)
getMessage
protected String getMessage(FlowControllerHandlerContext context,
String messageKey,
String bundle,
Object[] args)
eatUnhandledException
public boolean eatUnhandledException(FlowControllerHandlerContext context,
Throwable ex)
- Specified by:
eatUnhandledException
in interface ExceptionsHandler
getExceptionHandlerMethod
protected Method getExceptionHandlerMethod(FlowControllerHandlerContext context,
String methodName,
Throwable ex,
Object formBean)
- Get an Exception handler method.
- Parameters:
methodName
- the name of the method to get.ex
- the Exception that is to be handled.
- Returns:
- the Method with the given name that handles the given Exception, or
null
if none matches.
getRegisteredHandler
public ExceptionsHandler getRegisteredHandler()
- Overrides:
getRegisteredHandler
in class DefaultHandler