Lightstreamer .Net Adapter 1.7
ContentsIndexHome
PreviousUpNext
IDataProvider.Init Method

Called by the Remote Server to provide initialization information to the Data Adapter. The call must not be blocking; any polling cycle or similar must be started in a different thread. If an exception occurs in this method, Lightstreamer Kernel can't complete the startup and must exit. The initialization information can be supplied in different ways, depending on the way the Remote Server is launched. 

The call must not be blocking; any polling cycle or similar must be started in a different thread. Any delay in returning from this call will in turn delay the Server initialization. If an exception occurs in this method, Lightstreamer Server can't complete the startup and must exit. 

 

C++
void Init(IDictionary parameters, string configFile);
C#
void Init(IDictionary parameters, string configFile);
Visual Basic
Function Init(parameters As IDictionary, configFile As string) As void
Parameters 
Description 
IDictionary parameters 
An IDictionary-type value object that contains name-value pairs corresponding to the parameters elements supplied for the Data Adapter configuration. Both names and values are represented as String objects.
The parameters can be supplied in different ways, depending on the way the Remote Server is launched:
- In the command line, as arguments of the form name=value, if the Remote Server is launched manually;
- As progressive "arg" parameters in the adapters.xml configuration file for the Proxy Adapter, if the Proxy Adapter is responsible of the launch of the Remote Server (i.e. it is a PipedDataProvider);
- As a dictionary, by assigning the "AdapterParams" property of the DataProviderServer instance created, if this instance is used by a custom application to run the Remote Server internally.
 
string configFile 
The path on the local disk of the Data Adapter configuration file. Can be null if not specified.
The file path can be supplied in different ways, depending on the way the Remote Server is launched:
- In the command line, with two consecutive arguments, respectively valued with "/config" and the file path, if the Remote Server is launched manually;
- With two progressive "arg" parameters in the adapters.xml configuration file for the Proxy Adapter, respectively valued with "/config" and the file path, if the Proxy Adapter is responsible of the launch of the Remote Server (i.e. it is a PipedDataProvider);
- By assigning the "AdapterConfig" property of the DataProviderServer instance created, if this instance is used by a custom application to run the Remote Server internally.
 
Exceptions 
Description 
in case an error occurs that prevents the correct behavior of the Data Adapter.