Lightstreamer .Net Adapter 1.11.0
ContentsIndexHome
PreviousUpNext
IMetadataProvider.GetItems Method

Called by Lightstreamer Kernel through the Remote Server to resolve an Item Group name (or Item List specification) supplied in a Request. The names of the Items in the Group must be returned. For instance, the client could be allowed to specify the "NASDAQ100" Group name and, upon that, the list of all items corresponding to the stocks included in that index could be returned. 

Possibly, the content of an Item Group may be dependant on the User who is issuing the Request or on the specific Session instance. 

When an Item List specification is supplied, it is made of a space-separated list of the names of the Items in the List. This convention is used by some of the subscription methods provided by the various client libraries. The specifications for these methods require that "A LiteralBasedProvider or equivalent Metadata Adapter is needed on the Server in order to understand the Request". When any of these interface methods is used by client code accessing this Metadata Adapter, the supplied "group" argument should be inspected as a space-separated list of Item names and an array with these names in the same order should be returned. 

Another typical case is when the same Item has different contents depending on the User that is issuing the request. On the Data Adapter side, different Items (one for each User) can be used; nevertheless, on the client side, the same name can be specified in the subscription request and the actual user-related name can be determined and returned here. For instance:

if (group.Equals("portfolio")) {
    String itemName = "PF_" + user;
    return new String[] { itemName };
} else if (group.StartsWith("PF_")) {
    // protection from unauthorized use of user-specific items
    throw new ItemsException("Unexpected group name");
}

 

Obviously, the two above techniques can be combined, hence any element of an Item List can be replaced with a decorated or alternative Item name: the related updates will be associated to the original name used in the Item List specification by client library code. 

This method runs in the Server thread pool specific for the Data Adapter that supplies the involved Items, if defined. 

 

C++
string[] GetItems(string user, string sessionID, string group);
C#
string[] GetItems(string user, string sessionID, string group);
Visual Basic
Function GetItems(user As string, sessionID As string, group As string) As string()
Parameters 
Description 
string user 
A User name. 
string sessionID 
The ID of a Session owned by the User. 
string group 
An Item Group name (or Item List specification). 

An array with the names of the Items in the Group.

Exceptions 
Description 
in case the supplied Item Group name (or Item List specification) is not recognized.