Class Notification

java.lang.Object
com.jalios.jcms.push.Notification
Direct Known Subclasses:
RawNotification

public class Notification extends Object
  • Constructor Details

    • Notification

      public Notification()
    • Notification

      public Notification(String eventName, String type, Target target, String jsonPayLoad)
      Create a notification with default expiration date to now + 10 minutes
      Parameters:
      eventName - eventName of the notification
      type - type of the notification
      target - the Target of the notification (must not be null)
      jsonPayLoad - the json payload
    • Notification

      public Notification(String eventName, String type, Target target, String jsonPayLoad, boolean shouldBeReplicated)
      Create a notification with default expiration date to now + 10 minutes
      Parameters:
      eventName - eventName of the notification
      type - type of the notification
      target - the Target of the notification (must not be null)
      jsonPayLoad - the json payload
      shouldBeReplicated - true if jsync replication of the notification should be done
    • Notification

      public Notification(String eventName, String type, Target target, Date expirationDate, String jsonPayLoad)
      Create a notification
      Parameters:
      eventName - eventName of the notification
      type - type of the notification
      target - the Target of the notification (must not be null)
      expirationDate - the Date of expiration of this notification
      jsonPayLoad - the json payload
    • Notification

      public Notification(String eventName, String type, Target target, Date expirationDate, String jsonPayLoad, boolean shouldBeReplicated)
      Create a notification
      Parameters:
      eventName - eventName of the notification
      type - type of the notification
      target - the Target of the notification (must not be null)
      expirationDate - the Date of expiration of this notification
      jsonPayLoad - the json payload
      shouldBeReplicated - true if jsync replication of the notification should be done
    • Notification

      public Notification(String eventName, String type, Target target, long expirationDate, String jsonPayLoad)
      Create a notification
      Parameters:
      eventName - eventName of the notification
      type - type of the notification
      target - the Target of the notification (must not be null)
      expirationDate - the date of expiration of this notification
      jsonPayLoad - the json payload
    • Notification

      public Notification(String eventName, String type, Target target, long expirationDate, String jsonPayLoad, boolean shouldBeReplicated)
      Create a notification
      Parameters:
      eventName - eventName of the notification
      type - type of the notification
      target - the Target of the notification (must not be null)
      expirationDate - the date of expiration of this notification
      jsonPayLoad - the json payload
      shouldBeReplicated - true if jsync replication of the notification should be done
  • Method Details

    • getEventName

      public String getEventName()
    • setEventName

      public void setEventName(String eventName)
    • getTarget

      public Target getTarget()
    • setTarget

      public void setTarget(Target target)
    • getExpirationDate

      public Date getExpirationDate()
    • setExpirationDate

      public void setExpirationDate(Date expirationDate)
    • getJsonPayLoad

      public String getJsonPayLoad()
    • setJsonPayLoad

      public void setJsonPayLoad(String jsonPayLoad)
    • getType

      public String getType()
    • setType

      public void setType(String type)
    • getRawPayload

      public String getRawPayload()
    • setRawPayload

      protected void setRawPayload(String rawPayload)
    • isShouldBeReplicated

      public boolean isShouldBeReplicated()
    • setShouldBeReplicated

      public void setShouldBeReplicated(boolean shouldBeReplicated)
    • isApplicable

      protected boolean isApplicable(Member mbr, List<Pattern> eventFilterPatternList, List<Pattern> typeFilterPatternList)
    • commitSend

      protected void commitSend(Member mbr)
    • isExpired

      protected boolean isExpired()
    • isCompletelySend

      protected boolean isCompletelySend()
    • toString

      public String toString()
      Overrides:
      toString in class Object