org.omnaest.utils.download
Class DownloadManager

java.lang.Object
  extended by org.omnaest.utils.download.DownloadManager
All Implemented Interfaces:
Runnable

public class DownloadManager
extends Object
implements Runnable

A download manager manages different download instances.

Author:
Omnaest

Method Summary
 DownloadConnection getDownloadConnection()
          Returns a new instance of a downloadconnection.
static DownloadManager getInstance()
          Returns an instance of the download manager.
 void run()
           
protected  void startThreadPooled(Thread thread)
          Adds the given thread to the thread aspirant list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static DownloadManager getInstance()
Returns an instance of the download manager. If no instance exists, one is created. Normally there is only one instance (singleton).

Returns:

getDownloadConnection

public DownloadConnection getDownloadConnection()
Returns a new instance of a downloadconnection.

Returns:

startThreadPooled

protected void startThreadPooled(Thread thread)
Adds the given thread to the thread aspirant list. As early as possible the thread will then be started from the threadpoolmanager.

Parameters:
thread -

run

public void run()
Specified by:
run in interface Runnable


Copyright © 2013. All Rights Reserved.