[jax-rs-spec users] Re: Suggestion to refactor rx invoker API

From: Pavel Bucek <>
Date: Mon, 16 Jan 2017 12:02:28 +0100

>> .rx(CompletionStage.class)
>> will work with whatever library the users will choose, from Jersey,
>> some 3rd party library, etc
> Mine issue with this is that you usually dont want to do
> rx(CompletionStage.class). You most likely want
> rx(CompletionStage<List<String>>.class), which is not valid Java
> syntax. And I must admit I don't like GenericType and I'll be always
> trying to find an alternative which won't force that.

this is most likely not correct, since rx(Class<T>) doesn't return T but
RxInvoker<T> and then that shouldn't be an issue. (since RxInvoker does
have get(Class<R>) and it would be defined to return T<R> I guess.

Anyway, there is one issue. In mine proposal, rx(..) returns T ? extends
RxInvoker, which allows invoker specific methods. Not saying it is a big
deal and I don't really think that it will be widely used, but it is a