org.gsm.oneapi.mms
Class MMSSend

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

public class MMSSend
extends java.lang.Object


Field Summary
static boolean dumpRequestAndResponse
           
 
Constructor Summary
MMSSend(ServiceEndpoints endPoints, java.lang.String authorisationHeader)
          Creates a new instance of the Send MMS API main interface.
 
Method Summary
 int cancelDeliveryNotifications(java.lang.String subscriptionId)
          Stop subscribing to delivery status notifications for all your sent MMS
 MMSSendDeliveryStatusResponse queryDeliveryStatus(java.lang.String senderAddress, java.lang.String requestId)
          Query the delivery status for an MMS sent to one or more mobile terminals
 MMSSendResponse sendMMS(java.lang.String senderAddress, java.lang.String[] address, java.lang.String message, java.util.ArrayList<org.apache.commons.fileupload.FileItem> attachments, java.lang.String senderName, java.lang.String clientCorrelator, java.lang.String notifyURL, java.lang.String callbackData)
          Send an MMS to one or more mobile terminals
 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
 MMSDeliveryReceiptSubscriptionResponse subscribeToDeliveryNotifications(java.lang.String senderAddress, java.lang.String clientCorrelator, java.lang.String notifyURL, java.lang.String callbackData)
          Start subscribing to delivery status notifications for all your sent MMS
 
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

MMSSend

public MMSSend(ServiceEndpoints endPoints,
               java.lang.String authorisationHeader)
Creates a new instance of the Send MMS API main interface. Requires endPoints to define the URL targets of the various Send 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)

sendMMS

public MMSSendResponse sendMMS(java.lang.String senderAddress,
                               java.lang.String[] address,
                               java.lang.String message,
                               java.util.ArrayList<org.apache.commons.fileupload.FileItem> attachments,
                               java.lang.String senderName,
                               java.lang.String clientCorrelator,
                               java.lang.String notifyURL,
                               java.lang.String callbackData)
Send an MMS to one or more mobile terminals

Parameters:
senderAddress - (mandatory) is the address to whom a responding MMS may be sent. Do not URL encode this value prior to passing to this function
address - (mandatory) contains at least one address for each end user ID to send to; in this case their MSISDN including the Ôtel:Õ protocol identifier and the country code preceded by Ô+Õ. i.e., tel:+16309700001. OneAPI also supports the Anonymous Customer Reference (ACR) if provided by the operator.
message - (mandatory) contains the message text to send
senderName - (mandatory) is the name to appear on the userÕs terminal as the sender of the message
attachments - (optional) contains a list of attachments to be sent along with this MMS request
clientCorrelator - (optional) uniquely identifies this create MMS request. If there is a communication failure during the request, using the same clientCorrelator when retrying the request allows the operator to avoid sending the same MMS twice.
notifyURL - (optional) is the URL to which you would like a notification of delivery sent
callbackData - (optional) will be passed back to the notifyURL location, so you can use it to identify the message the receipt relates to (or any other useful data, such as a function name)
See Also:
MMSSendResponse

queryDeliveryStatus

public MMSSendDeliveryStatusResponse queryDeliveryStatus(java.lang.String senderAddress,
                                                         java.lang.String requestId)
Query the delivery status for an MMS sent to one or more mobile terminals

Parameters:
senderAddress - (mandatory) is the address from which MMS messages are being sent. Do not URL encode this value prior to passing to this function
requestId - (mandatory) contains the requestId returned from a previous call to the sendMMS function
See Also:
MMSSendDeliveryStatusResponse

subscribeToDeliveryNotifications

public MMSDeliveryReceiptSubscriptionResponse subscribeToDeliveryNotifications(java.lang.String senderAddress,
                                                                               java.lang.String clientCorrelator,
                                                                               java.lang.String notifyURL,
                                                                               java.lang.String callbackData)
Start subscribing to delivery status notifications for all your sent MMS

Parameters:
senderAddress - (mandatory) is the address from which MMS messages are being sent. Do not URL encode this value prior to passing to this function
notifyURL - (mandatory) is the URL to which you would like a notification of delivery sent
clientCorrelator - (optional) uniquely identifies this subscription request. If there is a communication failure during the request, using the same clientCorrelator when retrying the request allows the operator to avoid setting up the same subscription twice.
callbackData - (optional) will be passed back to the notifyURL location, so you can use it to identify the message the delivery receipt relates to (or any other useful data, such as a function name)
See Also:
MMSDeliveryReceiptSubscriptionResponse

cancelDeliveryNotifications

public int cancelDeliveryNotifications(java.lang.String subscriptionId)
Stop subscribing to delivery status notifications for all your sent MMS

Parameters:
subscriptionId - (mandatory) contains the subscriptionId of a previously created MMS delivery receipt subscription