oracle.sdp.messaging
Interface StatusListener
public interface StatusListener
The status listener interface. A status listener must implement this
interface and register itself to Messaging to asynchronously receive statuses.
- Since:
- 11.0.0
Method Summary |
void |
onStatus(Status status)
Callback method to receive status updates. |
onStatus
void onStatus(Status status)
throws ApplicationNotReadyException,
MessagingException
- Callback method to receive status updates. This method must be
implemented by the Messaging Client in order to get asynchronized status
updates.
The sequence of the statuses of the same delivery channel or multiple
channels of same recipient is NOT guaranteed due to network latencies and
other factors. Client program must reorder statuses of same message ID
and original message ID by their timestamps.
Example 1: Delivery statuses of same delivery channel
A page is sent to a two-way pager. Here is the sequence of events:
1. Msg is sent to paging company's gateway (Timestamp: 1000)
2. Msg is sent to the pager (Timestamp 1005)
3. User reads the message (Timestamp 1020)
4. User replies the message (Timestamp 1022)
That sequence could be broken when all these statuses reach this status
listener
1. Msg is sent to paging company's gateway (Timestamp: 1000)
2. User replies the message (Timestamp 1022)
3. User reads the message (Timestamp 1020)
4. Msg is sent to the pager (Timestamp 1005)
Example 2: Multiple channels of the same recipient. Let's assume the
recipient has SMS as primary channel and pager as failover channel. Push
Server sents out following statuses to push client callback listener:
1. Msg is sent to SMS gateway. (Timestamp 1000)
2. Msg is sent to the SMS phone. (Timestamp 1001)
3. Primary channel timeout. (Timestamp 1060)
4. Msg is sent to pager. (Timestamp 1070)
5. Pager channel timeout. (Timestamp 1090)
6. Delivery to that recipient failed, because no replies are received.
(Timestamp 1091)
7. Pager replies the message 3 minutes later. (Timestamp 1174)
8. The message has been delivered to the recipient successfully.
(Timestamp 1180)
But, statuses are delivered to client in following order:
1. Msg is sent to SMS gateway. (Timestamp 1000)
2. Msg is sent to the SMS phone. (Timestamp 1001)
3. Pager replies the message 3 minutes later. (Timestamp 1174)
4. SMS channel timeout. (Timestamp 1060)
5. Msg is sent to pager. (Timestamp 1070)
6. The message has been delivered to the recipient successfully.
(Timestamp 1180)
7. Pager channel timeout. (Timestamp 1090)
8. Delivery to that recipient failed, because no replies are received.
(Timestamp 1091)
- Parameters:
status
- the status sent to the listener.
- Throws:
ApplicationNotReadyException
- if thrown by the listener, Messaging (the
client-side MDB) will attempt to redeliver this status. Thus, an
application can throw this exception in situations where it is
not yet ready to process statuses.
There is a nominal retry interval of a few seconds between
redelivery attempts. The number of retry attempts is configurable
via the client-side MDB's MaxDeliveryCnt configuration property.
MessagingException
Copyright © 2009 Oracle and/or its affiliates. All rights reserved.