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

JAX_RS_SPEC-523: ClientBuilder can set ExecutorService and ScheduledExecutorService

From: Pavel Bucek <pavel.bucek_at_oracle.com>
Date: Mon, 10 Apr 2017 13:24:53 +0200

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