|
MigratoryData Client API for C++
Developer's Guide and Reference Manual
|
Implementations of this interface can handle the real-time messages received for the subscribed subjects as well as various status notifications. More...
Public Member Functions | |
| virtual void | onMessage (const MigratoryDataMessage &message)=0 |
| This method handles the real-time messages received from a MigratoryData server for the subscribed subjects. More... | |
| virtual void | onStatus (const std::string &status, std::string &info)=0 |
| This method handles the status notifications. More... | |
Implementations of this interface can handle the real-time messages received for the subscribed subjects as well as various status notifications.
Use the API method MigratoryDataClient.setListener() to register your listener implementation.
|
pure virtual |
This method handles the real-time messages received from a MigratoryData server for the subscribed subjects.
| message | An object of type MigratoryDataMessage . |
|
pure virtual |
This method handles the status notifications.
The possible values of the status parameter are:
MigratoryDataClient.NOTIFY_SERVER_UP indicates that the client successfully connected to the MigratoryData server provided in the detail information of the status notificationMigratoryDataClient.NOTIFY_SERVER_DOWN indicates that the client was not able to connect to the MigratoryData server provided in the detail information of the status notificationMigratoryDataClient.NOTIFY_DATA_SYNC indicates that, after a failover reconnection, the client successfully synchronized the subject given in the detail information of the status notification. Moreover, the client received the messages published during the failover period for this subject.MigratoryDataClient.NOTIFY_DATA_RESYNC indicates that, after a failover reconnection, the client successfully synchronized the subject given in the detail information of the status notification. However, the client have not received the potential messages published during the failover period for this subject, the client behaving like a new client which just connected to the MigratoryData server.MigratoryDataClient.NOTIFY_SUBSCRIBE_ALLOW indicates that the client – identified with the token given in the argument of MigratoryDataClient.setEntitlementToken() – is allowed to subscribe to the subject provided in the detail information of the status notificationMigratoryDataClient.NOTIFY_SUBSCRIBE_DENY indicates that the client – identified with the token given in the argument of MigratoryDataClient.setEntitlementToken() – is not allowed to subscribe to the subject provided in the detail information of the status notificationMigratoryDataClient.NOTIFY_PUBLISH_OK indicates that the client successfully published the message having the closure data provided in the detail information of the status notificationMigratoryDataClient.NOTIFY_PUBLISH_FAILED indicates that the client was unable to publish the message having the closure data provided in the detail information of the status notificationMigratoryDataClient.NOTIFY_PUBLISH_DENIED indicates that the client was unable to publish the message having the closure data provided in the detail information of the status notification because the client – identified with the token given in the argument of MigratoryDataClient.setEntitlementToken() – is not allowed to publish on the subject of the messageMigratoryDataClient.NOTIFY_PUBLISH_NO_SUBSCRIBER indicates that the client was unable to publish the message having the closure data provided in the detail information of the status notification because there is no client subscribed to the subject of the message| status | The type of the status notification (see the possible values above). |
| info | The detail information of the status notification. |