Class NotificationProviderManager

java.lang.Object
es.kukenan.smartfi.microservice.communication.service.provider.NotificationProviderManager

@Component public class NotificationProviderManager extends Object
This class is designed to hold a chain of notification resolvers and send a notification to them so the responsible(s) can send the notification.
  • Field Details

  • Constructor Details

    • NotificationProviderManager

      public NotificationProviderManager()
  • Method Details

    • provider

      public NotificationProviderHandler provider(NotificationChannel channel, Template template)
      Find the implementation class for the given notification and provider.
      Parameters:
      channel - notification request channel.
      template - required provider.
      Returns:
      the provider implementation. UnexpectedException is thrown if no provider implementation found for the given notification request.
    • notificationProvider

      private NotificationProvider notificationProvider(Template template)
      Extract the notification provider enumeration entry from the template.
      Parameters:
      template - the template.
      Returns:
      the provider for the given template. UnexpectedException if the provider for the given template is not recognized.