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.