I'm going to try out the Primefaces Push mechanism (that is in turn based on Atmosphere) and I have got a small question. I mentioned that the Primefaces Push works rather like a broadcaster that can work with several channels. All clients (browsers) subscribed to a certain channel will receive the message from the server broadcasted to an appropreate channel.
Set the connection and subscribe to a channel:
Code: Select all
<p:socket onMessage="doFancyWorkOnMessage" channel="/myChannel" />
Code: Select all
EventBusFactory.getDefault().eventBus().publish("/myChannel", "hi there");
What if I want to send a message from Server to a browser with a certain http session? Do I have use separate channel ("private" channel) for each session or is there another way to do it?
Kind regards ant thanks!