com.huguesjohnson
Class BatchCompressionThread

java.lang.Object
  extended by com.huguesjohnson.BatchCompressionThread
All Implemented Interfaces:
java.lang.Runnable

public abstract class BatchCompressionThread
extends java.lang.Object
implements java.lang.Runnable

BatchCompressionThread compresses a list of files into individual archives.

Author:
Hugues Johnson

Constructor Summary
BatchCompressionThread(BatchCompressionThreadParameters parameters)
          Creates a new instance of BatchCompressionThread.
 
Method Summary
 void run()
          Starts the batch compression thread, archives each file in the file list and performs the action specified in the parameters.
 void start()
          Begins thread execution.
abstract  void updateCurrentFileProgress(java.lang.String status, int percentComplete)
          Updates status and percent complete for the current file.
abstract  void updateTotalProgress(java.lang.String status, int percentComplete)
          Updates status and percent complete for the overall progress.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchCompressionThread

public BatchCompressionThread(BatchCompressionThreadParameters parameters)
Creates a new instance of BatchCompressionThread.

Parameters:
parameters - The parameters for the thread.
Method Detail

start

public void start()
Begins thread execution.


run

public void run()
Starts the batch compression thread, archives each file in the file list and performs the action specified in the parameters.

Override updateTotalProgress & updateCurrentFileProgress to monitor the progress of the thread.

Specified by:
run in interface java.lang.Runnable

updateTotalProgress

public abstract void updateTotalProgress(java.lang.String status,
                                         int percentComplete)
Updates status and percent complete for the overall progress. Override this when implementing this class to receive status update.

Parameters:
status - a brief description.
percentComplete - The percent complete for the current operation.

updateCurrentFileProgress

public abstract void updateCurrentFileProgress(java.lang.String status,
                                               int percentComplete)
Updates status and percent complete for the current file. Override this when implementing this class to receive status update.

Parameters:
status - A brief description.
percentComplete - The percent complete for the current operation.


Copyright © 2000-2007 Hugues Johnson