ch.elca.el4j.services.exceptionhandler
Class MethodNameExceptionConfiguration

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

public class MethodNameExceptionConfiguration
extends ClassExceptionConfiguration

This exception configuration uses the exception class as well as the invoked method's name to specify the exception handler.

Author:
Andreas Bur (ABU)
File-location:
MethodNameExceptionConfiguration
Last check-in date:
2009-08-04 15:22:05 +0200 (Di, 04. Aug 2009) by swismer for revision 3881

Constructor Summary
MethodNameExceptionConfiguration()
           
 
Method Summary
 void afterPropertiesSet()
          
 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 setMethodNames(String[] methodNames)
          Sets the method names which this exception configuration is responsible for.
 
Methods inherited from class ch.elca.el4j.services.exceptionhandler.ClassExceptionConfiguration
getExceptionHandler, getExceptionTypes, setExceptionHandler, setExceptionTypes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodNameExceptionConfiguration

public MethodNameExceptionConfiguration()
Method Detail

setMethodNames

public void setMethodNames(String[] methodNames)
Sets the method names which this exception configuration is responsible for.

Parameters:
methodNames - The method names 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
Overrides:
handlesExceptions in class ClassExceptionConfiguration
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
Overrides:
afterPropertiesSet in class ClassExceptionConfiguration
Throws:
Exception


Copyright © 2005-2011 ELCA. All Rights Reserved.