-
.NET DataProvider
basically if i sum this up correctly
i need to create a class that implements Lightstreamer.Interfaces.Data.IDataProvider
and override the methods?
Public Sub Init(ByVal parameters As System.Collections.IDictionary, ByVal configFile As String) Implements Lightstreamer.Interfaces.Data.IDataProvider.Init
End Sub
Public Function IsSnapshotAvailable(ByVal itemName As String) As Boolean Implements Lightstreamer.Interfaces.Data.IDataProvider.IsSnap shotAvailable
End Function
Public Sub SetListener(ByVal eventListener As Lightstreamer.Interfaces.Data.IItemEventListener) Implements Lightstreamer.Interfaces.Data.IDataProvider.SetLis tener
End Sub
Public Sub Subscribe(ByVal itemName As String) Implements Lightstreamer.Interfaces.Data.IDataProvider.Subscr ibe
End Sub
Public Sub Unsubscribe(ByVal itemName As String) Implements Lightstreamer.Interfaces.Data.IDataProvider.Unsubs cribe
End Sub
am i on the right track?
-
Yes. And an instance of this class will be created and used by the .NET Remote Server.
You also have to instruct the .NET Remote Server on how to load your adapter class by specifying the class name in the Remote Server configuration.
This is accomplished in different ways, depending on how the Remote Server is started:
- In the configuration of the Proxy Adapter mounted on Lightstreamer Server, if Piped Mode is used
- On the command line, at Remote Server manual launch, if Socket Mode is used
- Directly in your code, in the DataProviderServer object instantiation, if you choose to run the Remote Server (in Socket Mode) by your own main
The Lightstreamer\sdk_for_dotnet-adapters\doc\ReadMe.pdf document gives an introduction to the different modes.