Class NotificationProviderManager
java.lang.Object
es.kukenan.smartfi.microservice.communication.service.provider.NotificationProviderManager
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 Summary
FieldsModifier and TypeFieldDescriptionprivate List<NotificationProviderHandler>The registered notification provider list. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate NotificationProvidernotificationProvider(Template template) Extract the notification provider enumeration entry from the template.provider(NotificationChannel channel, Template template) Find the implementation class for the given notification and provider.
-
Field Details
-
notificationProviders
The registered notification provider list.
-
-
Constructor Details
-
NotificationProviderManager
public NotificationProviderManager()
-
-
Method Details
-
provider
Find the implementation class for the given notification and provider.- Parameters:
channel- notification request channel.template- required provider.- Returns:
- the provider implementation.
UnexpectedExceptionis thrown if no provider implementation found for the given notification request.
-
notificationProvider
Extract the notification provider enumeration entry from the template.- Parameters:
template- the template.- Returns:
- the provider for the given template.
UnexpectedExceptionif the provider for the given template is not recognized.
-