jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: properties, Invocation, Client, and Resource

From: Guilherme Silveira <guilherme.silveira_at_caelum.com.br>
Date: Tue, 7 Jun 2011 21:14:59 -0300

Makes total sense.

Guilherme Silveira

On 07/06/2011 7:51 PM, "Bill Burke" <bburke_at_redhat.com> wrote:

One thing I've found a need for is for interceptors to be able to access
properties set on the Client and/or WebResource instance. For example a
digital signature interceptor would want access to the private key to sign a
request with. A private key might be set for each request, or might be set
as a default property on the Client (or WebResource).

The way I've done it within Resteasy is that each Invocation/ClientRequest's
property map is a copy of the Client's property map. Then, the interceptor
only has to access the Invocation's property map and will either get
something specific to the request, or defaulted at the Client level.

Get what I'm saying? Or is my explanation horrible?


-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com