Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Oct 2007
    Location
    London
    Posts
    3

    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

  2. #2
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    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

  3. #3
    Member
    Join Date
    Oct 2007
    Location
    London
    Posts
    3
    Thanks,

    My issue was actually fixed by resolving a threading issue in my code.

 

 

Similar Threads

  1. Exception in metadataAdapter
    By Pradeep Chahal in forum Adapter SDKs
    Replies: 1
    Last Post: April 13th, 2010, 10:18 AM
  2. MetaDataAdapter for the Portofolio demo
    By yanhu in forum Adapter SDKs
    Replies: 1
    Last Post: July 24th, 2007, 06:08 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 10:24 AM.