Interface SubjectErrorEvent


public interface SubjectErrorEvent

Represents an event raised when there is an error in a subscription to a subject.

 

Usage in DataSource source applications

 

A SubjectErrorEvent can be raised by a source application (that is, a DataSource application sending data to its DataSource peers). The following are typical situations in which a source application may wish to raise a SubjectErrorEvent:

 

  • A subject is not available from the back end feed system that feeds data to a DataProvider.
  • A subject was available on the back end feed system but is no longer available.

 

An object implementing this interface cannot be instantiated directly, but can be constructed using the MessageFactory.createSubjectErrorEvent(String, SubjectError, SubjectError.Flags...) method of the MessageFactory that is available on the Publisher interface.

 

Usage in DataSource sink applications

 

A SubjectErrorEvent 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.subjectErrorReceived(com.caplin.datasource.subscription.Subscription, Peer, SubjectErrorEvent) callback on SubscriptionListener.

 

Situations where a SubjectErrorEvent can be raised before any data is received include:

 

  • A connected DataSource peer cannot supply data for the requested subject.
  • No response has been received for the Subscription request.

 

Situations where a SubscriptionErrorEvent can be raised after data is received include:

 

  • The subject has been deleted by one of the sending DataSources

 

The getError() method provides more information about why the SubjectErrorEvent was raised.

  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the SubjectError relating to the SubjectErrorEvent.
    Gets the subject of the subscription relating to the SubjectErrorEvent.
  • Method Details

    • getSubject

      String getSubject()
      Gets the subject of the subscription relating to the SubjectErrorEvent.
      Returns:
      The subject.
    • getError

      SubjectError getError()
      Gets the SubjectError relating to the SubjectErrorEvent.
      Returns:
      The error.