Providers
Providers are a concept of this library to design some agent that operate with any service that provide communication capabilities.
The concrete provider selected by service to manage a send operation is made by one parameter: the kind of channel for both, sender and recipient.
By default, two providers are implemented, one for email and another one for sms:
email
through JavaMail API with thecat.albirar.communications.providers.email.javamail.impl.JavaMailSenderEmailProvider
implementation class. See javamailSMS
through Click & Send SMS service provider withcat.albirar.communications.providers.sms.clickandsend.ClickAndSendSmsSenderProvider
implementation class. See ClickAndSend
You can use these or any other that you want.
Implementing providers
Any provider implementation class should implement any of the two following interfaces:
cat.albirar.communications.providers.email.IEmailProvider
for email providercat.albirar.communications.providers.sms.ISmsSenderProvider
for SMS provider
The communications should to be made asynchronously. Any problem should to be notified throwing a cat.albirar.communications.providers.ProviderException
.
The “registration” of new providers is made by spring scanning components and will be autowired to the list of the service providers.