Interface NotificationPublisher

All Known Implementing Classes:
KafkaNotificationPublisher, RabbitMQNotificationPublisher
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface NotificationPublisher
A publisher of notifications.

An implementation of this interface normally uses a messaging system to publish messages containing information about the notifications. In this case, the publicationChannel that is used by the publish(List, String) method would correspond to an exchange name.

Author:
RealLifeDeveloper
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    publish(List<Notification> notifications, String publicationChannel)
    Publishes a number of notifications to the given publication channel.
  • Method Details

    • publish

      void publish(List<Notification> notifications, String publicationChannel) throws IOException
      Publishes a number of notifications to the given publication channel.
      Parameters:
      notifications - a list of Notifications to publish
      publicationChannel - the name of the publication channel
      Throws:
      IOException - if publishing failed