public final class SubscriptionList extends Object implements Iterable<Subscription>
This component provides a structure to hold the data used (and returned) by
the Session.subscribe(com.bloomberglp.blpapi.SubscriptionList),
Session.resubscribe(com.bloomberglp.blpapi.SubscriptionList), and
Session.unsubscribe(com.bloomberglp.blpapi.SubscriptionList)
methods.
See "STRUCTURE OF SUBSCRIPTION STRING" section in Subscription for
more information on subscription strings.*
Subscription are automatically
qualified if the service identifier is missing (i.e. if the subscription
string does not start with "//"). The subscription parameters (i.e. the
optional part after instrument identifier) are never modified.
The rules for qualifying the subscription string are:
SessionOptions.getDefaultSubscriptionService() to the
specified string.
SessionOptions.getDefaultSubscriptionService() followed by
SessionOptions.getDefaultTopicPrefix() to the specified string.
If the 'defaultTopicPrefix' is empty or null, then the prefix used is
'/'. Otherwise (in the case of a nontrivial prefix) if the separator '/'
is not specified at the beginning or the end of the 'defaultTopicPrefix',
then it will be added.
| Constructor and Description |
|---|
SubscriptionList()
Constructs an empty SubscriptionList
|
SubscriptionList(int initialCapacity)
Constructs an empty SubscriptionList with the specified initialCapacity
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Subscription subscription)
Appends the specified subscription to the end of this list
|
void |
clear()
Remove all Subscriptions from this SubscriptionList.
|
Subscription |
get(int index)
Get the Subscription at the specified index in this SubscriptionList
|
boolean |
isEmpty()
Tests if this SubscriptionList has no elements
|
Iterator<Subscription> |
iterator()
Return an iterator over the subscriptions contained in this SubscriptionList
|
Subscription |
remove(int index)
Remove the Subscription at the specified index in this SubscriptionList
|
int |
size()
Returns the number of Subscriptions in this SubscriptionList
|
Subscription[] |
toArray()
Returns an array containing all of the Subscriptions in this
SubscriptionList in the correct order
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic SubscriptionList()
public SubscriptionList(int initialCapacity)
public boolean add(Subscription subscription)
subscription - the Subscription that is to be added to this listpublic void clear()
public Subscription get(int index)
index - the index of the Subscription to returnIndexOutOfBoundsException - if index >= size()public boolean isEmpty()
public Subscription remove(int index)
index - the index of the Subscription to remove from this
SubscriptionListIndexOutOfBoundsException - if index >= size()public int size()
public Subscription[] toArray()
public Iterator<Subscription> iterator()
iterator in interface Iterable<Subscription>Copyright © 2021 Bloomberg L.P.. All rights reserved.