Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Apr 2009
    Location
    Kuwait
    Posts
    17

    DynaMetapush table

    Hi All,

    I am trying to create an example of DynaMetapush table.I read the docs of web client but couldn't get these info.
    1]How can i define a key item for the table?
    i tried the code var schema = ["key", "command", "secId"];
    var table = new DynaMetapushTable("LS_activity", schema, "COMMAND");
    But how can i include the rest of the normal fields.
    2]In the data adapter(java) how do i call update function?
    listener.update("LS_activity", data, false);
    but the above code is giving the exception ---Missing mandatory parameter in command event.
    3]Is the ADD/UPDATE automatically handled by the engine based on the key?
    It would be really helpful if anyone could show me some code excerpts for the above questions.Is there any tutorials to get some info about defining DataAdaptor/MetaAdaptor and tables like Dynametapush etc..?.

    Regards,
    George Eapen

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    975
    Sorry for not answering to your three points directly. Please reformulate trailing questions after the following information.

    The COMMAND mode, with the special meaning of the "key" and "command" fields, is supported by the web client library through the DynaMetapush tables and by the Server, but there is no facility on the Data Adapter side.
    This means that your Data Adapter, upon a subscription to an item to be managed in COMMAND mode, is fully responsible of producing an update flow that is compliant with the COMMAND mode conventions.
    Hence, each update must include a value for the "key" field and a value for the "command" field and the latter must be valued as "ADD", "UPDATE" or "DELETE" in a way consistent with the corresponding key lifecycle. Referring to your example, those values must be included in the "data" map.

    In Lightstreamer distribution, we demonstrate COMMAND mode in the "Basic Portfolio Demo", while in the "Portfolio Demo" we show an advanced use of the COMMAND mode, related to the MultiDynaMetapush table.
    Both demos get COMMAND mode data from the preinstalled "PORTFOLIO_ADAPTER" Data Adapter. The source code for this Adapter is reported under
    DOCS-SDKs\sdk_adapter_java\examples\Portfolio_Adapters

  3. #3
    Member
    Join Date
    Apr 2009
    Location
    Kuwait
    Posts
    17
    Thank you very much for the information and the portfolio example helped me answer the questions.

 

 

Similar Threads

  1. LS table how it works
    By betasec in forum Client APIs
    Replies: 1
    Last Post: February 21st, 2011, 11:03 AM
  2. Subscribing to the Table
    By AidasOzelis in forum Client APIs
    Replies: 13
    Last Post: June 3rd, 2010, 02:13 PM
  3. Update Table
    By EWANG in forum Client APIs
    Replies: 1
    Last Post: August 19th, 2009, 11:17 AM
  4. Dynametapush table conditional exclusion of items
    By ksivasam in forum Client APIs
    Replies: 2
    Last Post: January 31st, 2008, 04:04 PM
  5. Replies: 3
    Last Post: March 23rd, 2007, 10:42 AM

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 08:00 AM.