users@jax-rs-spec.java.net

[jax-rs-spec users] Re: SSE Draft

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Thu, 15 Oct 2015 12:05:44 +0100

Re a code line like this one:

https://github.com/mpotociar/api/blob/master/examples/src/main/java/jaxrs/examples/sse/ServerSentEventsResource.java#L112

output.write(sseContext.newEvent().name("domain-progress").data(String.class,
"50%").build());

why not:

output.write(sseContext.newEvent().name("domain-progress").data("50%").build());

and if needed

.data(new GenericEntity).

?

Thanks, Sergey

On 14/10/15 10:28, Sergey Beryozkin wrote:
>>
>> (3) SSE:
>>
>> https://github.com/mpotociar/api/tree/master/examples/src/main/java/jaxrs/examples/sse
>>
>>
>> Note that like in NIO, there are proposed extensions to both the
>> Client and Server APIs for SSE.
>>
>
> I think it is written in the spirit of JAX-RS - I'll have more
> comments in due time, but I'm positive after a quick glance
>
> Sergey