Class SimpMessageDeliverer

java.lang.Object
com.flowable.notification.simp.SimpMessageDeliverer
All Implemented Interfaces:
MessageDeliverer

public class SimpMessageDeliverer
extends java.lang.Object
implements MessageDeliverer
A MessageDeliverer that uses the SimpMessagingTemplate and the SimpUserRegistry for delivering a message to a user.
Author:
Filip Hrisafov
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected java.lang.String messageDestination  
    protected org.springframework.messaging.simp.SimpMessagingTemplate messagingTemplate  
    protected org.springframework.messaging.simp.user.SimpUserRegistry userRegistry  
  • Constructor Summary

    Constructors 
    Constructor Description
    SimpMessageDeliverer​(org.springframework.messaging.simp.SimpMessagingTemplate messagingTemplate, org.springframework.messaging.simp.user.SimpUserRegistry userRegistry, java.lang.String messageDestination)  
  • Method Summary

    Modifier and Type Method Description
    protected boolean canDeliver​(java.lang.String userId)  
    java.lang.String getDelivererType()
    The type of the message deliverer.
    int getPriority()  
    void sendMessage​(DeliveryContext<?> deliveryContext)
    Perform sending of a message using the provided delivery context.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • messagingTemplate

      protected final org.springframework.messaging.simp.SimpMessagingTemplate messagingTemplate
    • userRegistry

      protected final org.springframework.messaging.simp.user.SimpUserRegistry userRegistry
    • messageDestination

      protected final java.lang.String messageDestination
  • Constructor Details

    • SimpMessageDeliverer

      public SimpMessageDeliverer​(org.springframework.messaging.simp.SimpMessagingTemplate messagingTemplate, org.springframework.messaging.simp.user.SimpUserRegistry userRegistry, java.lang.String messageDestination)
  • Method Details

    • sendMessage

      public void sendMessage​(DeliveryContext<?> deliveryContext)
      Description copied from interface: MessageDeliverer
      Perform sending of a message using the provided delivery context. The message deliverer should decide on it's own whether a message should be sent. Usually message should always be send if a user is connected in real time. Notification (offline) senders should first check if no message has been delivered and only then perform a delivery (if they can).
      Specified by:
      sendMessage in interface MessageDeliverer
      Parameters:
      deliveryContext - the delivery context that can be used to transfer data between multiple delivers
    • canDeliver

      protected boolean canDeliver​(java.lang.String userId)
    • getDelivererType

      public java.lang.String getDelivererType()
      Description copied from interface: MessageDeliverer
      The type of the message deliverer. Usually used to create a message based on the type
      Specified by:
      getDelivererType in interface MessageDeliverer
      Returns:
      type of the deliverer
    • getPriority

      public int getPriority()
      Specified by:
      getPriority in interface MessageDeliverer