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

Re: [jax-rs-spec users] Re: Server Sent Events feedback + EDR

From: Alessio Soldano <asoldano_at_redhat.com>
Date: Fri, 17 Feb 2017 22:41:28 +0100

Nice, thanks :-)

Il 17/02/2017 18:34, Pavel Bucek ha scritto:
> Hi Alessio,
>
> I added some examples for SseEventSource, some of them could be
> classified as "advanced usecase", for example
>
> https://github.com/jax-rs/api/blob/master/examples/src/main/java/jaxrs/examples/sse/SseClient.java#L121
>
> https://github.com/jax-rs/api/blob/master/examples/src/main/java/jaxrs/examples/sse/SseClient.java#L146
>
>
> Please let me know if this helps.
>
> Thanks and regards,
> Pavel
>
>
> On 15/02/2017 22:42, Alessio Soldano wrote:
>> Il 15/02/2017 19:52, Pavel Bucek ha scritto:
>>> Hi Alessio,
>>>
>>> the method in your question is just another variant of:
>>>
>>> http://download.java.net/java/jdk9/docs/api/java/util/concurrent/Flow.Publisher.html#subscribe-java.util.concurrent.Flow.Subscriber-
>>>
>>>
>>> The subscription is meant to work same as
>>> Subscriber#onSubscribe(Subscription). I wanted to say that when
>>> using this variant of subscribe method, there is a back-pressure
>>> support and the subscriber can control how many messages will be
>>> received. (as long as there is long enough buffer, depends on the
>>> inflow). It is NOT meant to influence other subscribers, only
>>> callbacks registered "together" in the single #subscribe(...)
>>> invocation.
>>>
>>> Does it make more sense?
>> mmh... I'll read examples / additional doc on this for sure ;-)
>> It would be nice to expand the current
>> https://github.com/jax-rs/api/tree/master/examples/src/main/java/jaxrs/examples/sse
>> area with more advanced scenarios like this.
>>
>>
>>>
>>> I plan to re-read the javadoc and make it more clear, this is
>>> obviously the first adept to improve.
>> Thanks
>>
>> Alessio
>