Providers
The Providers
are a kind of agents for communication via email
or SMS
. There are two implemented providers:
email
through JavaMail API with thecat.albirar.communications.providers.email.javamail.impl.JavaMailSenderEmailProvider
implementation class. (see javamail)SMS
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.