Inherits com.latencybusters.umds.UMDSSourceBase.
Inherited by com.latencybusters.umds.UMDSTestApp.AppSource.
class UMDSSource is the class for UMDS sources.
Instantiates a new UMDS source.
- Parameters
-
sconn | The server connection object this source is tied to. This explicitly ties the source to a server. |
topic | The topic this source is sending on |
options | List of source client options - a string array containing the name, value pairs |
final void com.latencybusters.umds.UMDSSource.close |
( |
| ) |
throws UMDSException |
Close this source.
- Exceptions
-
UMDSException | When the source could not be cleanly deleted |
void com.latencybusters.umds.UMDSSourceBase.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
-
UMDSException | the UMDS exception |
void com.latencybusters.umds.UMDSSource.onEvent |
( |
UMDSMessage |
msg | ) |
|
Event Notification function. This function is called when non-data events occur, E.G. server denied reported by the server.
This should be overridden by applications.
Expected message Types: DISCONNECT, SERVER_DENIED, CONFIGURATION_ERROR, REQUEST_CANCELED, SOURCE_CREATE and SOURCE_DELETE.
- Parameters
-
msg | In 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. |
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.UMDS.LOG_LEVEL.INFO, com.latencybusters.umds.UMDSMessage.MSG_TYPE.LOGIN_COMPLETE, 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, com.latencybusters.umds.UMDSMessage.type, and com.latencybusters.umds.UMDS.LOG_LEVEL.WARN.
void com.latencybusters.umds.UMDSSource.onResponse |
( |
UMDSMessage |
msg | ) |
|
Callback for response messages received. Implement this method to receive responses. Zero or more responses may be received for each request.
Expected message types: RESPONSE.
- Parameters
-
msg | The 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. |
References com.latencybusters.umds.UMDS.LOG_LEVEL.WARN.
void com.latencybusters.umds.UMDSSourceBase.request |
( |
int |
request_id, |
|
|
byte[] |
request_data |
|
) |
| throws UMDSException |
|
inherited |
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.
- Parameters
-
request_id | User defined 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_data | User specified request data. |
- Exceptions
-
UMDSException | The same exceptions as the send() method, with no additional exception cases. |
void com.latencybusters.umds.UMDSSource.send |
( |
byte[] |
data | ) |
throws UMDSException |
The UMDS Server Connection associated with this Source
String com.latencybusters.umds.UMDSSourceBase.topic |
|
protectedinherited |
The documentation for this class was generated from the following file: