users@jax-rs-spec.java.net

[jax-rs-spec users] Proposal for RX API Improvement

From: Markus KARG <markus_at_headcrashing.eu>
Date: Fri, 20 Jan 2017 19:12:32 +0100

Experts,

 

the proposed RX API allows to explicitly provide an Executor.

 

I assume that typical applications will only use one or two Executors, and
typically a Java EE application will always use the Default Managed Executor
Service of the container.

 

So maybe it would be a good idea if we can get rid of repeating the Executor
again and again for each invocation, and provide an optional way to set a
"Default Executor" directly with the Client instance?

 

final Client client = ClientBuilder.newClient(MY_IO_BOUND_EXECUTOR); //
overriding implicit default executor

final CompletableFuture<String> getA = client.target("some uri
A").request().get(); // using MY_IO_BOUND_EXECUTOR

 

What do you think?

-Markus