UMDS Java API  6.14
com.latencybusters.umds.UMDSReceiver Class Reference
Inheritance diagram for com.latencybusters.umds.UMDSReceiver:
com.latencybusters.umds.UMDSWildcardReceiver

Public Member Functions

 UMDSReceiver (UMDSServerConnection sconn, String topic) throws UMDSException
 
 UMDSReceiver (UMDSServerConnection sconn, String topic, boolean iswildcard) throws UMDSException
 
void onMessage (UMDSMessage msg)
 
void onEvent (UMDSMessage msg)
 
void onRequest (UMDSMessage msg)
 
final void close () throws UMDSException
 
void log (int level, String comment)
 
Object getReceiverRecoveryInfoCbArg ()
 

Protected Attributes

UMDSReceiverRecoveryInfoCallback receiverRecoveryInfoCb = null
 
Object receiverRecoveryInfoCbArg = null
 
UMDSServerConnection server
 
String topic
 

Detailed Description

class UMDSReceiver is the receiving class for UMDS receivers. Applications shall derive from it to implement their receiving object. Applications must override the onMessage() API to receive data.

Separate constructors are defined for regular and wildcard receivers. Applications have the choice of using the wildcard constructor or the UMDSWildcardReceiver class to implement wildcard receivers.

Constructor & Destructor Documentation

com.latencybusters.umds.UMDSReceiver.UMDSReceiver ( UMDSServerConnection  sconn,
String  topic 
) throws UMDSException

This constructor creates a regular receiver object on a UMDS connection.

Parameters
sconnThe server connection object this receiver is tied to. This explicitly ties the receiver to a server.
topicThe topic this receiver is receiving on
Exceptions
UMDSExceptionthe UMDS exception
com.latencybusters.umds.UMDSReceiver.UMDSReceiver ( UMDSServerConnection  sconn,
String  topic,
boolean  iswildcard 
) throws UMDSException

This constructor creates a wildcard receiver object on a UMDS connection when iswildcard is set to true. Applications may alternatively inherit UMDSWildcardReceiver which implicitly calls this constructor.

Parameters
sconnThe server connection object this receiver is tied to. This explicitly ties the receiver to a server.
topicThe topic this receiver is receiving on
iswildcardIndicates this receiver is a wildcard topic
Exceptions
UMDSExceptionthe UMDS exception

References com.latencybusters.umds.UMDSReceiver.onMessage().

Member Function Documentation

final void com.latencybusters.umds.UMDSReceiver.close ( ) throws UMDSException

Close this receiver. The server will send an asynchronous ACK for this operation, queued messages will be received before the ACK is delivered.

Exceptions
UMDSExceptionWhen the receiver could not be cleanly deleted
void com.latencybusters.umds.UMDSReceiverBase.log ( int  level,
String  comment 
)
inherited

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.

Exceptions
UMDSExceptionthe UMDS exception
void com.latencybusters.umds.UMDSReceiver.onMessage ( UMDSMessage  msg)

Message Delivery function. This is called to deliver messages to the application.

This should be overridden by applications.

Only data messages will be given to onMessage()

See also
onEvent
Parameters
msgThe message containing the received data

References com.latencybusters.umds.UMDSMessage.length(), and com.latencybusters.umds.UMDS.LOG_LEVEL.WARN.

Referenced by com.latencybusters.umds.UMDSReceiver.UMDSReceiver().

void com.latencybusters.umds.UMDSReceiver.onRequest ( UMDSMessage  msg)

Callback for request messages received. Implement this method to receive requests. Expected message types: REQUEST.

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.

References com.latencybusters.umds.UMDS.LOG_LEVEL.WARN.

Member Data Documentation

UMDSServerConnection com.latencybusters.umds.UMDSReceiverBase.server
protectedinherited

The UMDS Server Connection associated with this receiver

String com.latencybusters.umds.UMDSReceiverBase.topic
protectedinherited

This receivers interested topic


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