• Adapter API
  • Passing data dynamicatlly to Java Data Adapter via

Hi,

I went through the Java Data Adapter samples like Helloworld and Stocklist demo. I am having the below query which help me to analyse further to fit Lightstreamer for our requirements (push the data to client using a app)

Is there anyway to pass the data from a external Java class to DataAdapter class for ex: passing message from a button click to Helloworld java adapter class which inturn pass the message to Client?

Thanks in advance
Hi V S Suresh,

I'm not sure I fully understand your needs, but I think that the sendMessage function of JavaScript Client API library can help in your case.

Take a look at the Portfolio Demo and Chat Demo that via the sendMessage send information to the adapter and then returns back to the clients.

Please note that the use of the sendMessage function involves implementing the notifyUserMessage method of the MetadataProvider interface.

Anyway, the implementation of a Data Adapter is open so you can arrange various other solutions if they are easier in your environment.

Hope that helps.
Hi giuseppe.corti,

Thank you for reply. Let me check the option suggested and get back to you. Thanks again.