While filters are mainly designed to manipulate request and response parameters, such as HTTP headers, URIs and / or HTTP methods, interceptors are designed to control objects by controlling the input / output streams of the object.
A ReaderInterceptor allows you to manipulate incoming streams of entities, that is, streams coming from wires. Using Jackson to analyze the flow of an incoming entity, your interceptor might look like this:
@Provider public class CustomReaderInterceptor implements ReaderInterceptor {
This answer and this answer may also be related to your question.
source share