Class DeliveryContextImpl<T>
java.lang.Object
com.flowable.notification.engine.impl.DeliveryContextImpl<T>
- All Implemented Interfaces:
DeliveryContext<T>
public class DeliveryContextImpl<T> extends java.lang.Object implements DeliveryContext<T>
- Author:
- Filip Hrisafov
-
Field Summary
Fields Modifier and Type Field Description protected booleanmessageDeliveredprotected NotificationMessageProvider<T>messageProviderprotected Notificationnotificationprotected java.lang.StringrecipientId -
Constructor Summary
Constructors Constructor Description DeliveryContextImpl(NotificationMessageProvider<T> messageProvider, Notification notification, java.lang.String recipientId) -
Method Summary
Modifier and Type Method Description java.util.Optional<NotificationMessage<T>>getMessage(java.lang.String deliverer)The message that needs to be sent with it's payload for the provideddeliverer.NotificationgetNotification()The information for sending the information.java.lang.StringgetRecipientId()The id of the user that needs to receive the messagebooleanisMessageDelivered()Whether a message has already been delivered.voidsetMessageDelivered(boolean messageDelivered)Set whether the message has been delivered
-
Field Details
-
messageProvider
-
notification
-
recipientId
protected final java.lang.String recipientId -
messageDelivered
protected boolean messageDelivered
-
-
Constructor Details
-
DeliveryContextImpl
public DeliveryContextImpl(NotificationMessageProvider<T> messageProvider, Notification notification, java.lang.String recipientId)
-
-
Method Details
-
getMessage
Description copied from interface:DeliveryContextThe message that needs to be sent with it's payload for the provideddeliverer.- Specified by:
getMessagein interfaceDeliveryContext<T>- Returns:
- the message that needs to be sent
-
getNotification
Description copied from interface:DeliveryContextThe information for sending the information. Such as whether a push is needed, or something similar- Specified by:
getNotificationin interfaceDeliveryContext<T>- Returns:
- the notification information
-
getRecipientId
public java.lang.String getRecipientId()Description copied from interface:DeliveryContextThe id of the user that needs to receive the message- Specified by:
getRecipientIdin interfaceDeliveryContext<T>- Returns:
- the id of the user that needs to received the message
-
isMessageDelivered
public boolean isMessageDelivered()Description copied from interface:DeliveryContextWhether a message has already been delivered. This is used for communication between differentMessageDeliverer(s) in order to decide whether a message needs to be sent.- Specified by:
isMessageDeliveredin interfaceDeliveryContext<T>- Returns:
- whether the message has been delivered
-
setMessageDelivered
public void setMessageDelivered(boolean messageDelivered)Description copied from interface:DeliveryContextSet whether the message has been delivered- Specified by:
setMessageDeliveredin interfaceDeliveryContext<T>- Parameters:
messageDelivered- flag marking that the message has been delivered
-