de.knup.jedi.jayshare
Class DownloadQueueManager

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--de.knup.jedi.jayshare.DownloadQueueManager

public class DownloadQueueManager
extends java.lang.Thread

DownloadQueueManager downloads the items in the queue and removes them from it.

Version:
0.1 $Revision: 1.4 $
Author:
B. Pietsch

Inner Class Summary
private static class DownloadQueueManager.GetFile
          GetFile represents a single file item in the temporary download vector.
 
Field Summary
private static long RESPONSE_DELAY_TIME
          Defines how long to wait for the service requests to be replied.
private  Status status
          Reference to the status instance.
 
Fields inherited from class java.lang.Thread
contextClassLoader, daemon, eetop, group, inheritedAccessControlContext, MAX_PRIORITY, MIN_PRIORITY, name, NORM_PRIORITY, priority, single_step, stillborn, stopThreadPermission, target, threadInitNumber, threadQ, values
 
Constructor Summary
DownloadQueueManager(Status status)
          Create a download queue manager.
 
Method Summary
 void run()
          Start downloading all files in the queue.
 
Methods inherited from class java.lang.Thread
, activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, exit, getContextClassLoader, getName, getPriority, getThreadGroup, init, interrupt, interrupt0, interrupted, isAlive, isDaemon, isInterrupted, isInterrupted, join, join, join, nextThreadNum, registerNatives, resume, resume0, setContextClassLoader, setDaemon, setName, setPriority, setPriority0, sleep, sleep, start, stop, stop, stop0, suspend, suspend0, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESPONSE_DELAY_TIME

private static final long RESPONSE_DELAY_TIME
Defines how long to wait for the service requests to be replied.

status

private Status status
Reference to the status instance.
Constructor Detail

DownloadQueueManager

public DownloadQueueManager(Status status)
Create a download queue manager.
Parameters:
status - is a reference to the current status instance.
Method Detail

run

public void run()
Start downloading all files in the queue. It searches for all file items in the queue and sends service requests to their users (if the service information is not yet available). It waits for RESPONSE_DELAY_TIME milliseconds and then starts downloading files.
Overrides:
run in class java.lang.Thread