-
February 13th, 2017, 09:47 AM
#1
Creating adapter for dynamic stock list
In my case my server create adapter list as dynamic. For example some times list contain 4 stocks in some times 2 stocks or in some times stock list will be empty and that time need to show the market closed message.
I have created external feedsimulater class like bellow datastructure,(Remote adapter)
public class RateRow {
private String itemName;
private String instrumentName;
private String bidRate;
private String askRate;
private String low_price;
private String high_price;
}
And i have assigned the values to this class. Finally for every 500 millisecond it will assign the values to this class.And my array list look like
private final ArrayList<RateRow> bidaskrates = new ArrayList<RateRow>();
Now i need to show this list to client browser. Whenever the changes happens in arraylist it should be reflect in user browser.
Now i created my RateRow class with itemName property. This itemName manually created like item1,item2 etc upto my stocklist. Now can i create some static 30 item names(like item1,item2 ... item30) in client and while subscription using MERGE mode can i compare with server stock items and display in client browser only available stocks in server. If supose server contain 4 items means i need to display only 4 items in client.
Similar Threads
-
By mIbrahim in forum Adapter SDKs
Replies: 1
Last Post: May 3rd, 2013, 09:19 AM
-
By pradeepgamage in forum General
Replies: 1
Last Post: January 9th, 2012, 11:39 AM
-
By spganesh in forum Client SDKs
Replies: 5
Last Post: July 12th, 2010, 10:12 AM
-
By minhphan200677 in forum Adapter SDKs
Replies: 1
Last Post: April 14th, 2008, 09:26 AM
-
By rsouissi in forum Adapter SDKs
Replies: 7
Last Post: December 11th, 2006, 09:26 AM
Tags for this Thread
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 03:12 PM.
Bookmarks