PushServer with dynamic channels?

UI Components for JSF
Post Reply
Catalyst
Posts: 13
Joined: 13 Jan 2012, 22:45

24 May 2012, 19:53

I've got a PushServer setup locally and the chat examples working locally as well. What I'm trying to do now is setup PushServer to deal with dynamic channels. I'd like my channels to be along the lines of :

<p:push id="pushSearchResults" channel="#{user.id}_SEARCH_RESULTS_PROFILE" onmessage="showResultsProfile();">
</p:push>

from what I understand my push server needs to have this in it's web.xml

<servlet>
<servlet-name>Push Servlet</servlet-name>
<servlet-class>org.primefaces.push.PushServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<init-param>
<param-name>channels</param-name>
<param-value>chat,counter,SEARCH_RESULTS_PROFILE</param-value>
</init-param>
</servlet>

<servlet-mapping>
<servlet-name>Push Servlet</servlet-name>
<url-pattern>/prime-push/*</url-pattern>
</servlet-mapping>

Where I will have no idea at the time what "#{user.id}". just pushing to SEARCH_RESULTS_PROFILE means all logged in users would get the update which is not desired.

Can I configure the push server to create dynamic channels?

Can I use SubTopics on the push server? I could work with #{user.id}@SEARCH_RESULTS_PROFILE

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

24 May 2012, 19:55

New PrimePush will support this.

Catalyst
Posts: 13
Joined: 13 Jan 2012, 22:45

24 May 2012, 20:21

Thank you for the quick response!

Are subtopics available now or is that also part of the 3.4 release?

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

24 May 2012, 21:54

That's for new PrimePush as well.

lahori
Posts: 1
Joined: 13 Jan 2015, 08:01

13 Jan 2015, 08:02

The atmosphere 2.0.5 and PF4 worked. With atmosphere 2.1.x explicitly, our application must be exposed as a web service.
adil

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Baidu [Spider] and 29 guests