Class TableInfo
java.lang.Object
com.lightstreamer.adapters.remote.TableInfo
Used by MetadataProvider to provide value objects to the calls
to methods NotifyNewTables, NotifyTablesClose, and
notifyMpnSubscriptionActivation.
The attributes of every Table (i.e.: Subscription) to be added or removed
to a Session have to be written to a TableInfo instance.
-
Constructor Summary
ConstructorDescriptionTableInfo
(int winIndex, Mode mode, String group, String dataAdapter, String schema, int min, int max, String selector, String[] itemNames, SubscriptionStatistics[] statistics) Used by Lightstreamer to create a TableInfo instance, collecting the various attributes of a Table (i.e.: Subscription). -
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the Data Adapter to which the Table (i.e.: Subscription) refers.final String
getId()
Gets the name of the Item Group (or specification of the Item List) to which the subscribed Items belong.final int
getMax()
Gets the index of the last Item in the Group to be considered in the Table (i.e.: Subscription).final int
getMin()
Gets the index of the first Item in the Group to be considered in the Table (i.e.: Subscription).final Mode
getMode()
Gets the publishing Mode for the Items in the Table (i.e.: Subscription) (it must be the same across all the Table).final String
Gets the name of the Field Schema (or specification of the Field List) used for the subscribed Items.final String
Gets the name of the optional Selector associated to the Table (i.e.: Subscription).String[]
Returns the array of the Item names involved in this Table (i.e.: Subscription).Returns an array that contains the statistics related with the activity of all items involved in this Table (i.e.: Subscription).final int
Gets the unique identifier of the client subscription request within the session.
-
Constructor Details
-
TableInfo
public TableInfo(int winIndex, @Nonnull Mode mode, @Nonnull String group, @Nonnull String dataAdapter, @Nonnull String schema, int min, int max, @Nullable String selector, @Nonnull String[] itemNames, @Nullable SubscriptionStatistics[] statistics) Used by Lightstreamer to create a TableInfo instance, collecting the various attributes of a Table (i.e.: Subscription).- Parameters:
winIndex
- Unique identifier of the client subscription request within the session.mode
- Publishing Mode for the Items in the Table (i.e.: Subscription) (it must be the same across all the Table).group
- The name of the Item Group (or specification of the Item List) to which the subscribed Items belong.dataAdapter
- The name of the Data Adapter to which the Table (i.e.: Subscription) refers.schema
- The name of the Field Schema (or specification of the Field List) used for the subscribed Items.min
- The 1-based index of the first Item in the Group to be considered in the Table (i.e.: Subscription).max
- The 1-based index of the last Item in the Group to be considered in the Table (i.e.: Subscription).selector
- The name of the optional Selector associated to the table (i.e.: Subscription).itemNames
- The array of Item names involved in this Table (i.e.: Subscription).statistics
- The array of subscription statistics associated to the subscribed Items. It can be null if the statistics are not available; otherwise it should have the same size as the itemNames array.
-
-
Method Details
-
getWinIndex
public final int getWinIndex()Gets the unique identifier of the client subscription request within the session. This allows for matching the corresponding subscription and unsubscription requests. Note that, for clients based on a very old version of a client library or text protocol, subscription requests may involve multiple Tables (i.e.: Subscriptions), hence multiple objects of this type can be supplied in a single array by MetadataProvider through NotifyNewTables and NotifyTablesClose. In this case, the value returned is the same for all these objects and the single Tables (i.e.: Subscriptions) can be identified by their relative position in the array.- Returns:
- the unique identifier of the client subscription request.
-
getMode
Gets the publishing Mode for the Items in the Table (i.e.: Subscription) (it must be the same across all the Table).- Returns:
- the publishing Mode for the Items in the Table
-
getId
Gets the name of the Item Group (or specification of the Item List) to which the subscribed Items belong.- Returns:
- the name of the Item Group (or specification of the Item List)
-
getDataAdapter
Returns the name of the Data Adapter to which the Table (i.e.: Subscription) refers.- Returns:
- the name of the involved Data Adapter.
-
getSchema
Gets the name of the Field Schema (or specification of the Field List) used for the subscribed Items.- Returns:
- the name of the Field Schema (or specification of the Field List)
-
getMin
public final int getMin()Gets the index of the first Item in the Group to be considered in the Table (i.e.: Subscription).- Returns:
- the index of the first Item in the Group
-
getMax
public final int getMax()Gets the index of the last Item in the Group to be considered in the Table (i.e.: Subscription).- Returns:
- the index of the last Item in the Group
-
getSelector
Gets the name of the optional Selector associated to the Table (i.e.: Subscription).- Returns:
- the name of the optional Selector associated to the Table
-
getSubscribedItems
Returns the array of the Item names involved in this Table (i.e.: Subscription). The sequence of names is the same one returned byMetadataProvider.getItems(String, String, String)
when decoding of the group name, but restricted, in case a first and/or last Item was specified in the client request (seegetMin()
andgetMax()
).- Returns:
- an Array of Item names.
-
getSubscriptionStatistics
Returns an array that contains the statistics related with the activity of all items involved in this Table (i.e.: Subscription). Each entry refers to one item and the order is the same as returned bygetSubscribedItems()
.
These statistics are available only on the objects supplied by calls toMetadataProvider.notifyTablesClose(java.lang.String, com.lightstreamer.adapters.remote.TableInfo[])
, so that the statistics will refer to the whole life of the subscription. Moreover, the statistics are available only if previously enabled throughMetadataProvider.wantsFinalTableStatistics(String, TableInfo[])
.- Returns:
- an Array of statistics-gathering objects or null.
-