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 Details

    • 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 or channel.getProperty.

      Specified by:
      propertiesChange in interface JPropertiesListener
      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 interface ReplicaMessageListener
      Parameters:
      msg - the ReplicaMessage to process
    • addNotification

      public void addNotification(Notification notification)
      Add a notification
      Parameters:
      notification - the Notification to add (must not be null)
    • deleteNotification

      public void deleteNotification(Notification notification)
      Delete an existing notification
      Parameters:
      notification - the Notification to remove
    • getNotificationList

      public List<Notification> getNotificationList(Member mbr, List<Pattern> eventFilterPatternList, List<Pattern> typeFilterPatternList)
      get the notification list for an user
      Parameters:
      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.
      Returns:
      the List of Notification
    • 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 - the Notification
      mbr - the associated Member
    • cleanNotifications

      public void cleanNotifications()
      Clean notifications in internal list (remove expired notifications, sent notifications, ...)