jxtaimpl
Class Downloader

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--jxtaimpl.Downloader
All Implemented Interfaces:
Runnable

public class Downloader
extends Thread

This class is in charge of downloading resources found by ants. This is accomplished getting connected to the DownloadService deamon whose pipe advertisement can be created starting from the pipeXXX properties found in the AnthillResource instance

Author:
Francesco Russo (frusso@cs.unibo.it)

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Downloader(AnthillResource res, AnthillGroup grp, CmsStorage storage)
          This is this class' constructor.
 
Method Summary
 void run()
          This method implements the Downloader's logic
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Downloader

public Downloader(AnthillResource res,
                  AnthillGroup grp,
                  CmsStorage storage)
This is this class' constructor. It needs an AnthillResource describing the resource to download, a reference to the AnthillGroup and to the local CmsStorage where the resource will be saved

Parameters:
res - The AnthillResource describing the resource to download
grp - A reference to the AnthillGroup instance
storage - A reference to the jxtaimpl.storage.CmsStorage instance were the downloaded resource should be placed
Method Detail

run

public void run()
This method implements the Downloader's logic

Specified by:
run in interface Runnable
Overrides:
run in class Thread