public class SmsClient extends SmsClientSupport
All of the API method of SMS is included in this class.
SMS_HANDLERSconfig, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_SERVICE_DOMAIN, URL_PREFIX| Constructor and Description |
|---|
SmsClient()
Constructs a new
SmsClient instance with default settings. |
SmsClient(SmsClientConfiguration config)
Constructs a new
SmsClient instance with the specified configuration. |
| Modifier and Type | Method and Description |
|---|---|
CreateTemplateResponse |
createTemplate(CreateTemplateRequest request)
Create message template
|
void |
deleteTemplate(DeleteTemplateRequest request)
Delete message template
|
GetTemplateDetailResponse |
getTemplateDetail(GetTemplateDetailRequest request)
Get the detail of message template
|
ListTemplateResponse |
listTemplate(SmsRequest request)
Get the list of message template
|
QueryMessageDetailResponse |
queryMessageDetail(QueryMessageDetailRequest request)
Query message detail
|
QueryQuotaResponse |
queryQuota(SmsRequest request)
Query the sending quota
|
SendMessageResponse |
sendMessage(SendMessageRequest request)
Deprecated.
This method is deprecated and will be removed from sdk in the future when SMS3.0 is officially released, we suggest you to use sendMessage(SendMessageV3Request) instead.
|
SendMessageV2Response |
sendMessage(SendMessageV2Request request)
Deprecated.
This method is deprecated and will be removed from sdk in the future when SMS3.0 is officially released, we suggest you to use sendMessage(SendMessageV3Request) instead.
|
SendMessageV3Response |
sendMessage(SendMessageV3Request request)
Send message
|
StatReceiverResponse |
statReceiver(StatReceiverRequest request)
Get the statistics about receiving message
|
assertListNotNullOrEmpty, assertMapNotNullOrEmpty, assertStringArrayNotNullOrEmpty, assertStringNotNullOrEmpty, createGeneralRequest, createRequest, fillRequestPayloadcomputeServiceId, getClient, getEndpoint, getServiceId, invokeHttpClient, isRegionSupported, setClient, shutdownpublic SmsClient()
SmsClient instance with default settings.public SmsClient(SmsClientConfiguration config)
SmsClient instance with the specified configuration.config - the specified configuration, default inherit super class
com.baidubce.BceClientConfigurationSmsClientConfiguration@Deprecated public SendMessageResponse sendMessage(SendMessageRequest request)
To send message, you have to specify a template which is built by system, or created by yourself which is audited by BCE administrator.
One or more receiver can be specified while sending message.
request - The request object which includes the content to send and one or more receiverSendMessageRequest,
SendMessageResponse@Deprecated public SendMessageV2Response sendMessage(SendMessageV2Request request)
public SendMessageV3Response sendMessage(SendMessageV3Request request)
The interface of sending message by SMS3.0. To send message, you have to specify a template and a signature which are created by yourself.
request - refer to com.baidubce.services.sms.model.SendMessageV3Requestcom.baidubce.services.sms.model.SendMessageV3Responsepublic QueryMessageDetailResponse queryMessageDetail(QueryMessageDetailRequest request)
request - The request object which includes the id of message to queryid,
content, receiver, sendTime etcQueryMessageDetailRequest,
QueryMessageDetailResponsepublic CreateTemplateResponse createTemplate(CreateTemplateRequest request)
The template which is created will have a unique id. after audited by BCE administrator, it can be used normally.
request - The request object which includes the name and content of template which is ready to be createdCreateTemplateRequest,
CreateTemplateResponsepublic void deleteTemplate(DeleteTemplateRequest request)
request - The request object which includes the id of template which is ready to be deletedDeleteTemplateRequestpublic GetTemplateDetailResponse getTemplateDetail(GetTemplateDetailRequest request)
request - The request object which includes the id of template which is ready to be getcom.baidubce.services.sms.model.GetTemplateDetailResponseGetTemplateDetailRequest,
GetTemplateDetailResponsepublic ListTemplateResponse listTemplate(SmsRequest request)
request - The request object which is emptycom.baidubce.services.sms.model.ListTemplateResponseListTemplateResponsepublic QueryQuotaResponse queryQuota(SmsRequest request)
request - The request object which is emptycom.baidubce.services.sms.model.QueryQuotaResponseQueryQuotaResponsepublic StatReceiverResponse statReceiver(StatReceiverRequest request)
request - refer to com.baidubce.services.sms.model.StatReceiverRequestcom.baidubce.services.sms.model.StatReceiverResponseStatReceiverRequest,
StatReceiverResponseCopyright © 2020. All rights reserved.