users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Questions about WebTarget

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Wed, 17 Jul 2013 12:31:19 +0100

Hi

I'd like to ask a couple of questions about WebTarget interface [1].

1. Methods matrixParam(), queryParam(), path(), all of resolveTemplate
methods create a new WebTarget instance, does a state of the current
WebTarget's URIBuilder gets affected or is it cloned first ?

2. Configuration inheritance (I guess it applies to the whole
ClientBuilder -> Client -> WebTarget chain).
Suppose I have WebTarget1 which creates a new WebTarget2. WebTarget1 has
a configuration property "target1". WebTarget2 gets a snapshot of the
WebTarget1's configuration, what happens when a property such as
"target1" gets removed on WebTarget2's Configuration - is it just
removed (no side-effect I guess for WebTarget1) or should it be
IllegalStateException ?

Thanks, Sergey

[1]
https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/client/WebTarget.html