MigratoryData Client API for iOS
Developer's Guide and Reference Manual
<MigratoryDataListener> Protocol Reference

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

Instance Methods

(void) - onMessage:
 This method handles the real-time messages received from a MigratoryData server for the subscribed subjects. More...
 
(void) - onStatus: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 various status notifications.

Use the API method MigratoryDataClient::setListener: to register your listener implementation.

Method Documentation

◆ onMessage:()

- (void) onMessage: (MigratoryDataMessage *)  message

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

Parameters
messageAn object of type MigratoryDataMessage .

◆ onStatus:info:()

- (void) onStatus: (NSString *)  status
info: (NSString *)  info 

This method handles the status notifications.

The possible values of the status parameter are:

  • NOTIFY_SERVER_UP indicates that the client successfully connected to the MigratoryData server provided in the detail information of the status notification
  • 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
  • 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.
  • 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.
  • NOTIFY_PUBLISH_OK indicates that the client successfully published the message having the closure data provided in the detail information of the status notification
  • 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
  • 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
  • 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.