-
October 3rd, 2006, 09:38 AM
#5
Yes, you are on the right way.
Probably what confuse you in the code style is the use of inner classes. I will not explain that concept here (is full of docs out there), just know that in java you can implement classes inside other classes (so inner classes).
In our adapter we have:
- DemoDataAdapter
This is the object that implements the DataProvider interface and so comunicates with Lightstreamer kernel.
The subscribe/unsubscribe method receives the requests to subscribe/unsubscribe (of course...) items (ie which items the various clients wants) - MyFeedListener
Is an inner class. An instance of this class will be passed to the "data-generator" class ExternalFeedSimulator.
This class receives (implementing ExternalFeedListener) updates through the onEvent and then forwards them to Lightstreamer kernel:
Code:
listener.update(itemName, currentValues, isSnapshot);
- ExternalFeedSimulator
This is the object that creates data (the generator is his inner class MyProducer). In your case this object will not generate data but will pull data from DB
HTH
Bye!
Similar Threads
-
By mode_vigilante in forum Adapter SDKs
Replies: 16
Last Post: January 27th, 2012, 03:58 PM
-
By usama in forum Client SDKs
Replies: 2
Last Post: March 19th, 2010, 10:03 AM
-
By devidasan in forum Adapter SDKs
Replies: 1
Last Post: March 17th, 2009, 11:00 AM
-
By hungn in forum Adapter SDKs
Replies: 2
Last Post: August 23rd, 2007, 09:21 AM
-
By Sinead in forum Adapter SDKs
Replies: 4
Last Post: February 14th, 2007, 03:47 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:46 PM.
Bookmarks