Interface SubjectStatusEvent

All Superinterfaces:
StatusEvent

public interface SubjectStatusEvent extends StatusEvent

Represents an event that is raised when there is a change in the status of a subject.

 

Usage in DataSource source applications

 

A SubjectStatusEvent can be raised by a source application (that is, a DataSource application sending data to its DataSource peers). A DataProvider in the application creates the SubjectStatusEvent to indicate to peers the status of their subscription to a subject. For example, if the back end system that feeds data to a DataProvider goes down, the DataProvider should raise a SubjectStatusEvent with a with a SubjectStatus of SubjectStatus.Stale to indicate to the peer that the data it has is not completely up-to-date. When an update is subsequently received from the backend data feed, then the DataProvider should raise a SubjectStatusEvent with a SubjectStatus of SubjectStatus.Ok to indicate to the peer that the data it has is now up to date.

 

Usage in DataSource sink applications

 

A SubjectStatusEvent can be received by a sink application (that is, a DataSource application receiving data from its DataSource peers). Such events are received through the SubscriptionListener.subjectStatusReceived(com.caplin.datasource.subscription.Subscription, Peer, SubjectStatusEvent) callback on SubscriptionListener.

 

You do not have to implement this interface yourself. Instances can be created by calling the MessageFactory.createSubjectStatusEvent(String, SubjectStatus, String) method on the MessageFactory that is available on the Publisher interface.

  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the subject that this SubjectStatusEvent relates to.

    Methods inherited from interface com.caplin.datasource.StatusEvent

    getMessage, getStatus
  • Method Details

    • getSubject

      String getSubject()
      Gets the subject that this SubjectStatusEvent relates to.
      Returns:
      The subject.