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

class UMDSSource is the class for UMDS sources. More...

Inheritance diagram for com.latencybusters.umds.UMDSSource:
com.latencybusters.umds.UMDSSourceBase

Public Member Functions

 UMDSSource (UMDSServerConnection sconn, System.String topic, System.String[] options)
 Instantiates a new UMDS source. More...
 
override void send (byte[] data)
 Send an array of data. More...
 
override void onEvent (UMDSMessage msg)
 Callback for source events. Expected message Types: DISCONNECT, SERVER_DENIED, CONFIGURATION_ERROR, REQUEST_CANCELED, SOURCE_CREATE and SOURCE_DELETE. More...
 
override void onResponse (UMDSMessage msg)
 Callback for response messages received. Implement this method to receive responses. Zero or more responses may be received for each request. More...
 
void close ()
 Close this source. More...
 
bool canSend ()
 
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...
 
virtual void request (int request_id, byte[] request_data)
 Send a request on a source topic. Requests and responses are not reliable (they may be lost), so it is expected that an application will periodically send new requests until satisfied with the responses received. More...
 

Detailed Description

class UMDSSource is the class for UMDS sources.

Constructor & Destructor Documentation

com.latencybusters.umds.UMDSSource.UMDSSource ( UMDSServerConnection  sconn,
System.String  topic,
System.String[]  options 
)

Instantiates a new UMDS source.

Parameters
sconnThe server connection object this source is tied to. This explicitly ties the source to a server.
topicThe topic this source is sending on
optionsList of source client options - a string array containing the name, value pairs

Member Function Documentation

void com.latencybusters.umds.UMDSSource.close ( )

Close this source.

Exceptions
UMDSExceptionWhen the source could not be cleanly deleted
virtual void com.latencybusters.umds.UMDSSourceBase.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.UMDSSource.onEvent ( UMDSMessage  msg)
virtual

Callback for source events. Expected message Types: DISCONNECT, SERVER_DENIED, CONFIGURATION_ERROR, REQUEST_CANCELED, SOURCE_CREATE and SOURCE_DELETE.

Parameters
msgIn addition to other event types delivered to this callback, when a client sends requests, the server-configured request-timeout will trigger timeout notification events sent from the server to the client. The type for timeout notification events is REQUEST_CANCELED. The only other valid data in a timeout notification event is the RequestID, which corresponds to the request_id specified when the request was sent.

Implements com.latencybusters.umds.UMDSSourceBase.

References com.latencybusters.umds.UMDSMessage.MSG_STATUS.CLOSE_PENDING, com.latencybusters.umds.UMDSMessage.MSG_TYPE.CONFIGURATION_ERROR, com.latencybusters.umds.UMDSMessage.MSG_TYPE.DISCONNECT, com.latencybusters.umds.UMDSMessage.MSG_TYPE.REQUEST_CANCELED, com.latencybusters.umds.UMDSMessage.requestID, com.latencybusters.umds.UMDSMessage.MSG_TYPE.SERVER_DENIED, com.latencybusters.umds.UMDSMessage.MSG_TYPE.SOURCE_CREATE, com.latencybusters.umds.UMDSMessage.MSG_TYPE.SOURCE_DELETE, com.latencybusters.umds.UMDSMessage.srcidx, com.latencybusters.umds.UMDSMessage.status, com.latencybusters.umds.UMDSMessage.status_str, and com.latencybusters.umds.UMDSMessage.type.

override void com.latencybusters.umds.UMDSSource.onResponse ( UMDSMessage  msg)
virtual

Callback for response messages received. Implement this method to receive responses. Zero or more responses may be received for each request.

Parameters
msgThe type of a response message is RESPONSE. The RequestID corresponds to the request_id specified when the request was sent. The appdata, length() and toString() methods are valid for response messages. All other UMDSMessage interfaces are undefined for response messages.

Implements com.latencybusters.umds.UMDSSourceBase.

virtual void com.latencybusters.umds.UMDSSourceBase.request ( int  request_id,
byte[]  request_data 
)
virtualinherited

Send a request on a source topic. Requests and responses are not reliable (they may be lost), so it is expected that an application will periodically send new requests until satisfied with the responses received.

Exceptions
Thesame exceptions as the send() method, with no additional exception cases.
Parameters
request_idUser defined and maintained id for this request. Responses and timeout notifications will reference this id. Any 32-bit signed integer value is valid. The same value can be used for multiple requests but this is not recommended as its purpose is to assist in correlating responses to each request.
request_dataUser specified request data.
override void com.latencybusters.umds.UMDSSource.send ( byte[]  data)
virtual

Send an array of data.

Parameters
dataThe data to be sent

Implements com.latencybusters.umds.UMDSSourceBase.


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