net.sf.jfilesync.engine.worker
Class DataCollectWorker

java.lang.Object
  extended by java.lang.Thread
      extended by net.sf.gnocchi.GWorker
          extended by net.sf.jfilesync.engine.worker.DataCollectWorker
All Implemented Interfaces:
java.lang.Runnable

public class DataCollectWorker
extends net.sf.gnocchi.GWorker


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  TFileData collection
           
private  AbstractConnectionProxy con
           
private  int filesCollected
           
private  boolean followSymLinks
           
private  int job
           
private static int JOB_COLLECT_FROM_PATH
           
private static int JOB_COLLECT_FROM_SELECTION
           
(package private) static java.util.logging.Logger logger
           
private  boolean recursive
           
private  TFileProperties[] startData
           
private  java.lang.String startPath
           
 
Fields inherited from class net.sf.gnocchi.GWorker
STATE_DIED, STATE_DONE, STATE_INTERRUPTED, STATE_READY, STATE_RUNNING
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
DataCollectWorker(AbstractConnectionProxy connection, java.lang.String path, boolean recursive, boolean follow_symlinks)
           
DataCollectWorker(AbstractConnectionProxy connection, TFileProperties[] dataIn, boolean recursive, boolean follow_symlinks)
           
 
Method Summary
private  void collectFilesFromQueue(java.util.List<TFileProperties> queue)
           
private  void collectFilesInDir(java.lang.String path, java.util.List<TFileProperties> dirQueue)
           
 net.sf.gnocchi.GWorkerEvent construct()
           
private  void doCollectJobFromPath()
           
private  void doCollectJobFromSel()
           
 void task()
           
 
Methods inherited from class net.sf.gnocchi.GWorker
addObserver, cancel, customCancel, getException, getObserver, getWorkerState, hasDied, isCancelled, isDone, isFinished, isRunning, run, setDied
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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
 

Field Detail

JOB_COLLECT_FROM_SELECTION

private static final int JOB_COLLECT_FROM_SELECTION
See Also:
Constant Field Values

JOB_COLLECT_FROM_PATH

private static final int JOB_COLLECT_FROM_PATH
See Also:
Constant Field Values

con

private final AbstractConnectionProxy con

startData

private TFileProperties[] startData

startPath

private java.lang.String startPath

recursive

private final boolean recursive

followSymLinks

private final boolean followSymLinks

job

private final int job

collection

private TFileData collection

logger

static java.util.logging.Logger logger

filesCollected

private int filesCollected
Constructor Detail

DataCollectWorker

public DataCollectWorker(AbstractConnectionProxy connection,
                         java.lang.String path,
                         boolean recursive,
                         boolean follow_symlinks)

DataCollectWorker

public DataCollectWorker(AbstractConnectionProxy connection,
                         TFileProperties[] dataIn,
                         boolean recursive,
                         boolean follow_symlinks)
Method Detail

task

public void task()
          throws java.lang.Exception
Specified by:
task in class net.sf.gnocchi.GWorker
Throws:
java.lang.Exception

construct

public net.sf.gnocchi.GWorkerEvent construct()
Specified by:
construct in class net.sf.gnocchi.GWorker

doCollectJobFromPath

private void doCollectJobFromPath()
                           throws java.io.IOException
Throws:
java.io.IOException

doCollectJobFromSel

private void doCollectJobFromSel()
                          throws java.io.IOException
Throws:
java.io.IOException

collectFilesFromQueue

private void collectFilesFromQueue(java.util.List<TFileProperties> queue)
                            throws java.io.IOException
Throws:
java.io.IOException

collectFilesInDir

private void collectFilesInDir(java.lang.String path,
                               java.util.List<TFileProperties> dirQueue)
                        throws java.io.IOException
Throws:
java.io.IOException