-
January 18th, 2008, 07:59 AM
#3
Hi Dario,
You mean, StockListDemo work-flow :
Step 1: Get feed data (simulate) from "ExternalFeed" class
public ExternalFeedSimulator() {
_stockGenerators= new Hashtable();
_snapshotQueue= new ArrayList();
...
}
Step 2 : Starts generating update events for the stocks. attaching and reading from an external broadcast feed (in step 1).
public void Start()
{
if (_snapshotSender != null) return;
//all available data consists of 30 fake stocks, which is what is needed by the StockList demo front-end.
for (int i = 0; i < 30; i++)
{
....
//For each of the above stocks/items, you create a specific object, of type ExternalFeedProducer, whose job is to create a thread and generate the updates for the item.
ExternalFeedProducer myProducer = new ExternalFeedProducer(itemName,
_openprices[i], _refprices[i], _minprices[i], _maxprices[i],
_updateTimeMeans[i], _updateTimeStdDevs[i], _stockNames[i]);
_stockGenerators[itemName]= myProducer;
myProducer.SetFeedListener(_listener);
myProducer.Start();
}
...
}
private void Run()
{
...
}
Now, I want to call my function every 5 seconds, it starts generating update events for the stocks, attaching and reading from an external broadcast feed (in step 1). How do I do?
Can u help me?
Similar Threads
-
By hungn in forum Adapter SDKs
Replies: 8
Last Post: May 7th, 2008, 09:53 AM
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 01:41 AM.
Bookmarks