I used Jersey for most of the year and have just stumbled upon a problem that I cannot find the answer to: how do you intercept (or capture) the life cycle of a request for Jersey?
Ideally, I could do some custom filtering / validation / rejection between the time during which the container receives the request from the network and the time when my handler methods are called. Bonus points if there is an easy way to filter interceptors by subpath (for example, have one interceptor for something under /, another for something under / user /, etc.).
Thank!
Change To be a little clearer, the general idea here is to write code that will run for many API calls without having to explicitly call this code from each handler method. This will reduce additional code and eliminate the need to pass request contexts.
java api jersey jax-ws jax-rs
cww Dec 05 2018-10-12T00: 00Z
source share