public final class SubscriptionBuilder extends Object
Constructor and Description |
---|
SubscriptionBuilder() |
Modifier and Type | Method and Description |
---|---|
SubscriptionBuilder |
addField(RealtimeField field)
Adds field to the list of fields that will be monitored in real time.
|
SubscriptionBuilder |
addFields(Collection<RealtimeField> fields)
Adds fields to the list of fields that will be monitored in real time.
|
SubscriptionBuilder |
addListener(DataChangeListener lst)
Adds a listener that will be informed of any changes to the registered fields / securities.
|
SubscriptionBuilder |
addSecurities(Collection<String> securities)
Adds those securities to the list of securities that will be monitored in real time.
|
SubscriptionBuilder |
addSecurity(String security)
Adds the specified security to the list of securities that will be monitored in real time.
|
SubscriptionBuilder |
throttle(double throttleFrequency)
Throttles the real time data feed.
|
public SubscriptionBuilder addListener(DataChangeListener lst)
lst
- a listenerNullPointerException
- if lst is nullpublic SubscriptionBuilder addSecurity(String security)
security
- a security's ID (ticker)NullPointerException
- if security is nullpublic SubscriptionBuilder addSecurities(Collection<String> securities)
securities
- a collection of security IDs (tickers)NullPointerException
- if securities is null or contains nullpublic SubscriptionBuilder addField(RealtimeField field)
field
- a field to monitorNullPointerException
- if field is nullpublic SubscriptionBuilder addFields(Collection<RealtimeField> fields)
fields
- the list of fields to monitorNullPointerException
- if fields is null or contains nullpublic SubscriptionBuilder throttle(double throttleFrequency)
throttleFrequency
- the maximum frequency at which data is updated, secondsIllegalArgumentException
- if throttle is not between 0.1 and 86,400.Copyright © 2013. All Rights Reserved.