Override Jersey 2 invocation behavior

87 views Asked by At

We have an existing implementation of software-level load balancing which we'd like to migrate to jersey 2. In Jersey 1, all we needed to do was to extend com.sun.jersey.api.client.Client and its handle() method. We've also implemented a builder which will return this subclass. Execution of any of the rest methods will automatically execute the overriden method.

Any recommendation where's the best place to do the same in Jersey 2? We're looking at ClientRuntime's invoke() or JerseyInvocation's invoke() but they seem not to be extensible.

0

There are 0 answers