I need to implement a Jersey filter (ContainerRequestFilter) that needs to be called during pre-matching phase but only apply to some resources.
The pre-matching part can be done by annotating the class with the @PreMatching annotation and the "apply to some" functionality through Jersey's NameBinding mechanism.
What I would need it to combine the 2 features in 1 provider; now I'm pretty sure that this cannot be done since to me it seems contradictory (filter will be called before we can check if a given class is annotated) but still I want to be 100% sure of this since I would be skipping 1 step in the Jersey lifecycle and thus reducing the response time.
I'm using Jersey 2.6
Thanks