@Priority(properties="${ogham.sms.implementation-priority.cloudhopper}", defaultValue=40000) public class CloudhopperSMPPSender extends AbstractSpecializedSender<Sms> implements Cleanable
Constructor and Description |
---|
CloudhopperSMPPSender(ExtendedSmppSessionConfiguration configuration,
SessionHandlingStrategy sessionHandler,
MessagePreparator messagePreparator) |
Modifier and Type | Method and Description |
---|---|
void |
clean()
Clean all the opened resources before destruction.
|
void |
send(Sms sms)
Sends the message.
|
String |
toString() |
send
public CloudhopperSMPPSender(ExtendedSmppSessionConfiguration configuration, SessionHandlingStrategy sessionHandler, MessagePreparator messagePreparator)
public void send(Sms sms) throws MessageException
SpecializedSender
send
in interface SpecializedSender<Sms>
sms
- the message to sendMessageException
- when the message couldn't be sentpublic void clean() throws CleanException
Cleanable
Generally, this method is called only once per instance. But there may exist some cases where the method is called several times.
The implementation should ensure that if the method is called several times, the first time cleans the resources and the other calls doesn't do anything.
clean
in interface Cleanable
CleanException
- When cleanup has failed. This exception is likely to be
ignored because if cleanup has failed, there is nothing more
we can do. But this exception is important to track that
cleanup has failed and to indicate it to the developer.Copyright © 2021. All rights reserved.