Interface ProblemPostProcessor
-
public interface ProblemPostProcessorPost-processors use, change or enhance HttpProblem created by ExceptionMappers via 'apply' method, before they get passed on to serializers.
-
-
Field Summary
Fields Modifier and Type Field Description static Comparator<ProblemPostProcessor>DEFAULT_ORDERING
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description HttpProblemapply(HttpProblem problem, ProblemContext context)Interceptor method for HttpProblems.default intpriority()Defines order in which processors are triggered.
-
-
-
Field Detail
-
DEFAULT_ORDERING
static final Comparator<ProblemPostProcessor> DEFAULT_ORDERING
-
-
Method Detail
-
apply
HttpProblem apply(HttpProblem problem, ProblemContext context)
Interceptor method for HttpProblems. In case problem should be changed or enhanced, one can use 'HttpProblem.builder(httpProblem)'.Implementations should be thread-safe.
- Parameters:
problem- Original HttpProblem, possibly processed by other processors with higher priority.context- Additional, internal metadata not included in HttpProblem- Returns:
- Can be original HttpProblem (for peek-type processors), changed copy or completely new HttpProblem (for map-type processors.
-
priority
default int priority()
Defines order in which processors are triggered. Bigger value means precedence before processors with lower priority. When two processors have the same priority then order of invocation is undefined.
-
-