ch.elca.el4j.services.exceptionhandler.handler
Class SimpleExceptionTransformerExceptionHandler

java.lang.Object
  extended by ch.elca.el4j.services.exceptionhandler.handler.AbstractExceptionHandler
      extended by ch.elca.el4j.services.exceptionhandler.handler.AbstractExceptionTransformerExceptionHandler
          extended by ch.elca.el4j.services.exceptionhandler.handler.SimpleExceptionTransformerExceptionHandler
All Implemented Interfaces:
ExceptionHandler, InitializingBean

public class SimpleExceptionTransformerExceptionHandler
extends AbstractExceptionTransformerExceptionHandler
implements InitializingBean

This class transforms exceptions into other exceptions.

Author:
Andreas Bur (ABU)
File-location:
SimpleExceptionTransformerExceptionHandler
Last check-in date:
2009-08-04 15:35:01 +0200 (Di, 04. Aug 2009) by swismer for revision 3883

Constructor Summary
SimpleExceptionTransformerExceptionHandler()
           
 
Method Summary
 void afterPropertiesSet()
          
 void setTransformedExceptionClass(Class transformedClass)
          Sets the class into which an exception has to be transformed.
protected  Exception transform(Throwable t, org.slf4j.Logger logger)
          Transforms the given throwable into an appropriate exception.
 
Methods inherited from class ch.elca.el4j.services.exceptionhandler.handler.AbstractExceptionTransformerExceptionHandler
handleException
 
Methods inherited from class ch.elca.el4j.services.exceptionhandler.handler.AbstractExceptionHandler
getInvocationDescription, handleException, setUseDynamicLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleExceptionTransformerExceptionHandler

public SimpleExceptionTransformerExceptionHandler()
Method Detail

setTransformedExceptionClass

public void setTransformedExceptionClass(Class transformedClass)
Sets the class into which an exception has to be transformed.

Parameters:
transformedClass - The transformation's target class.

transform

protected Exception transform(Throwable t,
                              org.slf4j.Logger logger)
Transforms the given throwable into an appropriate exception.

Specified by:
transform in class AbstractExceptionTransformerExceptionHandler
Parameters:
t - The throwable to transform.
logger - The logger that is configured properly.
Returns:
Returns the transformed exception or null if no exceptions has to be thrown.

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception

Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception


Copyright © 2005-2011 ELCA. All Rights Reserved.