org.mmbase.module.builders.vwms
Class FileCopier

java.lang.Object
  |
  +--org.mmbase.module.builders.vwms.FileCopier
All Implemented Interfaces:
java.lang.Runnable

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.

Author:
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

FileCopier

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

init

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

start

public void start()
Starts the main Thread.

stop

public void stop()
Stops the main Thread.

run

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

doWork

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 1.6.5.20030923