The Artima Developer Community
Sponsored Link

Java Answers Forum
Thread question

1 reply on 1 page. Most recent reply: Jul 13, 2006 7:31 AM by joe smith

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Jeff Miljkovic-Brake

Posts: 1
Nickname: jeffmbrake
Registered: Jun, 2006

Thread question Posted: Jun 6, 2006 8:26 AM
Reply to this message Reply
Advertisement
I came across this problem recently which left me puzzled. Any help would be greatly appreciated! The problem is as follows:

An adaptor class takes subscription requests for live prices from an application and forces them onto a single thread. The creation of the price feed, subscription and unsubscription must happen on the SAME thread for the price feed to work; method calls on the adaptor are not guaranteed to be on the same thread. Assume that only open connection is open for the application.

The adaptor class has the following methods:

void openConnection(String connectionDetails);
void subscribe(String symbol, PriceCallback callback);
void unsubscribe(String symbol);

The PriceFeed class looks as follows:

public class PriceFeed
{
PriceFeed(String connectionDetails);
subscribe(String symbol, PriceCallback callback);
unsubscribe(String symbol);
}


joe smith

Posts: 21
Nickname: jetbrains
Registered: Jan, 2006

Re: Thread question Posted: Jul 13, 2006 7:31 AM
Reply to this message Reply
See java thread tutorial at below link,help useful to you


http://www.developerzone.biz/index.php?option=com_content&task=view&id=119&Itemid=36&PHPSESSID=16119a01590233938c4b4cde11e44aec

Flat View: This topic has 1 reply on 1 page
Topic: How can I use input devices other than keyboard and mouse? Previous Topic   Next Topic Topic: Still in love with my bag!

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use