title: Is there a way to "override" a jaxrs resource?
body: <p>I have to use a library which provides a jaxrs rest-api for some task. This api is a class implementing an jaxrs annotated interface. Now I have the requirement to build a &quot;wrapper&quot; around one of those endpoints, because some server side checks are required before the access to those resources.</p>
  <p>The only working way I found to accomplish this is to disallow the access to those resources completely, add a new resources at a new path and call the original resource via a server-side &quot;rest proxy&quot;. Is there any nicer way to do that? I hoped maybe there would be a way to &quot;override&quot; this resource somehow, but I could not find anything anywhere. I also read about sub-resource locators but this did not work since the locator seems to be ignored even at the root path, if there is a matching resource underneath annotated with the full path.</p>
  <p>I am using Resteasy.
  What is the best practice to accomplish this?</p>