Results 1 to 3 of 3
  1. #1

    Selectors in tableInfo class

    Hi,

    Can you provide some samples on how to configure Selectors while doing subscription, i see that the attribute is available in class 'com.lightstreamer.interfaces.metadata.TableInfo' and triggers on notifyNewTables method. Is there a way to send selectors and control the events published.

    Kindly share the details of the sample for reference.

    Thanks
    Rajesh

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    975
    Hi Rajesh, unfortunately there are no ready-made examples of the use of the Selectors.
    Let me recollect all the elements, then please identify for what aspects you would like to see some pseudocode.

    The Selector modifies the meaning of the subscribed items and is requested by the client. In most client SDKs, you should find setSelector in a Subscription object on the client API.
    Since the Selector restricts the update flow, you can use it also as a way to exclude data not pertaining to the client. In this case, the client cooperates by specifying the Selector, but the Metadata Adapter should check, in notifyNewTables, that the Selector specified is one that you require for the subscribed items and that it is not null when required.
    The isSelectorAllowed method can also be used for simpler checks of the allowance of the specified Selector.

    Upon a subscription request for an item which includes a Selector, the isSelected method will be invoked on the Metadata Adapter for each update event for the item that pertains to that subscription. Hence different subscriptions of the item by the same or a different client will receive independent invocations. This lets you restrict the update flow of the item, possibly depending on the involved user.

    If you need some pseudocode, please provide us with details on your use case. Please also specify the client SDK in use; on the adapter side, note that the selector is only available for the java in-process adapters.

  3. #3
    Administrator
    Join Date
    Jul 2006
    Location
    Milan, Italy
    Posts
    517
    You might also want to check out this old post, which contains some code:
    https://forums.lightstreamer.com/sho...sing-selectors

 

 

Similar Threads

  1. Replies: 2
    Last Post: August 31st, 2009, 01:58 PM
  2. Replies: 1
    Last Post: May 21st, 2009, 10:41 AM
  3. create .jar with .class
    By khalil78 in forum Adapter APIs
    Replies: 2
    Last Post: April 4th, 2008, 08:38 PM
  4. Using selectors
    By Alessandro in forum Client APIs
    Replies: 2
    Last Post: December 24th, 2007, 10:02 AM
  5. Use of Selectors in COMMAND mode
    By Alessandro in forum General
    Replies: 0
    Last Post: February 2nd, 2007, 06:40 PM

Tags for this Thread

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 11:49 PM.