MigratoryDataListener
The implementation of this interface will handle the messages received from the server for the subscribed subjects as well as various status notifications. More…
Public Functions
Name | |
---|---|
void | OnMessage(MigratoryDataMessage message) This method handles the real-time messages received from a MigratoryData server for the subscribed subjects. |
void | OnStatus(string status, string info) This method handles the status notifications. |
Detailed Description
class MigratoryDataListener;
The implementation of this interface will handle the messages received from the server for the subscribed subjects as well as various status notifications.
Use the API method [MigratoryDataClient.SetListener()] to register your listener implementation.
Public Functions Documentation
function OnMessage
void OnMessage(
MigratoryDataMessage message
)
This method handles the real-time messages received from a MigratoryData server for the subscribed subjects.
Parameters:
- message An object of type MigratoryDataMessage .
function OnStatus
void OnStatus(
string status,
string info
)
This method handles the status notifications.
Parameters:
- status The type of the status notification (see the possible values above).
- info The detail information of the status notification.
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 notification
-
MigratoryDataClient.NOTIFY_SERVER_DOWN indicates that the client was not able to connect to the MigratoryData server provided in the detail information of the status notification
-
MigratoryDataClient.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 recovered all messages made available for that subject during the failover period, if any
-
MigratoryDataClient.NOTIFY_DATA_RESYNC indicates that, after a failover reconnection, the client successfully synchronized the subject given in the detail information; however, the potential messages made available for that subject during the failover period have not been recovered, the client behaving like a new client which only received the most recent retained message available for that subject
-
MigratoryDataClient.NOTIFY_CONNECT_OK indicates that the client– identified with the token given in the argument of MigratoryDataClient.setEntitlementToken() – is allowed to connect for the reason provided in the detail information of the status notification
-
MigratoryDataClient.NOTIFY_CONNECT_DENY indicates that the client – identified with the token given in the argument of MigratoryDataClient.setEntitlementToken() – is denied to connect for the reason provided in the detail information of the status notification
-
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 notification
-
MigratoryDataClient.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 notification
-
MigratoryDataClient.NOTIFY_PUBLISH_OK indicates that the client successfully published the message having the closure data provided in the detail information of the status notification
-
MigratoryDataClient.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 notification
-
MigratoryDataClient.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 message