squint
I am creating an adapter based on the LiteralBasedProvider to accept user, password, and sessionid from the client. I would like the adapter to monitor a session to another system and return real-time status change events back to the client. I have reviewed the Remote Porfolio Adapter sample code to use as an example.
Basically the way I read the Remote Portfolio Adapter example there is basically two adapters defined:
PortfolioMetadataAdapter which is based on the LiteralBasedProvider and has a NotifyUserMessage override to accept user, session and message, (only message is being utilized)
PortfolioDataAdapter which is based on the IDataProvider and is used to stream data back to the client.
My question is how the two communicate and how the appropriate portfolio is sent back to the client?
In my case, I would like the client to send the user, password, and sessionid of the session they established on the other system to the adapter and have the adapter(s) track events created on the other system for that user/session and send back the events to the client in a real-time basis.
Thanks for any help.
Alessandro Alinone
The client will authenticate on the other system and get the sessionid.
Then it will authenticate on Lightstreamer Server by passing any of the credentials (username, epassword, sessionid) to the client API. Such credentials will be passed yo your Metadata Adapter, which will validate them.
Then the client will subscribe to an item, which should map your status change events. Such subscription will reach the Data Adapter, which will need to start producing events. The same subscription will go through the Metadata Adapter first, which will be able to decorate the item name with the sessionid or other information, so that the Data Adapter will know what data to produce.
To understand the above better, please study Chapter 4 of "General Concepts.pdf".