Package com.jalios.jcms.push
Class PushNotificationManager
- java.lang.Object
-
- com.jalios.jcms.push.PushNotificationManager
-
- All Implemented Interfaces:
PluginComponent
,ReplicaMessageListener
,JPropertiesListener
public class PushNotificationManager extends java.lang.Object implements JPropertiesListener, ReplicaMessageListener
Manager push notification through event source protocol.- Since:
- jcms-10.0.1 / JCMS-6303
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addNotification(Notification notification)
Add a notificationvoid
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 notificationstatic 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 userprotected 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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.jalios.jcms.plugin.PluginComponent
init
-
-
-
-
Method Detail
-
getInstance
public static PushNotificationManager getInstance()
-
propertiesChange
public void propertiesChange(JProperties properties)
Description copied from interface:JPropertiesListener
Invoked after properties have been modified in JCMS and save on disk.You cannot alter the value received in parameters.
Note that properties parameter may be null, a limited set of site properties, or all site properties.
To check that a property has been modified, reload the "current" property instead using
channel.getProperties
orchannel.getProperty
.- Specified by:
propertiesChange
in interfaceJPropertiesListener
- Parameters:
properties
- the properties which have been submitted to change
-
initReplicaMessageListener
public void initReplicaMessageListener()
-
getProviderManager
protected ProviderManager getProviderManager()
-
isEnabled
public boolean isEnabled()
-
processMessage
public void processMessage(ReplicaMessage msg)
Description copied from interface:ReplicaMessageListener
Process the given ReplicaMessage.- Specified by:
processMessage
in interfaceReplicaMessageListener
- Parameters:
msg
- the ReplicaMessage to process
-
addNotification
public void addNotification(Notification notification)
Add a notification- Parameters:
notification
- theNotification
to add (must not be null)
-
deleteNotification
public void deleteNotification(Notification notification)
Delete an existing notification- Parameters:
notification
- theNotification
to remove
-
getNotificationList
public 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- Parameters:
mbr
- theMember
eventFilterPatternList
- aList
ofPattern
to be used as event filter : only Notification whose event matches at least one of the specified filter will be retrieved. null accepted.typeFilterPatternList
- aList
ofPattern
to be used as type filter : only Notification whose type matches at least one of the specified filter will be retrieved. null accepted.- Returns:
- the
List
ofNotification
-
commitSend
public void commitSend(Notification notification, Member mbr)
Commit a notification delivery (cannot be sure but the notification has been written to output stream)- Parameters:
notification
- theNotification
mbr
- the associatedMember
-
cleanNotifications
public void cleanNotifications()
Clean notifications in internal list (remove expired notifications, sent notifications, ...)
-
-