类 SmsClient
- java.lang.Object
-
- com.baidubce.AbstractBceClient
-
- com.baidubce.services.sms.SmsClientSupport
-
- com.baidubce.services.sms.SmsClient
-
public class SmsClient extends SmsClientSupport
The entrance class for all client access to the API of SMS(Baidu message Service).All of the API method of SMS is included in this class.
-
-
字段概要
-
从类继承的字段 com.baidubce.services.sms.SmsClientSupport
SMS_HANDLERS
-
从类继承的字段 com.baidubce.AbstractBceClient
config, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_SERVICE_DOMAIN, URL_PREFIX
-
-
构造器概要
构造器 构造器 说明 SmsClient()Constructs a newSmsClientinstance with default settings.SmsClient(SmsClientConfiguration config)Constructs a newSmsClientinstance with the specified configuration.
-
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 voidcreateMobileBlack(CreateBlackRequest request)create mobile blackCreateSignatureResponsecreateSignature(CreateSignatureRequest request)Create the signatureCreateTemplateResponsecreateTemplate(CreateTemplateRequest request)Create message templateCreateTemplateResponsecreateTemplate(CreateTemplateRequest request)Create the templatevoiddeleteMobileBlack(String phones)delete mobile blackvoiddeleteSignature(DeleteSignatureRequest request)Delete the signaturevoiddeleteTemplate(DeleteTemplateRequest request)Delete message templatevoiddeleteTemplate(DeleteTemplateRequest request)Delete the templateGetSignatureResponsegetSignature(GetSignatureRequest request)Get signature detail infoGetTemplateResponsegetTemplate(GetTemplateRequest request)Get template detail infoGetTemplateDetailResponsegetTemplateDetail(GetTemplateDetailRequest request)已过时。This method is deprecated and will be removed from sdk in the future when SMS3.0 is officially released, we suggest you to use this.getTemplate(com.baidubce.services.sms.model.v3.GetTemplateRequest) instead.ListBlackResponselistMobileBlack(ListBlackRequest request)get the list of mobile blackListSignatureResponselistSignature(ListSignatureRequest request)Get the list of the signaturesListTemplateResponselistTemplate(SmsRequest request)已过时。This method is deprecated and will be removed from sdk in the future when SMS3.0 is officially released, we suggest you to use this.listTemplate(ListTemplateRequest request) instead.ListTemplateResponselistTemplate(ListTemplateRequest request)Get the list of the templatesvoidmodifySignature(ModifySignatureRequest request)Modify the signature when audit failurevoidmodifyTemplate(ModifyTemplateRequest request)Modify the template when audit failureQueryMessageDetailResponsequeryMessageDetail(QueryMessageDetailRequest request)Query message detailQueryQuotaResponsequeryQuota(SmsRequest request)已过时。This method is deprecated and will be removed from sdk in the future when SMS3.0 is officially released, we suggest you to use this.queryQuotaRate() instead.QueryQuotaRateResponsequeryQuotaRate()Query quota and rate-limit detailSendMessageResponsesendMessage(SendMessageRequest request)已过时。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.SendMessageV2ResponsesendMessage(SendMessageV2Request request)已过时。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.SendMessageV3ResponsesendMessage(SendMessageV3Request request)Send messageStatReceiverResponsestatReceiver(StatReceiverRequest request)Get the statistics about receiving messagevoidupdateQuotaRate(UpdateQuotaRateRequest request)Update quota and rate-limit-
从类继承的方法 com.baidubce.services.sms.SmsClientSupport
assertListNotNullOrEmpty, assertMapNotNullOrEmpty, assertStringArrayNotNullOrEmpty, assertStringNotNullOrEmpty, createGeneralRequest, createRequest, fillRequestPayload
-
从类继承的方法 com.baidubce.AbstractBceClient
computeBktVirEndpoint, computeServiceId, getBktVirEndpoint, getClient, getEndpoint, getServiceId, invokeHttpClient, isRegionSupported, setClient, shutdown
-
-
-
-
构造器详细资料
-
SmsClient
public SmsClient()
Constructs a newSmsClientinstance with default settings.
-
SmsClient
public SmsClient(SmsClientConfiguration config)
Constructs a newSmsClientinstance with the specified configuration.- 参数:
config- the specified configuration, default inherit super classcom.baidubce.BceClientConfiguration- 另请参阅:
SmsClientConfiguration
-
-
方法详细资料
-
sendMessage
@Deprecated public SendMessageResponse sendMessage(SendMessageRequest request)
已过时。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.Send messageTo 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 receiver- 返回:
- The response object which includes the id of message and the statistics of sending result
- 另请参阅:
SendMessageRequest,SendMessageResponse
-
sendMessage
@Deprecated public SendMessageV2Response sendMessage(SendMessageV2Request request)
已过时。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.Send message with parameter SendMessageV2Request
-
sendMessage
public SendMessageV3Response sendMessage(SendMessageV3Request request)
Send messageThe 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 tocom.baidubce.services.sms.model.SendMessageV3Request- 返回:
- refer to
com.baidubce.services.sms.model.SendMessageV3Response
-
queryMessageDetail
public QueryMessageDetailResponse queryMessageDetail(QueryMessageDetailRequest request)
Query message detail- 参数:
request- The request object which includes the id of message to query- 返回:
- The response object which includes all the detail result, for example
id,content,receiver,sendTimeetc - 另请参阅:
QueryMessageDetailRequest,QueryMessageDetailResponse
-
createTemplate
public CreateTemplateResponse createTemplate(CreateTemplateRequest request)
Create message templateThe 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 created- 返回:
- The response object which includes the id of template which is created
- 另请参阅:
CreateTemplateRequest,CreateTemplateResponse
-
createTemplate
public CreateTemplateResponse createTemplate(CreateTemplateRequest request)
Create the template- 参数:
request- refer tocom.baidubce.services.sms.model.v3.CreateTemplateRequest- 返回:
- The response object which indicates the detail of newly created template, refer to
com.baidubce.services.sms.model.v3.CreateTemplateResponse
-
deleteTemplate
public void deleteTemplate(DeleteTemplateRequest request)
Delete message template- 参数:
request- The request object which includes the id of template which is ready to be deleted- 另请参阅:
DeleteTemplateRequest
-
deleteTemplate
public void deleteTemplate(DeleteTemplateRequest request)
Delete the template- 参数:
request- refer tocom.baidubce.services.sms.model.v3.DeleteTemplateRequest
-
getTemplateDetail
@Deprecated public GetTemplateDetailResponse getTemplateDetail(GetTemplateDetailRequest request)
已过时。This method is deprecated and will be removed from sdk in the future when SMS3.0 is officially released, we suggest you to use this.getTemplate(com.baidubce.services.sms.model.v3.GetTemplateRequest) instead.Get the detail of message template- 参数:
request- The request object which includes the id of template which is ready to be get- 返回:
- The response object which includes all of the detail of message template, refer to
com.baidubce.services.sms.model.GetTemplateDetailResponse - 另请参阅:
GetTemplateDetailRequest,GetTemplateDetailResponse
-
listTemplate
public ListTemplateResponse listTemplate(SmsRequest request)
已过时。This method is deprecated and will be removed from sdk in the future when SMS3.0 is officially released, we suggest you to use this.listTemplate(ListTemplateRequest request) instead.Get the list of message template- 参数:
request- The request object which is empty- 返回:
- The response object which includes all of the detail of message template,refer to
com.baidubce.services.sms.model.ListTemplateResponse - 另请参阅:
ListTemplateResponse
-
listTemplate
public ListTemplateResponse listTemplate(ListTemplateRequest request)
Get the list of the templates- 参数:
request- refer tocom.baidubce.services.sms.model.v3.ListTemplateRequest- 返回:
- The response object indicates the list of the template, refer to
com.baidubce.services.sms.model.v3.ListTemplateResponse
-
queryQuota
public QueryQuotaResponse queryQuota(SmsRequest request)
已过时。This method is deprecated and will be removed from sdk in the future when SMS3.0 is officially released, we suggest you to use this.queryQuotaRate() instead.Query the sending quota- 参数:
request- The request object which is empty- 返回:
- The response object which includes the detail of sending quota, refer to
com.baidubce.services.sms.model.QueryQuotaResponse - 另请参阅:
QueryQuotaResponse
-
statReceiver
public StatReceiverResponse statReceiver(StatReceiverRequest request)
Get the statistics about receiving message- 参数:
request- refer tocom.baidubce.services.sms.model.StatReceiverRequest- 返回:
- refer to
com.baidubce.services.sms.model.StatReceiverResponse - 另请参阅:
StatReceiverRequest,StatReceiverResponse
-
createSignature
public CreateSignatureResponse createSignature(CreateSignatureRequest request)
Create the signature- 参数:
request- refer tocom.baidubce.services.sms.model.v3.CreateSignatureRequest- 返回:
- The response object which indicates the detail of newly created signature, refer to
com.baidubce.services.sms.model.v3.CreateSignatureResponse
-
deleteSignature
public void deleteSignature(DeleteSignatureRequest request)
Delete the signature- 参数:
request- refer tocom.baidubce.services.sms.model.v3.DeleteSignatureRequest
-
modifySignature
public void modifySignature(ModifySignatureRequest request)
Modify the signature when audit failure- 参数:
request- refer tocom.baidubce.services.sms.model.v3.ModifySignatureRequest
-
getSignature
public GetSignatureResponse getSignature(GetSignatureRequest request)
Get signature detail info- 参数:
request- refer tocom.baidubce.services.sms.model.v3.GetSignatureRequest- 返回:
- The response object which includes the signature detail info, refer to
com.baidubce.services.sms.model.v3.GetSignatureResponse
-
modifyTemplate
public void modifyTemplate(ModifyTemplateRequest request)
Modify the template when audit failure- 参数:
request- refer tocom.baidubce.services.sms.model.v3.ModifyTemplateRequest
-
getTemplate
public GetTemplateResponse getTemplate(GetTemplateRequest request)
Get template detail info- 参数:
request- refer tocom.baidubce.services.sms.model.v3.GetTemplateRequest- 返回:
- The response object which includes the template detail info, refer to
com.baidubce.services.sms.model.v3.GetTemplateResponse
-
updateQuotaRate
public void updateQuotaRate(UpdateQuotaRateRequest request)
Update quota and rate-limit- 参数:
request- refer tocom.baidubce.services.sms.model.v3.UpdateQuotaRateRequest
-
queryQuotaRate
public QueryQuotaRateResponse queryQuotaRate()
Query quota and rate-limit detail- 返回:
- The response object which includes the detail quota and rate-limit info, refer to
com.baidubce.services.sms.model.v3.QueryQuotaRateResponse
-
listSignature
public ListSignatureResponse listSignature(ListSignatureRequest request)
Get the list of the signatures- 参数:
request- refer tocom.baidubce.services.sms.model.v3.ListSignatureRequest- 返回:
- The response object indicates the list of the template, refer to
com.baidubce.services.sms.model.v3.ListSignatureResponse
-
createMobileBlack
public void createMobileBlack(CreateBlackRequest request)
create mobile black
-
deleteMobileBlack
public void deleteMobileBlack(String phones)
delete mobile black
-
listMobileBlack
public ListBlackResponse listMobileBlack(ListBlackRequest request)
get the list of mobile black
-
-