Class MockSenderClient
- java.lang.Object
-
- com.github.mikesafonov.smpp.core.sender.MockSenderClient
-
- All Implemented Interfaces:
SenderClient
public class MockSenderClient extends java.lang.Object implements SenderClient
Implementation ofSenderClientwhich not perform any connection via smpp and only generateMessageResponse/CancelMessageResponseby usingSmppResultGenerator
-
-
Constructor Summary
Constructors Constructor Description MockSenderClient(@NotNull SmppResultGenerator smppResultGenerator, @NotNull java.lang.String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull CancelMessageResponsecancel(@NotNull CancelMessage cancelMessage)Cancel sms messagejava.util.Optional<ConnectionManager>getConnectionManager()Get Connection Manager@NotNull java.lang.StringgetId()@NotNull MessageResponsesend(@NotNull Message message)Send message via smpp protocolvoidsetup()Connect to SMSC via SMPP protocol
-
-
-
Constructor Detail
-
MockSenderClient
public MockSenderClient(@NotNull @NotNull SmppResultGenerator smppResultGenerator, @NotNull @NotNull java.lang.String id)
-
-
Method Detail
-
getId
@NotNull public @NotNull java.lang.String getId()
- Specified by:
getIdin interfaceSenderClient- Returns:
- Identifier of response client
-
setup
public void setup()
Description copied from interface:SenderClientConnect to SMSC via SMPP protocol- Specified by:
setupin interfaceSenderClient
-
send
@NotNull public @NotNull MessageResponse send(@NotNull @NotNull Message message)
Description copied from interface:SenderClientSend message via smpp protocol- Specified by:
sendin interfaceSenderClient- Parameters:
message- sms- Returns:
- message response
-
cancel
@NotNull public @NotNull CancelMessageResponse cancel(@NotNull @NotNull CancelMessage cancelMessage)
Description copied from interface:SenderClientCancel sms message- Specified by:
cancelin interfaceSenderClient- Parameters:
cancelMessage- message to cancel- Returns:
- cancel response
-
getConnectionManager
public java.util.Optional<ConnectionManager> getConnectionManager()
Description copied from interface:SenderClientGet Connection Manager- Specified by:
getConnectionManagerin interfaceSenderClient- Returns:
ConnectionManager
-
-