org.gsm.oneapi.mms
Class MMSRetrieve

java.lang.Object
  extended by org.gsm.oneapi.mms.MMSRetrieve

public class MMSRetrieve
extends java.lang.Object


Field Summary
static boolean dumpRequestAndResponse
           
 
Constructor Summary
MMSRetrieve(ServiceEndpoints endPoints, java.lang.String authorisationHeader)
          Creates a new instance of the Receive MMS API main interface.
 
Method Summary
 int cancelReceiptNotifications(java.lang.String subscriptionId)
          Stop subscribing to message receipt notifications for all your received SMS
 RetrieveMMSMessageResponse retrieveMessageContent(java.lang.String registrationId, java.lang.String messageId, java.lang.String resFormat)
          Retrieve the full contents of an MMS message (including attachments) sent to your Web application
 RetrieveMMSResponse retrieveMessages(java.lang.String registrationId, int maxBatchSize)
          Retrieve a list of MMS messages sent to your Web application
 void setAuthorisationHeader(java.lang.String authorisationHeader)
          Can be used to update the service authorisation header
 void setEndpoints(ServiceEndpoints endPoints)
          Can be used to update the service endpoints
 MMSMessageReceiptSubscriptionResponse subscribeToReceiptNotifications(java.lang.String destinationAddress, java.lang.String notifyURL, java.lang.String criteria, java.lang.String notificationFormat, java.lang.String clientCorrelator, java.lang.String callbackData)
          Start subscribing to notifications of MMS messages sent to your application
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dumpRequestAndResponse

public static boolean dumpRequestAndResponse
Constructor Detail

MMSRetrieve

public MMSRetrieve(ServiceEndpoints endPoints,
                   java.lang.String authorisationHeader)
Creates a new instance of the Receive MMS API main interface. Requires endPoints to define the URL targets of the various Receive MMS network calls and authorisationHeader containing the username/password used for HTTP Basic authorisation with the OneAPI server.

Parameters:
endPoints - contains a set of service/ call specific endpoints
authorisationHeader - Base 64 encoded username/ password
See Also:
ServiceEndpoints, JSONRequest.getAuthorisationHeader(String, String)
Method Detail

setEndpoints

public void setEndpoints(ServiceEndpoints endPoints)
Can be used to update the service endpoints

Parameters:
endPoints - contains a set of service/ call specific endpoints
See Also:
ServiceEndpoints

setAuthorisationHeader

public void setAuthorisationHeader(java.lang.String authorisationHeader)
Can be used to update the service authorisation header

Parameters:
authorisationHeader - Base 64 encoded username/ password
See Also:
JSONRequest.getAuthorisationHeader(String, String)

retrieveMessages

public RetrieveMMSResponse retrieveMessages(java.lang.String registrationId,
                                            int maxBatchSize)
Retrieve a list of MMS messages sent to your Web application

Parameters:
registrationId - (mandatory) is agreed with your network operator for receiving messages
maxBatchSize - (mandatory) is the maximum number of messages to retrieve in this request
See Also:
RetrieveMMSResponse

retrieveMessageContent

public RetrieveMMSMessageResponse retrieveMessageContent(java.lang.String registrationId,
                                                         java.lang.String messageId,
                                                         java.lang.String resFormat)
Retrieve the full contents of an MMS message (including attachments) sent to your Web application

Parameters:
registrationId - (mandatory) is agreed with your network operator for receiving messages
messageId - (mandatory) is the messageId obtained from the {link retrieveMessages} function
resFormat - (mandatory) specifies the response format required. The only permitted value for verions 1 of OneAPI is 'JSON' ensuring a JSON Content-Type
See Also:
RetrieveMMSMessageResponse

subscribeToReceiptNotifications

public MMSMessageReceiptSubscriptionResponse subscribeToReceiptNotifications(java.lang.String destinationAddress,
                                                                             java.lang.String notifyURL,
                                                                             java.lang.String criteria,
                                                                             java.lang.String notificationFormat,
                                                                             java.lang.String clientCorrelator,
                                                                             java.lang.String callbackData)
Start subscribing to notifications of MMS messages sent to your application

Parameters:
destinationAddress - (mandatory) is the address/ MSISDN, or code agreed with the operator, to which people may send an MMS to your application
notifyURL - (mandatory) is the URL to which you would like a notification of message receipts sent
criteria - (optional) is case-insensitve text to match against the first word of the message, ignoring any leading whitespace. This allows you to reuse a short code among various applications, each of which can register their own subscription with different criteria
notificationFormat - (optional) is the content type that notifications will be sent in Ð for OneAPI v1.0 only JSON is supported
clientCorrelator - (optional) uniquely identifies this create subscription request. If there is a communication failure during the request, using the same clientCorrelator when retrying the request allows the operator to avoid creating a duplicate subscription
callbackData - (optional) is a function name or other data that you would like included when the POST is sent to your application
See Also:
MMSMessageReceiptSubscriptionResponse

cancelReceiptNotifications

public int cancelReceiptNotifications(java.lang.String subscriptionId)
Stop subscribing to message receipt notifications for all your received SMS

Parameters:
subscriptionId - (mandatory) contains the subscriptionId of a previously created SMS message receipt subscription