Class FileCopier

All Implemented Interfaces:

public class FileCopier
extends java.lang.Object
implements java.lang.Runnable

A background process that starts file copy commands. The process uses a Queue that holds aFile2Copy objects. The copier is started by file transfer VWMs such as PageMaster, who maintain the queue by filling it with information on files to transfer. FileCopier does not copy files itself, instead, it starts a SCPcopy class for each file to be copied.

Rico Jansen, Pierer van Rooden (javadocs)

Constructor Summary
FileCopier(Queue files)
          Constructor for the Filecopier
Method Summary
 void doWork()
          Main work loop.
 void init()
          Intializes the class.
 void run()
          Main loop, exception-protected.
 void start()
          Starts the main Thread.
 void stop()
          Stops the main Thread.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public FileCopier(Queue files)
Constructor for the Filecopier
files - the Queue that holds (or will hold) the files to copy. The queue is maintained by the calling class.
Method Detail


public void init()
Intializes the class. Starts the thread for this class.


public void start()
Starts the main Thread.


public void stop()
Stops the main Thread.


public void run()
Main loop, exception-protected.
Specified by:
run in interface java.lang.Runnable
See Also:


public void doWork()
Main work loop. Checks the Queue, and if a new object is available, creates a new SCPcopy object to handle the transfer.

MMBase build