Lightstreamer .Net Adapter 1.11.0
ContentsIndexHome
PreviousUpNext
IDataProvider Interface

Provides an interface to be implemented by a Remote Data Adapter in order to attach a Data Provider to Lightstreamer. A single instance of a Remote Data Adapter is created by Lightstreamer through the launch of a Remote Server, based on configured class name and parameters. For this purpose, any Remote Data Adapter must provide a void constructor. Alternatively, an instance of a Remote Data Adapter is supplied to Lightstreamer programmatically through a DataProviderServer instance. After initialization, Lightstreamer sets itself as the Remote Data Adapter listener, by calling the setListener method. 

Data Providers are used by Lightstreamer Kernel to obtain all data to be pushed to the Clients. Any Item requested by a Client must refer to one supplied by the configured Data Adapters. 

A Data Provider supplies data in a publish/subscribe way. Lightstreamer asks for data by calling the subscribe and unsubscribe methods for various Items and the Data Adapter sends ItemEvents to its listener in an asynchronous way. 

A Data Adapter can also support Snapshot management. Upon subscription to an Item, the current state of the Item data can be sent to the Server before the updates. This allows the Server to maintain the Item state, by integrating the new ItemEvents into the state (in a way that depends on the Item type) and to make this state available to the Clients. 

Note that the interaction between the Server and the Data Adapter and the interaction between the Server and any Client are independent activities. As a consequence, the very first ItemEvents sent by the Data Adapter to the Server for an Item just subscribed to might be processed before the Server starts feeding any client, even the client that caused the subscription to the Item to be invoked; then, such events would not be forwarded to any client. If it is desirable that a client receives all the ItemEvents that have been produced for an Item by the Data Adapter since subscription time, then the support for the Item Snapshot can be leveraged. 

Lightstreamer ensures that calls to subscribe and unsubscribe for the same Item will be interleaved, without redundant calls; whenever subscribe throws an exception, the corresponding unsubscribe call is not issued. 

 

C++
public: __interface IDataProvider;
C#
public interface IDataProvider;
Visual Basic
Public Interface IDataProvider