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 Object
implements JPropertiesListener, ReplicaMessageListener
Manager push notification through event source protocol.
- Since:
- jcms-10.0.1 / JCMS-6303
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddNotification(Notification notification) Add a notificationvoidClean notifications in internal list (remove expired notifications, sent notifications, ...)voidcommitSend(Notification notification, Member mbr) Commit a notification delivery (cannot be sure but the notification has been written to output stream)voiddeleteNotification(Notification notification) Delete an existing notificationstatic PushNotificationManagergetNotificationList(Member mbr, List<Pattern> eventFilterPatternList, List<Pattern> typeFilterPatternList) get the notification list for an userprotected ProviderManagervoidbooleanvoidProcess the given ReplicaMessage.voidpropertiesChange(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, waitMethods inherited from interface com.jalios.jcms.plugin.PluginComponent
init
-
Method Details
-
getInstance
-
propertiesChange
Description copied from interface:JPropertiesListenerInvoked 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.getPropertiesorchannel.getProperty.- Specified by:
propertiesChangein interfaceJPropertiesListener- Parameters:
properties- the properties which have been submitted to change
-
initReplicaMessageListener
public void initReplicaMessageListener() -
getProviderManager
-
isEnabled
public boolean isEnabled() -
processMessage
Description copied from interface:ReplicaMessageListenerProcess the given ReplicaMessage.- Specified by:
processMessagein interfaceReplicaMessageListener- Parameters:
msg- the ReplicaMessage to process
-
addNotification
Add a notification- Parameters:
notification- theNotificationto add (must not be null)
-
deleteNotification
Delete an existing notification- Parameters:
notification- theNotificationto remove
-
getNotificationList
public List<Notification> getNotificationList(Member mbr, List<Pattern> eventFilterPatternList, List<Pattern> typeFilterPatternList) get the notification list for an user- Parameters:
mbr- theMembereventFilterPatternList- aListofPatternto be used as event filter : only Notification whose event matches at least one of the specified filter will be retrieved. null accepted.typeFilterPatternList- aListofPatternto be used as type filter : only Notification whose type matches at least one of the specified filter will be retrieved. null accepted.- Returns:
- the
ListofNotification
-
commitSend
Commit a notification delivery (cannot be sure but the notification has been written to output stream)- Parameters:
notification- theNotificationmbr- the associatedMember
-
cleanNotifications
public void cleanNotifications()Clean notifications in internal list (remove expired notifications, sent notifications, ...)
-