openlsd.appli.autoimport.commonimport
Class LSDImportFile

java.lang.Object
  extended by openlsd.appli.autoimport.commonimport.LSDImportFile
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
LSDImportFileExtOp, LSMImportFileExtOp

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

Class to really import files into LSD and DB with a physical access to the file for the LSD server

Author:
Frederic Bregier LGPL

Field Summary
protected  LSDDbAdmin admin
          DB Admin object
protected  java.io.File file
          File to import
protected  boolean isBatch
          Is this import done in Batch mode
protected  LSDCommonFunctions lcf
          Common Functions Object
protected  java.util.concurrent.ConcurrentLinkedQueue<LSDExtQueueMember> queue
          Queue of Member to import
 
Constructor Summary
LSDImportFile(LSDDbAdmin admin, java.util.concurrent.ConcurrentLinkedQueue<LSDExtQueueMember> queue, java.util.concurrent.ConcurrentLinkedQueue<LSDExtQueueMember> result, boolean isBatch)
          Create an ImportFile Thread Runner from DB, RunQueue and ResultQueue
 
Method Summary
protected  boolean executeImport(LSDExtQueueMember member)
          Run the import of one file from the Run Queue and put the result in the Done Queue
 void run()
          Run the import of all files from the Run Queue and put the result in the Done Queue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

queue

protected java.util.concurrent.ConcurrentLinkedQueue<LSDExtQueueMember> queue
Queue of Member to import


admin

protected LSDDbAdmin admin
DB Admin object


file

protected java.io.File file
File to import


isBatch

protected boolean isBatch
Is this import done in Batch mode


lcf

protected LSDCommonFunctions lcf
Common Functions Object

Constructor Detail

LSDImportFile

public LSDImportFile(LSDDbAdmin admin,
                     java.util.concurrent.ConcurrentLinkedQueue<LSDExtQueueMember> queue,
                     java.util.concurrent.ConcurrentLinkedQueue<LSDExtQueueMember> result,
                     boolean isBatch)
Create an ImportFile Thread Runner from DB, RunQueue and ResultQueue

Parameters:
admin -
queue -
result -
isBatch -
Method Detail

run

public void run()
Run the import of all files from the Run Queue and put the result in the Done Queue

Specified by:
run in interface java.lang.Runnable

executeImport

protected boolean executeImport(LSDExtQueueMember member)
Run the import of one file from the Run Queue and put the result in the Done Queue

Parameters:
member -
Returns:
True if OK, else False