public class ExceptionClassifierSkipPolicy extends Object implements SkipPolicy
SkipPolicy
that depends on an exception classifier to make its
decision, and then delegates to the classifier result.SubclassClassifier
Constructor and Description |
---|
ExceptionClassifierSkipPolicy() |
Modifier and Type | Method and Description |
---|---|
void |
setExceptionClassifier(org.springframework.classify.SubclassClassifier<Throwable,SkipPolicy> classifier)
The classifier that will be used to choose a delegate policy.
|
void |
setPolicyMap(Map<Class<? extends Throwable>,SkipPolicy> policyMap)
Setter for policy map.
|
boolean |
shouldSkip(Throwable t,
int skipCount)
Consult the classifier and find a delegate policy, and then use that to
determine the outcome.
|
public void setExceptionClassifier(org.springframework.classify.SubclassClassifier<Throwable,SkipPolicy> classifier)
classifier
- the classifier to use to choose a delegate policypublic void setPolicyMap(Map<Class<? extends Throwable>,SkipPolicy> policyMap)
policyMap
- a map of String to SkipPolicy
that will be used
to create a Classifier
to locate a policy.public boolean shouldSkip(Throwable t, int skipCount) throws SkipLimitExceededException
shouldSkip
in interface SkipPolicy
t
- the throwable to considerskipCount
- the current skip countSkipLimitExceededException
- if a limit is exceededCopyright © 2014 Pivotal. All rights reserved.