Class Notification


  • public class Notification
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Notification()  
      Notification​(java.lang.String eventName, java.lang.String type, Target target, long expirationDate, java.lang.String jsonPayLoad)
      Create a notification
      Notification​(java.lang.String eventName, java.lang.String type, Target target, long expirationDate, java.lang.String jsonPayLoad, boolean shouldBeReplicated)
      Create a notification
      Notification​(java.lang.String eventName, java.lang.String type, Target target, java.lang.String jsonPayLoad)
      Create a notification with default expiration date to now + 10 minutes
      Notification​(java.lang.String eventName, java.lang.String type, Target target, java.lang.String jsonPayLoad, boolean shouldBeReplicated)
      Create a notification with default expiration date to now + 10 minutes
      Notification​(java.lang.String eventName, java.lang.String type, Target target, java.util.Date expirationDate, java.lang.String jsonPayLoad)
      Create a notification
      Notification​(java.lang.String eventName, java.lang.String type, Target target, java.util.Date expirationDate, java.lang.String jsonPayLoad, boolean shouldBeReplicated)
      Create a notification
    • Constructor Detail

      • Notification

        public Notification()
      • Notification

        public Notification​(java.lang.String eventName,
                            java.lang.String type,
                            Target target,
                            java.lang.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​(java.lang.String eventName,
                            java.lang.String type,
                            Target target,
                            java.lang.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​(java.lang.String eventName,
                            java.lang.String type,
                            Target target,
                            java.util.Date expirationDate,
                            java.lang.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​(java.lang.String eventName,
                            java.lang.String type,
                            Target target,
                            java.util.Date expirationDate,
                            java.lang.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​(java.lang.String eventName,
                            java.lang.String type,
                            Target target,
                            long expirationDate,
                            java.lang.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​(java.lang.String eventName,
                            java.lang.String type,
                            Target target,
                            long expirationDate,
                            java.lang.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 Detail

      • getEventName

        public java.lang.String getEventName()
      • setEventName

        public void setEventName​(java.lang.String eventName)
      • getTarget

        public Target getTarget()
      • setTarget

        public void setTarget​(Target target)
      • getExpirationDate

        public java.util.Date getExpirationDate()
      • setExpirationDate

        public void setExpirationDate​(java.util.Date expirationDate)
      • getJsonPayLoad

        public java.lang.String getJsonPayLoad()
      • setJsonPayLoad

        public void setJsonPayLoad​(java.lang.String jsonPayLoad)
      • getType

        public java.lang.String getType()
      • setType

        public void setType​(java.lang.String type)
      • isShouldBeReplicated

        public boolean isShouldBeReplicated()
      • setShouldBeReplicated

        public void setShouldBeReplicated​(boolean shouldBeReplicated)
      • isApplicable

        protected boolean isApplicable​(Member mbr,
                                       java.util.List<java.util.regex.Pattern> eventFilterPatternList,
                                       java.util.List<java.util.regex.Pattern> typeFilterPatternList)
      • commitSend

        protected void commitSend​(Member mbr)
      • isExpired

        protected boolean isExpired()
      • isCompletelySend

        protected boolean isCompletelySend()