ch.elca.el4j.services.exceptionhandler
Class ClassExceptionConfiguration

java.lang.Object
  extended by ch.elca.el4j.services.exceptionhandler.ClassExceptionConfiguration
All Implemented Interfaces:
ExceptionConfiguration, InitializingBean
Direct Known Subclasses:
MethodNameExceptionConfiguration

public class ClassExceptionConfiguration
extends Object
implements ExceptionConfiguration, InitializingBean

This class configures an exception handler. It maps exception types to exception handlers.

Author:
Andreas Bur (ABU)
File-location:
ClassExceptionConfiguration
Last check-in date:
2009-08-04 13:59:45 +0200 (Di, 04. Aug 2009) by swismer for revision 3873

Constructor Summary
ClassExceptionConfiguration()
           
 
Method Summary
 void afterPropertiesSet()
          
 ExceptionHandler getExceptionHandler()
          
 Class[] getExceptionTypes()
           
 boolean handlesExceptions(Throwable t, org.aopalliance.intercept.MethodInvocation invocation)
          Requests whether this exception configuration is able to handle the given exception that was thrown in the given method invocation.
 void setExceptionHandler(ExceptionHandler exceptionHandler)
          Sets the exception handler.
 void setExceptionTypes(Class[] exceptionTypes)
          Sets the exception types which the hander is responsible for.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassExceptionConfiguration

public ClassExceptionConfiguration()
Method Detail

getExceptionTypes

public Class[] getExceptionTypes()
Returns:
Returns the exception types which the handler is responsible for.

setExceptionTypes

public void setExceptionTypes(Class[] exceptionTypes)
Sets the exception types which the hander is responsible for.

Parameters:
exceptionTypes - The exception types to set.

getExceptionHandler

public ExceptionHandler getExceptionHandler()

Specified by:
getExceptionHandler in interface ExceptionConfiguration
Returns:
Returns the exception handler.

setExceptionHandler

public void setExceptionHandler(ExceptionHandler exceptionHandler)
Sets the exception handler.

Parameters:
exceptionHandler - The exception handler to set.

handlesExceptions

public boolean handlesExceptions(Throwable t,
                                 org.aopalliance.intercept.MethodInvocation invocation)
Requests whether this exception configuration is able to handle the given exception that was thrown in the given method invocation.

Specified by:
handlesExceptions in interface ExceptionConfiguration
Parameters:
t - The exception to handle.
invocation - The invocation in which the exception was thrown.
Returns:
Returns true if this exception configuratin is able to handle the exception, false otherwise.

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception

Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception


Copyright © 2005-2011 ELCA. All Rights Reserved.