UMDS .NET API  6.14
com.latencybusters.umds.UMDSPersistentReceiver Class Reference

Class to receive persisted messages by a topic or wildcard receiver. More...

Inheritance diagram for com.latencybusters.umds.UMDSPersistentReceiver:
com.latencybusters.umds.UMDSReceiverBase

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 ()
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

Exceptions
UMDSException
Parameters
sconnThe server connection object this receiver is associated with. This explicitly ties the receiver to a server.
topicThe topic string to subscribe.
iswildcardIndicates this receiver is a wildcard pattern
receiverRecoveryInfoCbOptional 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.
receiverRecoveryInfoCbArgOptional arbitrary application object that UMDS will pass to the application's receiverRecoveryInfoCb callback. If not needed, pass null.

Member Function Documentation

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().

Exceptions
UMDSExceptionWhen the receiver could not be cleanly deleted
virtual void com.latencybusters.umds.UMDSReceiverBase.log ( int  level,
System.String  comment 
)
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

Exceptions
UMDSException

References com.latencybusters.umds.UMDS.log(), and com.latencybusters.umds.UMDSServerConnection.UMDS.

override void com.latencybusters.umds.UMDSPersistentReceiver.onEvent ( UMDSMessage  msg)
virtual
virtual void com.latencybusters.umds.UMDSPersistentReceiver.onMessage ( UMDSMessage  msg)
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.

Parameters
msgThe message containing the received data.

References com.latencybusters.umds.UMDSMessage.length().

override void com.latencybusters.umds.UMDSPersistentReceiver.onRequest ( UMDSMessage  msg)
virtual

Callback for request messages received. This functionality is not implemented for persistence at this time. Do not use.

Parameters
msgThe 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.


The documentation for this class was generated from the following file: