I have used Primefaces 5.1 and Atmosphere 2.2.2
could the PUSH Delay to wait in milliseconds before sending?
example,think i have two users, one first click the send commandButton,then just , the other one click the send button in another Browser after 2 seconds.if i set the delay value is 5 seconds, the user can see the message in 5 seconds interval.
how can i do it?please help me
can primefaces push send delay?
-
- Posts: 6144
- Joined: 10 Sep 2011, 21:10
sounds like you rather have p:poll instead of p:socket.
I am currently using the PrimeFaces Push 'notify' (showcase) example (or use case). Prior to using PrimeFaces Push (FacesMessage or Notify), I added messages in a List<> for each user, and I used p:poll to check if there were notifications/messages for each user.
maybe you should try p:poll instead of p:socket for your use case.
also, you can search google for
atmosphere framework wiki
and read atmosphere framework documentation/wiki. You may find a way to delay messages.
OR, you can use Java EE @Asynchronous or JMS.
I am currently using the PrimeFaces Push 'notify' (showcase) example (or use case). Prior to using PrimeFaces Push (FacesMessage or Notify), I added messages in a List<> for each user, and I used p:poll to check if there were notifications/messages for each user.
maybe you should try p:poll instead of p:socket for your use case.
also, you can search google for
atmosphere framework wiki
and read atmosphere framework documentation/wiki. You may find a way to delay messages.
OR, you can use Java EE @Asynchronous or JMS.
Howard
PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome
Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache
PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome
Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache
-
- Information
-
Who is online
Users browsing this forum: No registered users and 32 guests