jsr372-experts@javaserverfaces-spec-public.java.net

[jsr372-experts] Re: [jsr372-experts mirror] Re: [JAVASERVERFACES-SPEC_PUBLIC-1396] f:socket for SSE and WebSocket PROPOSAL

From: Bauke Scholtz <balusc_at_gmail.com>
Date: Thu, 28 Jan 2016 10:34:46 +0100

Hi,

As I wasn't fully satisfied with push scoping, I have further improved
f:websocket to support new attribute scope="session" (next to the default
of scope="application"). This will make it possible to send the message
only to the views in the current HTTP session, without the need to manually
mess with channel name. To remember the current HTTP session during
actually sending the push message (at that moment, there's not necessarily
a HTTP request available), I had to rework PushContext and add a new
annotation, @Push. The usage is now like:

@Inject @Push
private PushContext channelName;

public void someAction() {
    channelName.send(someMessageObject);
}

Test cases will follow.

Cheers, B

On Fri, Jan 15, 2016 at 3:02 PM, manfred riem <manfred.riem_at_oracle.com>
wrote:

> Hi Bauke,
>
> On 1/14/16, 9:34 AM, Bauke Scholtz wrote:
>
>> I finished f:websocket, see patch in
>> https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1396
>>
> Cool!
>
> No unit tests have been added, this will come later. Existing unit tests
>> run without trouble.
>>
>> I will commit next week in case no one objects.
>>
> Please make sure when you commit the unit tests are included.
>
>
> Thanks!
>
> Kind regards,
> Manfred Riem
>
>