oracle.panama.messaging.xms
Interface XMSSender
- All Superinterfaces:
- XMSSimpleSender
- public interface XMSSender
- extends XMSSimpleSender
XMSSender is a full-featured XMS messaging client.
Methods inherited from interface oracle.panama.messaging.xms.XMSSimpleSender |
addDeliveryType, getStatus, getStatus, getSupportedTransports, getVersion, sendMsg, sendMsg, sendMsg, sendMsg, setProxy, setProxy |
getStatus
public Status getStatus(WorkOrder workOrder)
throws XMSException
- Get current status of a work order. One work order has one address and the message ID of that address.
-
- Throws:
XMSException
getStatus
public Status[] getStatus(WorkOrder[] workOrders)
throws XMSException
- Get current status of a set of work orders.
-
- Throws:
XMSException
removeStatusListener
public void removeStatusListener()
throws XMSException
- Unregister the status listener if any is registered.
(This feature is not implemented in this release.)
-
- Throws:
XMSException
sendMsg
public WorkOrder[] sendMsg(Packet pkt)
throws XMSException
- This method is based on send() with supports of failover capability and username capability.
User name capability means that the sender can specify a username (instead of physical address of a recipient) and preferred delivery types to send out a message. Sender and reply to addresses can be existing users too.
For example: send an email to user 'michael' from user 'richard'. That user name must be registered and the specified device must be available in that user's profile.
Failover means that each recipient may have an "address chain". Each node of the chain has one address (i.e. a user name, an email address, a phone number or a WAP push subscriber ID) and a list of preferred transport types (primary transport type and failover transport types) of that address. XMSServer will try every address and every transport type of that address from the head of the chain until (1) message has been delivered to an address by a transport type of that address or (2) all addresses and their transport types have been tried.
If a physical address (i.e. phone number, email address or WAP push subscriber ID) is given, it will be used directly. If a username is given, XMSServer will find physical addresses from user's profile.
Device failover example: Send a message to Michael's cell phone # 1-234-1234567 via SMS or voice, if both fail, send a voice message to his work number 1-222-3456789. If fails, send an email to his manager's email address paul@company.com
User failover example: contact Michael via SMS, Voice or email. If can't get him, Send a voice or email message to his manager, Paul.
Same address failover:
Failover could happen within same user or same physical device from a transport types (delivery types) to another different transport type in the transport type order specified.
For example: send a SMS to phone number 1-234-5551234, if failed, try voice.
It could happen to a user too. For example: send a voice msg to Sam's work phone, if failed, try his cell phone and pager.
Failover to another address:
If all transport types (delivery types) of an address have been tried and failed and another address is specified as its failover address, the second address is used in further attempts.
A user may fail to another user or a physical address. A physical address may fail to anther physical address or a user.
The maximum number of failover devices is limited to 4. A failover device means a physical address (user name will be converted to physical address by the server) and a transport type combination. If more failover address or transport types have been specified than maximum failover devices, only the first maximum devices are considered. Rest will not be used.
Please see Packet and AddressData classes for more details on how to define failover transport types and failover address.
-
- Parameters:
pkt
- The message packet to be delivered.
- Returns:
- a set of WorkOrders will be returned after XMS server accepts the request. One WorkOrder for each instance of recipient's address. The order of WorkOrders may be NOT the same as the order of recipients being added into the Packet by calling Packet.addRecipients().
- Throws:
XMSException
setStatusListener
public void setStatusListener(StatusListener statusListener)
throws XMSException
- Set status listener for this XMSSender
-
- Parameters:
statusListener
- the status listener.
- Throws:
XMSException
setStatusListener
public void setStatusListener(StatusListener statusListener,
java.lang.String callbackHost,
int callbackPort)
throws XMSException
- Set status listener for this XMSSender
-
- Parameters:
statusListener
- the status listener.
- Throws:
XMSException
Copyright © 2004 Oracle Corporation. All Rights Reserved.