public class SMSMessagingClientImpl extends OneAPIBaseClientImpl implements SMSMessagingClient
CHARSET, JSON_CONTENT_TYPE, LOGGER, URL_ENCODED_CONTENT_TYPE| Constructor and Description |
|---|
SMSMessagingClientImpl(Configuration configuration) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPullDeliveryReportListener(DeliveryReportListener listener)
Add OneAPI PULL 'Delivery Reports' listener
|
void |
addPullInboundMessageListener(InboundMessageListener listener)
Add OneAPI PULL 'INBOUND Messages' listener
Messages are pulled automatically depending on the 'inboundMessagesRetrievingInterval' client configuration parameter
|
void |
addPushDeliveryStatusNotificationListener(DeliveryStatusNotificationsListener listener)
Add OneAPI PUSH 'Delivery Status' Notifications listener and start push server simulator
|
void |
addPushInboundMessageListener(InboundMessageNotificationsListener listener)
Add OneAPI PUSH 'INBOUND Messages' Notifications listener and start push server simulator
|
DeliveryInfoNotification |
convertJsonToDeliveryInfoNotification(String json)
Convert JSON to Delivery Info Notification
|
InboundSMSMessageList |
convertJsonToInboundSMSMessageNotificationExample(String json)
Convert JSON to Inbound SMS Message Notification
|
DeliveryReportSubscription |
getDeliveryNotificationsSubscriptionById(String subscriptionId)
Get delivery notifications subscriptions by subscription id
|
DeliveryReportSubscription[] |
getDeliveryNotificationsSubscriptions()
Get delivery notifications subscriptions by for the current user
|
DeliveryReportSubscription[] |
getDeliveryNotificationsSubscriptionsBySender(String senderAddress)
Get delivery notifications subscriptions by sender address
|
List<DeliveryReportListener> |
getDeliveryReportPullListeners()
Returns Delivery Reports PULL Listeners list
|
DeliveryReportList |
getDeliveryReports()
Get delivery reports
|
DeliveryReportList |
getDeliveryReports(int limit)
Get delivery reports
|
void |
getDeliveryReportsAsync(int limit,
ResponseListener<DeliveryReportList> responseListener)
Get delivery reports asynchronously
|
void |
getDeliveryReportsAsync(ResponseListener<DeliveryReportList> responseListener)
Get delivery reports asynchronously
|
DeliveryReportList |
getDeliveryReportsByRequestId(String requestId)
Get delivery reports by Request Id
|
DeliveryReportList |
getDeliveryReportsByRequestId(String requestId,
int limit)
Get delivery reports by Request Id
|
List<DeliveryStatusNotificationsListener> |
getDeliveryStatusNotificationPushListeners()
Returns Delivery Status Notifications PUSH Listeners list
|
List<InboundMessageListener> |
getInboundMessagePullListeners()
Returns INBOUND Message PULL Listeners list
|
List<InboundMessageNotificationsListener> |
getInboundMessagePushListeners()
Returns INBOUND Message Notifications PUSH Listeners list
|
InboundSMSMessageList |
getInboundMessages()
Get SMS messages sent to your Web application over OneAPI using default 'maxBatchSize' = 100
|
InboundSMSMessageList |
getInboundMessages(int maxBatchSize)
Get SMS messages sent to your Web application over OneAPI
|
void |
getInboundMessagesAsync(int maxBatchSize,
ResponseListener<InboundSMSMessageList> responseListener)
Get asynchronously SMS messages sent to your Web application over OneAPI
|
void |
getInboundMessagesAsync(ResponseListener<InboundSMSMessageList> responseListener)
Get asynchronously SMS messages sent to your Web application over OneAPI
|
MoSubscription[] |
getInboundMessagesNotificationsSubscriptions()
Get inbound messages notifications subscriptions for the current user
|
MoSubscription[] |
getInboundMessagesNotificationsSubscriptions(int page,
int pageSize)
Get inbound messages notifications subscriptions for the current user
|
MoNumberType[] |
getMoNumberTypes()
Get MO Number Types
|
DeliveryInfoList |
queryDeliveryStatus(String senderAddress,
String requestId)
Query the delivery status over OneAPI for an SMS sent to one or more mobile terminals
|
void |
queryDeliveryStatusAsync(String senderAddress,
String requestId,
ResponseListener<DeliveryInfoList> responseListener)
Query the delivery status asynchronously over OneAPI for an SMS sent to one or more mobile terminals
|
void |
removeDeliveryNotificationsSubscription(String subscriptionId)
Stop subscribing to delivery status notifications over OneAPI for all your sent SMS
|
void |
removeInboundMessagesSubscription(String subscriptionId)
Stop subscribing to message receipt notifications for all your received SMS over OneAPI
|
void |
removePullDeliveryReportListeners()
Remove PULL Delivery Reports listeners and stop retriever
|
void |
removePullInboundMessageListeners()
Remove PULL INBOUND Messages listeners and stop retriever
|
void |
removePushDeliveryStatusNotificationListeners()
Remove PUSH Delivery Reports Notifications listeners and stop server
|
void |
removePushInboundMessageListeners()
Remove PUSH Delivery Reports Notifications listeners and stop server
|
SendMessageResult |
sendSMS(SMSRequest smsRequest)
Send an SMS over OneAPI to one or more mobile terminals using the customized 'SMSRequest' object
|
void |
sendSMSAsync(SMSRequest smsRequest,
ResponseListener<SendMessageResult> responseListener)
Send an SMS asynchronously over OneAPI to one or more mobile terminals using the customized 'SMSRequest' object
|
String |
subscribeToDeliveryStatusNotifications(SubscribeToDeliveryNotificationsRequest subscribeToDeliveryNotificationsRequest)
Start subscribing to delivery status notifications over OneAPI for all your sent SMS
|
String |
subscribeToInboundMessagesNotifications(SubscribeToInboundMessagesRequest subscribeToInboundMessagesRequest)
Start subscribing to notifications of SMS messages sent to your application over OneAPI
|
convertJSONToObject, convertJSONToObject, encodeURLParam, executeMethod, executeMethod, executeMethodAsync, getConfiguration, getIdFromResourceUrlpublic SMSMessagingClientImpl(Configuration configuration)
public SendMessageResult sendSMS(SMSRequest smsRequest)
sendSMS in interface SMSMessagingClientsmsRequest - (mandatory) object containing data needed to be filled in order to send the SMSpublic void sendSMSAsync(SMSRequest smsRequest, ResponseListener<SendMessageResult> responseListener)
sendSMSAsync in interface SMSMessagingClientsmsRequest - (mandatory) object containing data needed to be filled in order to send the SMSresponseListener - (mandatory) method to call after receiving sent SMS responsepublic DeliveryInfoList queryDeliveryStatus(String senderAddress, String requestId)
queryDeliveryStatus in interface SMSMessagingClientsenderAddress - (mandatory) is the address from which SMS messages are being sent. Do not URL encode this value prior to passing to this functionrequestId - (mandatory) contains the requestId returned from a previous call to the sendSMS functionpublic void queryDeliveryStatusAsync(String senderAddress, String requestId, ResponseListener<DeliveryInfoList> responseListener)
queryDeliveryStatusAsync in interface SMSMessagingClientsenderAddress - (mandatory) is the address from which SMS messages are being sent. Do not URL encode this value prior to passing to this functionrequestId - (mandatory) contains the requestId returned from a previous call to the sendSMS functionresponseListener - (mandatory) method to call after receiving delivery statuspublic DeliveryInfoNotification convertJsonToDeliveryInfoNotification(String json)
convertJsonToDeliveryInfoNotification in interface SMSMessagingClientpublic String subscribeToDeliveryStatusNotifications(SubscribeToDeliveryNotificationsRequest subscribeToDeliveryNotificationsRequest)
subscribeToDeliveryStatusNotifications in interface SMSMessagingClientsubscribeToDeliveryNotificationsRequest - (mandatory) contains delivery notifications subscription datapublic DeliveryReportSubscription[] getDeliveryNotificationsSubscriptionsBySender(String senderAddress)
getDeliveryNotificationsSubscriptionsBySender in interface SMSMessagingClientpublic DeliveryReportSubscription getDeliveryNotificationsSubscriptionById(String subscriptionId)
getDeliveryNotificationsSubscriptionById in interface SMSMessagingClientpublic DeliveryReportSubscription[] getDeliveryNotificationsSubscriptions()
getDeliveryNotificationsSubscriptions in interface SMSMessagingClientpublic void removeDeliveryNotificationsSubscription(String subscriptionId)
removeDeliveryNotificationsSubscription in interface SMSMessagingClientsubscriptionId - (mandatory) contains the subscriptionId of a previously created SMS delivery receipt subscriptionpublic InboundSMSMessageList getInboundMessages()
getInboundMessages in interface SMSMessagingClientpublic InboundSMSMessageList getInboundMessages(int maxBatchSize)
getInboundMessages in interface SMSMessagingClientmaxBatchSize - (optional) is the maximum number of messages to get in this requestpublic void getInboundMessagesAsync(ResponseListener<InboundSMSMessageList> responseListener)
getInboundMessagesAsync in interface SMSMessagingClientresponseListener - (mandatory) method to call after receiving inbound messagespublic void getInboundMessagesAsync(int maxBatchSize,
ResponseListener<InboundSMSMessageList> responseListener)
getInboundMessagesAsync in interface SMSMessagingClientmaxBatchSize - (optional) is the maximum number of messages to get in this requestresponseListener - (mandatory) method to call after receiving inbound messagespublic InboundSMSMessageList convertJsonToInboundSMSMessageNotificationExample(String json)
convertJsonToInboundSMSMessageNotificationExample in interface SMSMessagingClientpublic String subscribeToInboundMessagesNotifications(SubscribeToInboundMessagesRequest subscribeToInboundMessagesRequest)
subscribeToInboundMessagesNotifications in interface SMSMessagingClientsubscribeToInboundMessagesRequest - (mandatory) contains inbound messages subscription datapublic MoSubscription[] getInboundMessagesNotificationsSubscriptions(int page, int pageSize)
getInboundMessagesNotificationsSubscriptions in interface SMSMessagingClientpublic MoSubscription[] getInboundMessagesNotificationsSubscriptions()
getInboundMessagesNotificationsSubscriptions in interface SMSMessagingClientpublic void removeInboundMessagesSubscription(String subscriptionId)
removeInboundMessagesSubscription in interface SMSMessagingClientsubscriptionId - (mandatory) contains the subscriptionId of a previously created SMS message receipt subscriptionpublic MoNumberType[] getMoNumberTypes()
getMoNumberTypes in interface SMSMessagingClientpublic DeliveryReportList getDeliveryReports(int limit)
getDeliveryReports in interface SMSMessagingClientpublic void getDeliveryReportsAsync(int limit,
ResponseListener<DeliveryReportList> responseListener)
getDeliveryReportsAsync in interface SMSMessagingClientresponseListener - (mandatory) method to call after receiving delivery reportspublic DeliveryReportList getDeliveryReports()
getDeliveryReports in interface SMSMessagingClientpublic void getDeliveryReportsAsync(ResponseListener<DeliveryReportList> responseListener)
getDeliveryReportsAsync in interface SMSMessagingClientresponseListener - (mandatory) method to call after receiving delivery reportspublic DeliveryReportList getDeliveryReportsByRequestId(String requestId, int limit)
getDeliveryReportsByRequestId in interface SMSMessagingClientpublic DeliveryReportList getDeliveryReportsByRequestId(String requestId)
getDeliveryReportsByRequestId in interface SMSMessagingClientpublic void addPullDeliveryReportListener(DeliveryReportListener listener)
addPullDeliveryReportListener in interface SMSMessagingClientlistener - - (new DeliveryReportListener)public void addPullInboundMessageListener(InboundMessageListener listener)
addPullInboundMessageListener in interface SMSMessagingClientlistener - - (new InboundMessageListener)public List<InboundMessageListener> getInboundMessagePullListeners()
getInboundMessagePullListeners in interface SMSMessagingClientpublic List<DeliveryReportListener> getDeliveryReportPullListeners()
getDeliveryReportPullListeners in interface SMSMessagingClientpublic void removePullDeliveryReportListeners()
removePullDeliveryReportListeners in interface SMSMessagingClientpublic void removePullInboundMessageListeners()
removePullInboundMessageListeners in interface SMSMessagingClientpublic void addPushDeliveryStatusNotificationListener(DeliveryStatusNotificationsListener listener)
addPushDeliveryStatusNotificationListener in interface SMSMessagingClientpublic void addPushInboundMessageListener(InboundMessageNotificationsListener listener)
addPushInboundMessageListener in interface SMSMessagingClientpublic List<DeliveryStatusNotificationsListener> getDeliveryStatusNotificationPushListeners()
getDeliveryStatusNotificationPushListeners in interface SMSMessagingClientpublic List<InboundMessageNotificationsListener> getInboundMessagePushListeners()
getInboundMessagePushListeners in interface SMSMessagingClientpublic void removePushDeliveryStatusNotificationListeners()
removePushDeliveryStatusNotificationListeners in interface SMSMessagingClientpublic void removePushInboundMessageListeners()
removePushInboundMessageListeners in interface SMSMessagingClientCopyright © 2014. All rights reserved.