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 aSubjectErrorEvent
:- 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 theMessageFactory
that is available on thePublisher
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 theSubscriptionListener.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 theSubjectErrorEvent
was raised. - A subject is not available from the back end feed system that feeds data to a
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SubjectError
getError()
Gets theSubjectError
relating to theSubjectErrorEvent
.String
getSubject()
Gets the subject of the subscription relating to theSubjectErrorEvent
.
-
-
-
Method Detail
-
getSubject
String getSubject()
Gets the subject of the subscription relating to theSubjectErrorEvent
.- Returns:
- The subject.
-
getError
SubjectError getError()
Gets theSubjectError
relating to theSubjectErrorEvent
.- Returns:
- The error.
-
-