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 void
commitSend(Member mbr)
java.lang.String
getEventName()
java.util.Date
getExpirationDate()
java.lang.String
getJsonPayLoad()
Target
getTarget()
java.lang.String
getType()
protected boolean
isApplicable(Member mbr, java.util.List<java.util.regex.Pattern> eventFilterPatternList, java.util.List<java.util.regex.Pattern> typeFilterPatternList)
protected boolean
isCompletelySend()
protected boolean
isExpired()
boolean
isShouldBeReplicated()
void
setEventName(java.lang.String eventName)
void
setExpirationDate(java.util.Date expirationDate)
void
setJsonPayLoad(java.lang.String jsonPayLoad)
void
setShouldBeReplicated(boolean shouldBeReplicated)
void
setTarget(Target target)
void
setType(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
- theTarget
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 notificationtype
- type of the notificationtarget
- theTarget
of 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
- theTarget
of the notification (must not be null)expirationDate
- theDate
of 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
- theTarget
of the notification (must not be null)expirationDate
- theDate
of 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
- theTarget
of 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
- theTarget
of 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()
-
-