Package com.jalios.jcms.push
Class Notification
java.lang.Object
com.jalios.jcms.push.Notification
- Direct Known Subclasses:
RawNotification
-
Constructor Summary
ConstructorsConstructorDescriptionNotification(String eventName, String type, Target target, long expirationDate, String jsonPayLoad) Create a notificationNotification(String eventName, String type, Target target, long expirationDate, String jsonPayLoad, boolean shouldBeReplicated) Create a notificationNotification(String eventName, String type, Target target, String jsonPayLoad) Create a notification with default expiration date to now + 10 minutesNotification(String eventName, String type, Target target, String jsonPayLoad, boolean shouldBeReplicated) Create a notification with default expiration date to now + 10 minutesCreate a notificationNotification(String eventName, String type, Target target, Date expirationDate, String jsonPayLoad, boolean shouldBeReplicated) Create a notification -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcommitSend(Member mbr) getType()protected booleanprotected booleanprotected booleanbooleanvoidsetEventName(String eventName) voidsetExpirationDate(Date expirationDate) voidsetJsonPayLoad(String jsonPayLoad) protected voidsetRawPayload(String rawPayload) voidsetShouldBeReplicated(boolean shouldBeReplicated) voidvoidtoString()
-
Constructor Details
-
Notification
public Notification() -
Notification
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(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 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(String eventName, String type, Target target, Date expirationDate, String jsonPayLoad) Create a notification -
Notification
public Notification(String eventName, String type, Target target, Date expirationDate, 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(String eventName, String type, Target target, long expirationDate, 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(String eventName, String type, Target target, long expirationDate, 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 Details
-
getEventName
-
setEventName
-
getTarget
-
setTarget
-
getExpirationDate
-
setExpirationDate
-
getJsonPayLoad
-
setJsonPayLoad
-
getType
-
setType
-
getRawPayload
-
setRawPayload
-
isShouldBeReplicated
public boolean isShouldBeReplicated() -
setShouldBeReplicated
public void setShouldBeReplicated(boolean shouldBeReplicated) -
isApplicable
-
commitSend
-
isExpired
protected boolean isExpired() -
isCompletelySend
protected boolean isCompletelySend() -
toString
-