MigratoryDataInteractiveListener

Implementations of this interface handle data messages and status notifications, like implementations of MigratoryDataListener do, and furthermore handle subscription events for the advertised interactive subjects. More…

Public Functions

Name
void onSubscribe(String subject)
Indicates that a first client has subscribed to the subject in the argument, across the entire MigratoryData cluster.
void onUnsubscribe(String subject)
Indicates that the last client subscribed to the subject in the argument, across the entire MigratoryData cluster, has unsubscribed.
void onMessage(MigratoryDataMessage message)
This method handles the real-time messages received from a MigratoryData server for the subscribed subjects.
void onStatus(String type, String info)
This method handles the status notifications.

Detailed Description

class MigratoryDataInteractiveListener;

Implementations of this interface handle data messages and status notifications, like implementations of MigratoryDataListener do, and furthermore handle subscription events for the advertised interactive subjects.

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

The subscription events — consisting of the first subscribe and last unsubscribe events — applies only for the subjects which match one of the wildcard subjects advertised with the API method MigratoryDataClient.advertiseInteractiveSubjects(List), and provided that the Interactive Publishing extension is enabled in the MigratoryData server, i.e. the parameter Extension.InteractivePublishing of the MigratoryData server is set on true.

Public Functions Documentation

function onSubscribe

void onSubscribe(
    String subject
)

Indicates that a first client has subscribed to the subject in the argument, across the entire MigratoryData cluster.

Parameters:

  • subject Subject subscribed by its first subscriber

function onUnsubscribe

void onUnsubscribe(
    String subject
)

Indicates that the last client subscribed to the subject in the argument, across the entire MigratoryData cluster, has unsubscribed.

Parameters:

  • subject Subject unsubscribed by its last subscriber

function onMessage

void onMessage(
    MigratoryDataMessage message
)

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

Parameters:

function onStatus

void onStatus(
    String type,
    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: