org.springframework.batch.support
Class SubclassExceptionClassifier
java.lang.Object
org.springframework.batch.support.ExceptionClassifierSupport
org.springframework.batch.support.SubclassExceptionClassifier
- All Implemented Interfaces:
- ExceptionClassifier
public class SubclassExceptionClassifier
- extends ExceptionClassifierSupport
- Author:
- Dave Syer
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SubclassExceptionClassifier
public SubclassExceptionClassifier()
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.