Class SmsFailoverNotifier.Builder
java.lang.Object
com.chatmotorapi.api.notify.failover.SmsFailoverNotifier.Builder
- Enclosing class:
- SmsFailoverNotifier
public static class SmsFailoverNotifier.Builder extends Object
Builder class for SmsFailoverNotifier. This class follows the builder pattern
to configure and create instances of SmsFailoverNotifier.
-
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description SmsFailoverNotifier.BuilderaccountSid(String accountSid)Sets the Twilio Account SID required for API access.SmsFailoverNotifier.BuilderauthToken(String authToken)Sets the Twilio Auth Token required for API access.SmsFailoverNotifierbuild()Builds and returns a SmsFailoverNotifier configured with this builder's settings.SmsFailoverNotifier.BuilderfromPhoneNumber(String fromPhoneNumber)Sets the Twilio phone number from which the message will be sent.SmsFailoverNotifier.Builderlogger(org.slf4j.Logger logger)Sets the logger used for logging operational information.SmsFailoverNotifier.BuildermessageText(String messageText)Sets the message text to send to all phone numbers.SmsFailoverNotifier.BuilderphoneNumbers(List<String> phoneNumbers)Sets the list of phone numbers to notify in the event of a failover.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
logger
Sets the logger used for logging operational information.- Parameters:
logger- the Logger to use- Returns:
- this Builder instance for chaining
-
accountSid
Sets the Twilio Account SID required for API access.- Parameters:
accountSid- the Twilio Account SID- Returns:
- this Builder instance for chaining
-
authToken
Sets the Twilio Auth Token required for API access.- Parameters:
authToken- the Twilio Auth Token- Returns:
- this Builder instance for chaining
-
phoneNumbers
Sets the list of phone numbers to notify in the event of a failover.- Parameters:
phoneNumbers- the list of phone numbers- Returns:
- this Builder instance for chaining
-
messageText
Sets the message text to send to all phone numbers.- Parameters:
messageText- the message text- Returns:
- this Builder instance for chaining
-
fromPhoneNumber
Sets the Twilio phone number from which the message will be sent.- Parameters:
fromPhoneNumber- the Twilio phone number- Returns:
- this Builder instance for chaining
-
build
Builds and returns a SmsFailoverNotifier configured with this builder's settings.- Returns:
- a new SmsFailoverNotifier instance
-