Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jaxrs-dev] MP Rest Client

Sorry, I replied but chose the wrong sender.  resending with comments... :-)


On Thu, Apr 5, 2018 at 3:14 PM John D. Ament <johndament@xxxxxxxxxx> wrote:
A few comments in line.

On Thu, Apr 5, 2018 at 3:09 PM Santiago Pericas-Geertsen <santiago.pericasgeertsen@xxxxxxxxxx> wrote:
Andy,

 Inlined.

Some general thoughts:
* I would like to see the type-safe clients built out of ClientBuilder (rather than MP's RestClientBuilder) - we might need to "condense" the build method to include the base URI, but otherwise a client could be generated like:
     MyClient clientProxy = ClientBuilder.newBuilder().build(baseURI, MyClient.class);

 Yes, I think bootstrapping from ClientBuilder makes sense.


+1 as well, this was the original desire.
 


* ResponseExceptionMappers - I think this is a great value-add for rest clients - it adds to the type-safety since responses could be mapped to checked exceptions which might make more sense to app developers.

 These would be useful for existing non-proxy-based clients also, correct?

Yes, they should work for non-proxy clients as well.  I believe this works in the CXF impl already.
 


* CDI/MP Config support - This might be tricky, but is one of the nicest (IMO) features of MP Rest Client.  This allows users to simply inject a rest client, avoiding the builder altogether.  The trick is that it would require a dependency on CDI and MP Config (IIUC, the MP Config APIs are also getting moved to JakartaEE, so maybe this isn't a huge problem).  

 Perhaps this could be left for “phase 2”.

If the javax.config spec takes flight, JAX-RS could depend on it to support config.  
 


As for next steps, I could attempt to draft up a pull request that pulls in the MP Rest Client APIs into the javax.ws.rs.client.ClientBuilder class.  I probably won't have anything to review very soon though - aside from the porting work, I will also need to check on any IP issues.

 Sounds good, looking forward to it ;)

We need to talk about this.  Let me know if it makes sense to discuss on a call or something.  While I have licensed my work to Eclipse, it is under the Apache License.  I have not licensed this work (the MP Rest Client) under the terms of the EPLv2.
 

— Santiago

On Thu, Mar 29, 2018 at 2:46 PM, Santiago Pericas-Geertsen <santiago.pericasgeertsen@xxxxxxxxxx> wrote:
Hi Andy,

 I wanted to bring back the discussion about the MP Rest Client API and the potential alignment with JAX-RS. There’s an open issue for that [1]. 

 Given that some JAX-RS implementations already support this type of declarative API, it would make sense to consider this as an addition to the next JAX-RS spec, perhaps even the next version that we are calling 2.2. 

 What are your general thoughts about this? And what do you think the next steps should be?

— Santiago



_______________________________________________
jaxrs-dev mailing list
jaxrs-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jaxrs-dev


_______________________________________________
jaxrs-dev mailing list
jaxrs-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jaxrs-dev

_______________________________________________
jaxrs-dev mailing list
jaxrs-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jaxrs-dev

Back to the top