Lightstreamer .Net Adapter 1.7
ContentsIndexHome
PreviousUpNext
IMetadataProvider.GetItems Method

Called by Lightstreamer Kernel through the Remote Server to resolve a Group name 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 a Group may be dependant on the User who is issuing the Request or on the specific Session instance. 

A special case is when the Group name is made of a space-separated list of the names of the items in the Group. 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 id 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 (id.Equals("portfolio")) {
    String itemName = "PF_" + user;
    return new String[] { itemName };
} else if (id.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 supplied id 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 
A Group name. 

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

Exceptions 
Description 
in case the supplied Group name is not recognized.