Lightstreamer .Net Adapter 1.7
|
Provides an interface to be implemented by a Remote Data Adapter in order to attach a Data Provider to Lightstreamer. The configuration of a Remote Adapter instance requires the following info:
- an optional name for the instance;
- the Remote Adapter class name;
- optional configuration parameters.
A single instance of each configured Remote Adapter is created by Lightstreamer at startup, through a Remote Server instance. For this purpose, any Remote Data Adapter must provide a void constructor. After creation, the init method is called, providing the Remote Data Adapter with the configuration information; then, the Remote Server 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.
public: __interface IDataProvider;
public interface IDataProvider;
Public Interface IDataProvider