Interface NotificationProviderHandler
- All Known Implementing Classes:
LabsMobileSmsNotificationHandler,MailjetMailNotificationHandler,MailjetSmsNotificationHandler,PushNotificationHandler,SinchSmsNotificationHandler,SlackNotificationHandler,SmtpMailNotificationHandler
public interface NotificationProviderHandler
Interface for any service able to handle notification requests.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepts(NotificationChannel channel, NotificationProvider provider) Return true if this handler is able to send the given notification request.send(NotificationRequest notificationRequest, Template template, NotificationSenderService.MessageContext messageContext) Send a notification.
-
Method Details
-
send
NotificationResponse send(NotificationRequest notificationRequest, Template template, NotificationSenderService.MessageContext messageContext) Send a notification.- Parameters:
notificationRequest- notification request.template- the template to use to send the notification request.messageContext- the message context of the notification.- Returns:
- the notification entity to store.
-
accepts
Return true if this handler is able to send the given notification request.- Parameters:
channel- notification channel.provider- the provider to use.- Returns:
- true if this handler is able to send the given notification request.
-