Interface ProblemPostProcessor
- All Known Implementing Classes:
MdcPropertiesInjector,ProblemDefaultsProvider,ProblemLogger
public interface ProblemPostProcessor
Post-processors use, change or enhance HttpProblem created by ExceptionMappers via 'apply' method, before they get
passed on to serializers.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionapply(HttpProblem problem, ProblemContext context) Interceptor method for HttpProblems.default intpriority()Defines order in which processors are triggered.
-
Field Details
-
LOG_PRIORITY
static final int LOG_PRIORITY- See Also:
-
DEFAULT_ORDERING
-
-
Method Details
-
apply
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.
-