users@jax-rs-spec.java.net

[jax-rs-spec users] Re: JAX_RS_SPEC-523: ClientBuilder can set ExecutorService and ScheduledExecutorService

From: Alessio Soldano <asoldano_at_redhat.com>
Date: Tue, 11 Apr 2017 18:14:03 +0200

Speaking of the javadoc, are the @see references at [1] and [2] correct ?

[1]
https://github.com/jax-rs/api/commit/cefcab15e097aa90484d832192fa5c7f2e42de8e#diff-8a8cfe7849b56b30a4878586901dfc52R257
[2]
https://github.com/jax-rs/api/commit/cefcab15e097aa90484d832192fa5c7f2e42de8e#diff-8a8cfe7849b56b30a4878586901dfc52R272

And besides that, am I right in assuming that an ExecutorService
instance provided as parameter to the getRxInvoker method in a
RxInvokerProvider instance would take precedence over the
executorService that's configured in the Client?

Thanks
Alessio

Il 10/04/2017 18:08, Markus KARG ha scritto:
> This is great, particularly the fact that the JavaDocs clearly mandate the use of the Java EE Managed Executor Service! :-)
> -Markus
>
> -----Original Message-----
> From: Pavel Bucek [mailto:pavel.bucek_at_oracle.com]
> Sent: Montag, 10. April 2017 13:25
> To: jsr370-experts_at_jax-rs-spec.java.net
> Subject: JAX_RS_SPEC-523: ClientBuilder can set ExecutorService and ScheduledExecutorService
>
> Dear experts,
>
> following change was merged to the master branch:
>
> https://github.com/jax-rs/api/commit/cefcab15e097aa90484d832192fa5c7f2e42de8e
>
> It adds ClientBuilder#executorService and ClientBuilder#scheduledExecutorService. Also, couple of methods on RxInvoker were removed, since we don't need to pass Executor service in that way, it should be retrieved from the client runtime.
>
> Simplest example would be:
>
> ExecutorService executorService = Executors.newCachedThreadPool(); ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(256);
>
> Client client =
> ClientBuilder.newBuilder()
> .executorService(executorService)
> .scheduledExecutorService(scheduledExecutorService)
> .build();
>
> feel free to share any comments or suggestions.
>
> Thanks and regards,
> Pavel
>
>