Package com.jalios.jcms.push
Class Notification
- java.lang.Object
 - 
- com.jalios.jcms.push.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 notificationNotification(java.lang.String eventName, java.lang.String type, Target target, long expirationDate, java.lang.String jsonPayLoad, boolean shouldBeReplicated)Create a notificationNotification(java.lang.String eventName, java.lang.String type, Target target, java.lang.String jsonPayLoad)Create a notification with default expiration date to now + 10 minutesNotification(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 minutesNotification(java.lang.String eventName, java.lang.String type, Target target, java.util.Date expirationDate, java.lang.String jsonPayLoad)Create a notificationNotification(java.lang.String eventName, java.lang.String type, Target target, java.util.Date expirationDate, java.lang.String jsonPayLoad, boolean shouldBeReplicated)Create a notification 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcommitSend(Member mbr)java.lang.StringgetEventName()java.util.DategetExpirationDate()java.lang.StringgetJsonPayLoad()TargetgetTarget()java.lang.StringgetType()protected booleanisApplicable(Member mbr, java.util.List<java.util.regex.Pattern> eventFilterPatternList, java.util.List<java.util.regex.Pattern> typeFilterPatternList)protected booleanisCompletelySend()protected booleanisExpired()booleanisShouldBeReplicated()voidsetEventName(java.lang.String eventName)voidsetExpirationDate(java.util.Date expirationDate)voidsetJsonPayLoad(java.lang.String jsonPayLoad)voidsetShouldBeReplicated(boolean shouldBeReplicated)voidsetTarget(Target target)voidsetType(java.lang.String type) 
 - 
 
- 
- 
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 notificationtype- type of the notificationtarget- theTargetof 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 notificationtype- type of the notificationtarget- theTargetof the notification (must not be null)jsonPayLoad- the json payloadshouldBeReplicated- 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 notificationtype- type of the notificationtarget- theTargetof the notification (must not be null)expirationDate- theDateof expiration of this notificationjsonPayLoad- 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 notificationtype- type of the notificationtarget- theTargetof the notification (must not be null)expirationDate- theDateof expiration of this notificationjsonPayLoad- the json payloadshouldBeReplicated- 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 notificationtype- type of the notificationtarget- theTargetof the notification (must not be null)expirationDate- the date of expiration of this notificationjsonPayLoad- 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 notificationtype- type of the notificationtarget- theTargetof the notification (must not be null)expirationDate- the date of expiration of this notificationjsonPayLoad- the json payloadshouldBeReplicated- 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()
 
 - 
 
 -