-
April 16th, 2008, 04:20 PM
#1
MetaDataAdapter filtering using isSelected()
I would like to filter events based on client criteria. I have implemented a MetaDataAdapter as described in http://www.lightstreamer.com/vb/show...ght=isSelected
This works. However there is only one MetaDataAdapter per lightstreamer adapter. So the same filter criteria is used for each client that has subscribed. I am new to lightstreamer so I think I am missing something, but how do I configure this so that for example: client 1 only receives events for changes to account 1 and client 2 only receives events for changes to account 2?
The isSelected() method of the MetaDataAdapter has a user parameter, but this is always null!
Thanks,
Phil
-
April 17th, 2008, 09:23 AM
#2
to get a value on the user parameter of the isSelected method you have to set a user name (and a password if needed) on the client side. In example, if you're using the javascript client you can call the setUserName method of the Connection instance of your LightstreamerEngine instance obtained through the onEngineCreation callback:
Btw note that maybe in your case it could be better if you use two different items instead of using a single item to be filtered.
see http://www.lightstreamer.com/vb/showthread.php?t=61
-
April 21st, 2008, 01:39 PM
#3
Thanks,
My issue was actually fixed by resolving a threading issue in my code.
Similar Threads
-
By Pradeep Chahal in forum Adapter SDKs
Replies: 1
Last Post: April 13th, 2010, 09:18 AM
-
By yanhu in forum Adapter SDKs
Replies: 1
Last Post: July 24th, 2007, 05:08 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 04:44 PM.
Bookmarks