Class LabsMobileSmsNotificationHandler
java.lang.Object
es.kukenan.smartfi.microservice.communication.service.provider.impl.labsmobile.LabsMobileSmsNotificationHandler
- All Implemented Interfaces:
NotificationProviderHandler
@Component
public class LabsMobileSmsNotificationHandler
extends Object
implements NotificationProviderHandler
Service class that holds all the LabsMobile SMS notification sending bussiness logic.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepts(NotificationChannel channel, NotificationProvider provider) Return true if this handler is able to send the given notification request.private Stringprivate NotificationResponseprocessResponseMessages(NotificationRequest request, String response) Process response messages.send(NotificationRequest request, Template template, NotificationSenderService.MessageContext messageContext) Send a notification.
-
Field Details
-
labsMobileEndpoints
LabsMobile Api Endpoints.
-
-
Constructor Details
-
LabsMobileSmsNotificationHandler
public LabsMobileSmsNotificationHandler()
-
-
Method Details
-
accepts
Description copied from interface:NotificationProviderHandlerReturn true if this handler is able to send the given notification request.- Specified by:
acceptsin interfaceNotificationProviderHandler- Parameters:
channel- notification channel.provider- the provider to use.- Returns:
- true if this handler is able to send the given notification request.
-
send
public NotificationResponse send(NotificationRequest request, Template template, NotificationSenderService.MessageContext messageContext) Description copied from interface:NotificationProviderHandlerSend a notification.- Specified by:
sendin interfaceNotificationProviderHandler- Parameters:
request- 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.
-
from
-
processResponseMessages
Process response messages.- Parameters:
request-NotificationRequestresponse- aStringresponse- Returns:
- the
NotificationResponseobject.
-