UMDS .NET API
6.14
|
Class to receive persisted messages by a topic or wildcard receiver. More...
Public Member Functions | |
UMDSPersistentReceiver (UMDSServerConnection sconn, String topic, Boolean iswildcard, UMDSReceiverRecoveryInfoCallback receiverRecoveryInfoCb, Object receiverRecoveryInfoCbArg) | |
This constructor creates a receiver or wildcard persistent receiver object on a UMDS connection as per iswildcard param. More... | |
virtual void | onMessage (UMDSMessage msg) |
Message Delivery function. This is called to deliver messages to the application. More... | |
override void | onEvent (UMDSMessage msg) |
Event Notification function. This function is called when non-data events occur, E.G. Loss reported by the server. More... | |
override void | onRequest (UMDSMessage msg) |
Callback for request messages received. This functionality is not implemented for persistence at this time. Do not use. More... | |
void | close () |
Close this receiver. More... | |
virtual void | log (int level, System.String comment) |
Log a receiver related message. This API currently does nothing unique, but is provided as an aid to users deriving from the class but may in the future be updated to identify the receiver automatically. More... | |
Object | getReceiverRecoveryInfoCbArg () |
Class to receive persisted messages by a topic or wildcard receiver.
There are three callbacks to the user code: persistence information, non-message events, and messages. To use this class, applications typically define their own class derived from this one, providing their own onMessage() and onEvent() functions. UMDS will call those methods asynchronously as needed.
In addition, a persistence recovery information callback is available. Applications define their own callback class derived from the UMDSReceiverRecoveryInfoCallback template. When the UMDS associates a persistent Ultra Messaging source with this client receiver, it invokes the UMDSReceiverRecoveryInfoCallback::setReceiverRecoverySequenceNumber() method to give the application access to persistence information.
For more information, see Using UMDS Persistence.
com.latencybusters.umds.UMDSPersistentReceiver.UMDSPersistentReceiver | ( | UMDSServerConnection | sconn, |
String | topic, | ||
Boolean | iswildcard, | ||
UMDSReceiverRecoveryInfoCallback | receiverRecoveryInfoCb, | ||
Object | receiverRecoveryInfoCbArg | ||
) |
This constructor creates a receiver or wildcard persistent receiver object on a UMDS connection as per iswildcard param.
UMDSException |
sconn | The server connection object this receiver is associated with. This explicitly ties the receiver to a server. |
topic | The topic string to subscribe. |
iswildcard | Indicates this receiver is a wildcard pattern |
receiverRecoveryInfoCb | Optional callback object invoked by UMDS to deliver persistence information by calling the user's UMDSReceiverRecoveryInfoCallback::setReceiverRecoverySequenceNumber() implementation. If this callback is not needed, pass null. |
receiverRecoveryInfoCbArg | Optional arbitrary application object that UMDS will pass to the application's receiverRecoveryInfoCb callback. If not needed, pass null. |
void com.latencybusters.umds.UMDSPersistentReceiver.close | ( | ) |
Close this receiver.
This method initiates the close operation, but UMDS will continue to deliver queued messages before the close is completed. When the receiver is fully closed, the UMDSMessage.MSG_TYPE.RECEIVER_DELETE event will be delivered to onEvent().
UMDSException | When the receiver could not be cleanly deleted |
|
virtualinherited |
Log a receiver related message. This API currently does nothing unique, but is provided as an aid to users deriving from the class but may in the future be updated to identify the receiver automatically.
the UMDS exception
UMDSException |
References com.latencybusters.umds.UMDS.log(), and com.latencybusters.umds.UMDSServerConnection.UMDS.
|
virtual |
Event Notification function. This function is called when non-data events occur, E.G. Loss reported by the server.
This can be overridden by applications, if desired.
Expected message types:
msg | The message containing the event |
Implements com.latencybusters.umds.UMDSReceiverBase.
References com.latencybusters.umds.UMDSMessage.MSG_STATUS.CLOSE_PENDING, com.latencybusters.umds.UMDSMessage.MSG_TYPE.DISCONNECT, com.latencybusters.umds.UMDSMessage.MSG_TYPE.LOSS, com.latencybusters.umds.UMDSMessage.MSG_TYPE.RECEIVER_CREATE, com.latencybusters.umds.UMDSMessage.MSG_TYPE.RECEIVER_DELETE, com.latencybusters.umds.UMDSMessage.seqnum, com.latencybusters.umds.UMDSMessage.MSG_TYPE.SERVER_DENIED, com.latencybusters.umds.UMDSMessage.srcidx, com.latencybusters.umds.UMDSMessage.status, com.latencybusters.umds.UMDSMessage.status_str, and com.latencybusters.umds.UMDSMessage.type.
|
virtual |
Message Delivery function. This is called to deliver messages to the application.
This must be overridden by applications.
Only data messages will be given to onMessage(). See onEvent() for other event types.
msg | The message containing the received data. |
References com.latencybusters.umds.UMDSMessage.length().
|
virtual |
Callback for request messages received. This functionality is not implemented for persistence at this time. Do not use.
msg | The type for request messages is REQUEST. All UMDSMessage interfaces that are valid for DATA messages are also valid for request messages. The requestID is undefined for received requests, as it is a source-side-only correlation ID. |
Implements com.latencybusters.umds.UMDSReceiverBase.