org.springframework.batch.support
Class SubclassExceptionClassifier

java.lang.Object
  extended by org.springframework.batch.support.ExceptionClassifierSupport
      extended by org.springframework.batch.support.SubclassExceptionClassifier
All Implemented Interfaces:
ExceptionClassifier

public class SubclassExceptionClassifier
extends ExceptionClassifierSupport

Author:
Dave Syer

Field Summary
 
Fields inherited from class org.springframework.batch.support.ExceptionClassifierSupport
DEFAULT
 
Constructor Summary
SubclassExceptionClassifier()
           
 
Method Summary
 Object classify(Throwable throwable)
          Return the value from the type map whose key is the class of the given Throwable, or its nearest ancestor if a subclass.
 void setTypeMap(Map typeMap)
          Map of Throwable class types to keys for the classifier.
 
Methods inherited from class org.springframework.batch.support.ExceptionClassifierSupport
getDefault
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubclassExceptionClassifier

public SubclassExceptionClassifier()
Method Detail

setTypeMap

public final void setTypeMap(Map typeMap)
Map of Throwable class types to keys for the classifier. Any subclass of the type provided will be classified as of the type given by the corresponding map entry value.

Parameters:
typeMap - the typeMap to set

classify

public Object classify(Throwable throwable)
Return the value from the type map whose key is the class of the given Throwable, or its nearest ancestor if a subclass.

Specified by:
classify in interface ExceptionClassifier
Overrides:
classify in class ExceptionClassifierSupport
Parameters:
throwable - the input exception. Can be null.
Returns:
an object.
See Also:
ExceptionClassifierSupport.classify(java.lang.Throwable)


Copyright © 2009 SpringSource. All Rights Reserved.