Oracle Application Server Wireless Java API Reference
B10400-01

oracle.panama.messaging.xms
Interface XMSSimpleSender

All Known Subinterfaces:
XMSSender
All Known Implementing Classes:
XMSSenderImpl, XMSSimpleSenderImpl

public interface XMSSimpleSender

Field Summary
static java.lang.String VERSION_NUMBER
           

 

Method Summary
 void addDeliveryType(java.lang.String deliveryType, java.lang.String returnAddress)
          Add a delivery type to use for sending.
 java.lang.String getStatus(java.lang.String messageID)
          Get current status of one message ID
 java.lang.String[] getStatus(java.lang.String[] messageIDs)
          Get current status of a set of message IDs.
 java.lang.String[] getSupportedTransports()
          Get names of available transports from the underlying Push server.
 java.lang.String getVersion()
          Get version of XMS API.
 java.lang.String[] sendMsg(java.lang.String[] recipients, java.lang.String subject, org.w3c.dom.Document message)
          Send the message.
 java.lang.String[] sendMsg(java.lang.String[] recipients, java.lang.String subject, java.lang.String message)
          Send the message.
 java.lang.String[] sendMsg(java.lang.String[] recipients, java.lang.String subject, java.net.URL messageURL)
          Send the message.
 void setProxy(java.lang.String host, int port)
          Set the HTTP proxy to use.

 

Field Detail

VERSION_NUMBER

public static final java.lang.String VERSION_NUMBER
See Also:
Constant Field Values
Method Detail

addDeliveryType

public void addDeliveryType(java.lang.String deliveryType,
                            java.lang.String returnAddress)
Add a delivery type to use for sending. This method should be called for each delivery type that XMS should use when sending messages.

Example:

// want to send messages as email or SMS xmsSender = XMSFactory.createXMSSender(); xmsSender.addDeliveryType(DeliveryType.EMAIL.getName(), "someone@oracle.com"); xmsSender.addDeliveryType(DeliveryType.SMS.getName(), "16505766372");
Parameters:
deliveryType - the delivery type is the channel will be used.

getStatus

public java.lang.String[] getStatus(java.lang.String[] messageIDs)
                             throws XMSException
Get current status of a set of message IDs. webmethod
XMSException

sendMsg

public java.lang.String[] sendMsg(java.lang.String[] recipients,
                                  java.lang.String subject,
                                  java.lang.String message)
                           throws XMSException
Send the message.
Parameters:
recipients - List of users to send message to. Each user can either be a Wireless user name or a fully-qualified address such as Email:thomas.wilsher@oracle.com. If just a panama user is specified that user is looked up and the message is sent to the 'best' device for that user. If the latter (explicit) form is used then the specified delivery type will be used
subject - subject to use for the message
message - the MobileXML (XHTML+) message to send out, as a String
XMSException

sendMsg

public java.lang.String[] sendMsg(java.lang.String[] recipients,
                                  java.lang.String subject,
                                  java.net.URL messageURL)
                           throws XMSException
Send the message.
Parameters:
recipients - List of users to send message to. Each user can either be a Wireless user name or a fully-qualified address such as Email:thomas.wilsher@oracle.com. If just a panama user is specified that user is looked up and the message is sent to the 'best' device for that user. If the latter (explicit) form is used then the specified delivery type will be used
subject - subject to use for the message
messageURL - the URL to get message contents from.
XMSException

sendMsg

public java.lang.String[] sendMsg(java.lang.String[] recipients,
                                  java.lang.String subject,
                                  org.w3c.dom.Document message)
                           throws XMSException
Send the message.
Parameters:
recipients - List of users to send message to. Each user can either be a Wireless user name or a fully-qualified address such as Email:thomas.wilsher@oracle.com. If just a panama user is specified that user is looked up and the message is sent to the 'best' device for that user. If the latter (explicit) form is used then the specified delivery type will be used
subject - subject to use for the message
message - the MobileXML (XHTML+) message to send out, as a DOM Document
XMSException

setProxy

public void setProxy(java.lang.String host,
                     int port)
Set the HTTP proxy to use. If XMS client machine is inside firewall and XMS Server is outside firewall, user may need to tell XMS client his/her HTTP proxy settings.
DO NOT set proxy if:
- XMS server is on Internet and XMS client machine connects to internet directly
- they both on the same intranet
- local installation
Parameters:
host - host name of proxy For example: proxy.company.com
port - port number of the proxy. For example: 80

getVersion

public java.lang.String getVersion()
Get version of XMS API.

getSupportedTransports

public java.lang.String[] getSupportedTransports()
                                          throws XMSException
Get names of available transports from the underlying Push server. Use this method to get what kinds of transports the Push server supports. For example: if the return values are: "SMS","email". You may only send SMS and email messages through this gateway.
XMSException

getStatus

public java.lang.String getStatus(java.lang.String messageID)
                           throws XMSException
Get current status of one message ID
Returns:
a status string like this: "Message has been delivered successfully."
XMSException

Oracle Application Server Wireless Java API Reference
B10400-01

Copyright © 2003 Oracle Corporation. All Rights Reserved.