MigratoryData Client API for DotNet
Developer's Guide and Reference Manual
MigratoryDataListener Interface Reference

Implementations of this interface can handle the real-time messages received for the subscribed subjects as well as the status notifications. More...

Public Member Functions

void OnMessage (MigratoryDataMessage message)
 This method handles the real-time messages received from the MigratoryData server for the subscribed subjects. More...
 
void OnStatus (string status, string info)
 This method handles the status notifications. More...
 

Detailed Description

Implementations of this interface can handle the real-time messages received for the subscribed subjects as well as the status notifications.

Use the API method MigratoryDataClient.SetListener() to register your listener implementation.

Member Function Documentation

◆ OnMessage()

void MigratoryDataListener.OnMessage ( MigratoryDataMessage  message)

This method handles the real-time messages received from the MigratoryData server for the subscribed subjects.

Parameters
messageAn object of type MigratoryDataMessage .

◆ OnStatus()

void MigratoryDataListener.OnStatus ( string  status,
string  info 
)

This method handles the status notifications.

The possible values of the status parameter are:

  • 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 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_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_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
Parameters
statusThe type of the status notification (see the possible values above).
infoThe detail information of the status notification.