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). ADataProvider
in the application creates theSubjectStatusEvent
to indicate to peers the status of their subscription to a subject. For example, if the back end system that feeds data to aDataProvider
goes down, theDataProvider
should raise aSubjectStatusEvent
with a with aSubjectStatus
ofSubjectStatus.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 theDataProvider
should raise aSubjectStatusEvent
with aSubjectStatus
ofSubjectStatus.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 theSubscriptionListener.subjectStatusReceived(com.caplin.datasource.subscription.Subscription, Peer, SubjectStatusEvent)
callback onSubscriptionListener
.You do not have to implement this interface yourself. Instances can be created by calling the
MessageFactory.createSubjectStatusEvent(String, SubjectStatus, String)
method on theMessageFactory
that is available on thePublisher
interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getSubject()
Gets the subject that thisSubjectStatusEvent
relates to.-
Methods inherited from interface com.caplin.datasource.StatusEvent
getMessage, getStatus
-
-
-
-
Method Detail
-
getSubject
String getSubject()
Gets the subject that thisSubjectStatusEvent
relates to.- Returns:
- The subject.
-
-