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
-
-
Field Summary
-
Fields inherited from interface com.jalios.util.JPropertiesListener
REVISION
-
Fields inherited from interface com.jalios.jcms.plugin.PluginComponent
REVISION
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNotification(Notification notification)Add a notificationvoidcleanNotifications()Clean 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 PushNotificationManagergetInstance()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 ProviderManagergetProviderManager()voidinitReplicaMessageListener()booleanisEnabled()voidprocessMessage(ReplicaMessage msg)Process 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, 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: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
protected ProviderManager getProviderManager()
-
isEnabled
public boolean isEnabled()
-
processMessage
public void processMessage(ReplicaMessage msg)
Description copied from interface:ReplicaMessageListenerProcess the given ReplicaMessage.- Specified by:
processMessagein interfaceReplicaMessageListener- Parameters:
msg- the ReplicaMessage to process
-
addNotification
public void addNotification(Notification notification)
Add a notification- Parameters:
notification- theNotificationto add (must not be null)
-
deleteNotification
public void deleteNotification(Notification notification)
Delete an existing notification- Parameters:
notification- theNotificationto 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- 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
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- theNotificationmbr- the associatedMember
-
cleanNotifications
public void cleanNotifications()
Clean notifications in internal list (remove expired notifications, sent notifications, ...)
-
-