public class SMSDispatcher extends RateLimitedDispatcher
log
Constructor and Description |
---|
SMSDispatcher() |
Modifier and Type | Method and Description |
---|---|
void |
dispatch(String messageSubject,
String messageContent,
String targetParameter)
Dispatch a message to a recipient that doesn't care what produced it.
|
String |
getName() |
boolean |
isAvailable() |
void |
setDestinationField(String destinationField) |
void |
setMessageField(String messageField) |
void |
setPassword(String pass) |
void |
setPasswordField(String passwordField) |
void |
setService(String serviceURL) |
void |
setUser(String user) |
void |
setUsernameField(String usernameField) |
dispatch, isSendAllowed, setCooldownSeconds
public String getName()
public void setUsernameField(String usernameField)
usernameField
- The name of the field that conveys the sending username; this
is the server's identity.public void setPasswordField(String passwordField)
passwordField
- The field holding the password to authenticate the server to
the SMS gateway.public void setDestinationField(String destinationField)
destinationField
- The field holding the number to send the SMS to.public void setMessageField(String messageField)
messageField
- The field holding the plain-text message to send.public void setService(String serviceURL)
public void setUser(String user)
public void setPassword(String pass)
public boolean isAvailable()
public void dispatch(String messageSubject, String messageContent, String targetParameter) throws Exception
RateLimitedDispatcher
dispatch
in class RateLimitedDispatcher
messageSubject
- The subject of the message to send.messageContent
- The plain-text content of the message to send.targetParameter
- A description of where it is to go.Exception
- If anything goes wrong.Copyright © 2015–2018 The Apache Software Foundation. All rights reserved.