Data Subscription SDK Reference¶
For Real-time Data Subscription¶
Subscription Client Class: EosClient¶
Function | Description | Parameter | Response |
---|---|---|---|
EosClient(String host, Integer port, String accessKey, String secretKey) | The constructor function. |
|
EosClient instance |
getDataService() | Get the real-time data subscription service instance. | N/A | IDataService instance |
Real-time Data Subscription Service Class: IDataService¶
Function | Description | Parameter | Response |
---|---|---|---|
subscribe(IDataHandler dataHandler, String subId) | Get the subscribed real-time data of subID (this subscription client belongs to the default consumer group). |
|
null |
subscribe(IDataHandler dataHandler, String subId, String consumerGroup) | Get the subscribed real-time data of the subID and define the consumer group.
|
|
null |
Real-time Data Handling Class: IDataHandler¶
Function | Description | Parameter | Response |
---|---|---|---|
dataRead(StreamMessage message) | Read the subscribed real-time data. | message: The subscribed real-time data. | null |
For Alert Data Subscription¶
Subscription Client Class: EosClient¶
Function | Description | Parameter | Response |
---|---|---|---|
EosClient(String host, Integer port, String accessKey, String secretKey) | The constructor function. |
|
EosClient instance |
getAlertService() | Get alert data subscription service instance. | N/A | IAlertService instance |
Alert Data Subscription Service Class: IAlertService¶
Function | Description | Parameter | Response |
---|---|---|---|
subscribe(IAlertHandler alertHandler, String subId) | Get the subscribed alert data of the subID (this subscription client belongs to the default consumer group). |
|
null |
subscribe(IAlertHandler alertHandler, String subId, String consumerGroup) | Get the subscribed alert data of the subID and define the consumer group.
|
|
null |
Alert Data Handling Class: IAlertHandler¶
Function | Description | Parameter | Response |
---|---|---|---|
alertRead(Alert alert) | Read the subscribed alert data. | alert: The subscribed alert data. | null |
For Offline Data Subscription¶
Subscription Client Class: EosClient¶
Function | Description | Parameter | Response |
---|---|---|---|
EosClient(String host, Integer port, String accessKey, String secretKey) | The constructor function. |
|
EosClient instance |
getOfflineDataService() | Get the offline data subscription service instance. | N/A | IDataService instance |
Offline Data Subscription Service Class: IDataService¶
Function | Description | Parameter | Response |
---|---|---|---|
subscribe(IDataHandler dataHandler, String subId) | Get the subscribed offline data of the subID (this subscription client belongs to the default consumer group). |
|
null |
subscribe(IDataHandler dataHandler, String subId, String consumerGroup) | Get subscribed offline data of subID and define the consumer group.
|
|
null |
Offline Data Handling Class: IDataHandler¶
Function | Description | Parameter | Response |
---|---|---|---|
dataRead(StreamMessage message) | Read the subscribed offline data. | message: The subscribed offline data. | null |
For Event Data Subscription¶
Subscription Client Class: EosClient¶
Function | Description | Parameter | Response |
---|---|---|---|
EosClient(String host, Integer port, String accessKey, String secretKey) | The constructor function. |
|
EosClient instance |
getEventService() | Get event data subscription service instance. | N/A | IEventService instance |
Event Data Subscription Service Class: IEventService¶
Function | Description | Parameter | Response |
---|---|---|---|
subscribe(IEventHandler eventHandler, String subId) | Get the subscribed event data of the subID (this subscription client belongs to the default consumer group). |
|
null |
subscribe(IEventHandler eventHandler, String subId, String consumerGroup) | Get the subscribed event data of the subID and define the consumer group.
|
|
null |
Event Data Handling Class: IEventHandler¶
Function | Description | Parameter | Response |
---|---|---|---|
eventRead(Event event) | Read the subscribed event data. | event: The subscribed event data. | null |