The DataSubscriber
is the interface for a connector that will communicate with a
data source/provider. A subscriber instance implementing this interface must create subscriptions
to a data source on behalf of a caplin.core.subscriber.DataSubscriptionListener.
Subscriptions are made for data with a particular subject and data updates are propagated to the
subscribed DataSubscriberListener which processes data updates when received. The DataSubscriber
provides the interface to stop and resume the subscription to the data source when required,
or to query the data availability status or subscription status.
An implementation of the caplin.core.subscriber.DataSubscriber interface must implement the callbacks for receiving data from the particular data source to which it is specific.
Attributes | Name and Description |
---|---|
|
caplin.core.subscriber.DataSubscriber()
The |
Attributes | Name and Description |
---|---|
|
String
getSubscribedSubject()
Returns the data subject of the active subscription if the subscription is not stopped. |
|
boolean
isAvailable()
Returns true if the subscribed data on the data source is currently available. |
|
void
resume()
Resumes the data subscription to the data source. |
|
void
setListener(caplin.core.subscriber.DataSubscriptionListener oListener)
Sets the listener for this DataSubscription's updates. |
|
void
stop()
Stops the data subscription to the data source, if subscribed. |
►
caplin.core.subscriber.DataSubscriber()
The DataSubscriber
interface — this should never be constructed.
►
String
getSubscribedSubject()
Returns the data subject of the active subscription if the subscription is not stopped.
►
boolean
isAvailable()
Returns true if the subscribed data on the data source is currently available.
►
void
resume()
Resumes the data subscription to the data source.
►
void
setListener(caplin.core.subscriber.DataSubscriptionListener oListener)
Sets the listener for this DataSubscription's updates.
The subscribed listener must implement the caplin.core.subscriber.DataSubscriberListener interface in order to receive callbacks when data availability changes and data updates are received.
caplin.core.subscriber.DataSubscriptionListener | oListener | the subscribed listener for data updates. Required. |
►
void
stop()
Stops the data subscription to the data source, if subscribed.