SL4BRecordPropertyFactory
class allows caplin.presenter.property.Property instances to
be created, where the property value contains live data being subscribed to using SL4B.
Attributes | Name and Description |
---|---|
|
caplin.presenter.domain.property.SL4BRecordPropertyFactory(String sSubject)
Constructs an instance of |
Attributes | Name and Description |
---|---|
|
Map
getAllProperties()
Returns a map (field name to property) containing |
|
caplin.presenter.property.Property
getAvailabilityProperty()
Returns a boolean |
|
caplin.presenter.property.Property
getProperty(String sFieldName)
Returns a |
|
void
pauseUpdates()
Temporarily suspends data updates from the server. |
|
void
resumeUpdates()
Resumes data updates from the server. |
|
void
setSubject(String sSubject)
Change the subject that this factory subscribes to. |
|
void
startUpdates()
Initializes the subscription to SL4B, causing data updates to start. |
|
void
stopUpdates()
Permanently cancels the factory's subscription to SL4B and clears all properties. |
►
caplin.presenter.domain.property.SL4BRecordPropertyFactory(String sSubject)
Constructs an instance of SL4BRecordPropertyFactory
with a subscription to the given subject.
String | sSubject | The subject of the record this factory will subscribe to (e.g. "/FX/USDGBP") |
►
Map
getAllProperties()
Returns a map (field name to property) containing Property
instances for every available field.
►
caplin.presenter.property.Property
getAvailabilityProperty()
Returns a boolean Property
that is true
when the SL4B subscription is healthy and providing live data, and false
otherwise.
►
caplin.presenter.property.Property
getProperty(String sFieldName)
Returns a Property
that contains live data for the given field.
String | sFieldName | The name of the field within the SL4B record that data will be provided for. |
►
void
pauseUpdates()
Temporarily suspends data updates from the server.
This method is useful when creating performant components, that pause subscriptions when they are deactivated, or minimized, and resume again once they become reactivated or restored.
►
void
setSubject(String sSubject)
Change the subject that this factory subscribes to.
Updating the subject causes all existing properties to be temporarily cleared down, pending the arrival of the new data for the given subject.
String | sSubject | The new subject to subscribe to. |
►
void
startUpdates()
Initializes the subscription to SL4B, causing data updates to start.
Properties created using the factory will not contain data until the startUpdates()
method is
invoked. For performance reasons, it is recommended that all properties that are expected to be needed
are created before startUpdates()
is invoked.
►
void
stopUpdates()
Permanently cancels the factory's subscription to SL4B and clears all properties.
This method should be invoked during a components destroy()
method.