Interface DeliveryContext<T>


  • public interface DeliveryContext<T>
    A delivery context that is used for sending messages.
    Author:
    Filip Hrisafov
    • Method Detail

      • getMessage

        Optional<NotificationMessage<T>> getMessage​(String deliverer)
        The message that needs to be sent with it's payload for the provided deliverer.
        Returns:
        the message that needs to be sent
      • getNotification

        Notification getNotification()
        The information for sending the information. Such as whether a push is needed, or something similar
        Returns:
        the notification information
      • getRecipientId

        String getRecipientId()
        The id of the user that needs to receive the message
        Returns:
        the id of the user that needs to received the message
      • isMessageDelivered

        boolean isMessageDelivered()
        Whether a message has already been delivered. This is used for communication between different MessageDeliverer(s) in order to decide whether a message needs to be sent.
        Returns:
        whether the message has been delivered
      • setMessageDelivered

        void setMessageDelivered​(boolean messageDelivered)
        Set whether the message has been delivered
        Parameters:
        messageDelivered - flag marking that the message has been delivered