public interface SessionHandlingStrategy extends Cleanable
Modifier and Type | Method and Description |
---|---|
com.cloudhopper.smpp.SmppSession |
getSession()
The client needs a session to be able to send the message.
|
void |
messageNotSent(Sms sms,
SmppException e)
Fired when the message couldn't be sent due to an error.
|
void |
messageProcessed(Sms sms)
Fired when a message has been processed i.e.
|
void |
messageSent(Sms sms)
Fired when a message has been sent successfully.
|
com.cloudhopper.smpp.SmppSession getSession() throws SmppException
Either create a new session or use an existing one.
SmppException
- when the session can't be created (connection failure)void messageSent(Sms sms) throws MessageException
sms
- the sent SMSMessageException
- when something happens during handling of message successvoid messageNotSent(Sms sms, SmppException e) throws MessageException
sms
- the SMS that couldn't be sente
- the raied error while sendingMessageException
- when something happens during handling of message errorvoid messageProcessed(Sms sms)
This method is always called after messageSent(Sms)
and
messageNotSent(Sms, SmppException)
.
No exception should be thrown because this is used to end the process.
sms
- the sent SMSCopyright © 2021. All rights reserved.