Class ServerEventWaitForManager
- java.lang.Object
-
- org.silverpeas.core.notification.sse.ServerEventWaitForManager
-
@Service public class ServerEventWaitForManager extends Object
This manager handles allServerEvent
implementation implementing alsoSendEveryAmountOfTime
interface.When an event could be send several times in a short time (could be the case when event is about all connected users), it can be useful to limit a send after a minimum delay.
- Author:
- silveryocha
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ServerEventWaitForManager
get()
boolean
mustSendImmediately(ServerEvent event)
Puts aServerEvent
to send into context of waiting mechanism.
-
-
-
Method Detail
-
get
public static ServerEventWaitForManager get()
-
mustSendImmediately
public boolean mustSendImmediately(ServerEvent event)
Puts aServerEvent
to send into context of waiting mechanism.If the
ServerEvent
implementation does not implementSendEveryAmountOfTime
interface, no wait is performed.- Parameters:
event
- aServerEvent
instance.- Returns:
- true if send has to wait.
-
-