public class PushNotificationManager extends java.lang.Object implements JPropertiesListener, ReplicaMessageListener
REVISION
Modifier and Type | Method and Description |
---|---|
void |
addNotification(Notification notification)
Add a notification
|
void |
cleanNotifications()
Clean notifications in internal list (remove expired notifications, sent notifications, ...)
|
void |
commitSend(Notification notification,
Member mbr)
Commit a notification delivery (cannot be sure but the notification has been written to output stream)
|
void |
deleteNotification(Notification notification)
Delete an existing notification
|
static PushNotificationManager |
getInstance() |
java.util.List<Notification> |
getNotificationList(Member mbr,
java.util.List<java.util.regex.Pattern> eventFilterPatternList,
java.util.List<java.util.regex.Pattern> typeFilterPatternList)
get the notification list for an user
|
protected ProviderManager |
getProviderManager() |
void |
initReplicaMessageListener() |
boolean |
isEnabled() |
void |
processMessage(ReplicaMessage msg)
Process the given ReplicaMessage.
|
void |
propertiesChange(JProperties properties)
Invoked after properties have been modified in JCMS and save on disk.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
init
public static PushNotificationManager getInstance()
public void propertiesChange(JProperties properties)
JPropertiesListener
You cannot alter the value received in parameters.
propertiesChange
in interface JPropertiesListener
properties
- the properties which have been modified (may not contain all JCMS properties)public void initReplicaMessageListener()
protected ProviderManager getProviderManager()
public boolean isEnabled()
public void processMessage(ReplicaMessage msg)
ReplicaMessageListener
processMessage
in interface ReplicaMessageListener
msg
- the ReplicaMessage to processpublic void addNotification(Notification notification)
notification
- the Notification
to add (must not be null)public void deleteNotification(Notification notification)
notification
- the Notification
to removepublic java.util.List<Notification> getNotificationList(Member mbr, java.util.List<java.util.regex.Pattern> eventFilterPatternList, java.util.List<java.util.regex.Pattern> typeFilterPatternList)
mbr
- the Member
eventFilterPatternList
- a List
of Pattern
to be used as event filter : only Notification whose event matches at least one of the specified filter will be retrieved. null accepted.typeFilterPatternList
- a List
of Pattern
to be used as type filter : only Notification whose type matches at least one of the specified filter will be retrieved. null accepted.List
of Notification
public void commitSend(Notification notification, Member mbr)
notification
- the Notification
mbr
- the associated Member
public void cleanNotifications()
Copyright © 2001-2018 Jalios SA. All Rights Reserved.