login
Forgot?
Login with Facebook

Don't have an account? Register one now!

Multi-thread

Bids 
3
Avg Bid
$30 USD
CLOSED
  • Project ID:

    569105
  • Project Type:

    Fixed
  • Budget:

    $30-$250 USD

Project Description:

I have done a Download manager that works just fine. I need to re-write just a tiny bit of it with a monitor (multi-thread) It is not so much work but I cant get it to work proberlyI need this:

I got all the code for a running app and need to rewrite so it works with the multi-thread(notify, wait)

The Downloader class
This class inherits from Thread and, of course, has a run()-method where all its work is done. As it is supposed to download a networked file, it will need a URL. The controller will notify each thread when the URL is written to disk. This means the Downloader class constructor must have a parameter that is a reference to a Controller object (a method in the Controller class is called from each Downloader instance). When notified that there is a URL available, a Downloader should read that URL from a file (with a fixed name, in a fixed place (preferably in the working directory)), delete the file and then proceed to download the networked file to disk (preferably to the working directory). This means that each thread in its run() method should call the Controllers getURL() method (see below).
The Controller class
This class plays the role of monitor. There should be a method in this class called getURL() that will be called by the individual threads. This means that this method should be synchronized and use wait() and notify() calls. There should also be a boolean in this class, indicating whether there is a URL-file for consumption. This boolean will be used by the main() method (see below). When the Controller has notified a Downloader that there is a URL file to be consumed, the boolean should be reset (false).

Skills required:

Java

Project posted by:

nero2000 Sweden
(9 Reviews)

Last seen:

If you are the project creator or one of the bidders, please Log In for more options.


Awarded Bids

Aoogoo China
Aoogoo
China From China     Offline
  Foundation EUFreelance.com Member
 Accepted
$30 in 0 days 
0
over 2 years ago
5.0

2.2

3 Reviews
50% Completion Rate
I can do this project withnot deadlock. Please contract me.

All Bids ()

siamsoft061 Bangladesh
freelancer logo.png
siamsoft061
Bangladesh From Bangladesh     Offline
  Freelancer Orientation (85%, 99th percentile)
  General Freelancer Orientation (85%, 95th percentile)
$30 in 2 days 
0
over 2 years ago
5.0

2.2

2 Reviews
72% Completion Rate
sir , i have three years experience in java. i use multi-threading in many project in university . i am ready to work.....
jamesetaylor United Kingdom
Logo300.png
jamesetaylor
United Kingdom From United Kingdom     Offline
  Foundation EUFreelance.com Member
$30 in 1 day 
0
over 2 years ago
0.0

0.0

0 Reviews
0% Completion Rate
I suggest using the Command pattern would suit your needs better. So you would wrap each download task up in its own object (implementing Runnable) and then dispatch this onto a java.util.concurrent.ThreadPoolExecut... more
I suggest using the Command pattern would suit your needs better. So you would wrap each download task up in its own object (implementing Runnable) and then dispatch this onto a java.util.concurrent.ThreadPoolExecutor. I'd be happy to show you how to do this. less