org.nuiton.i18n.plugin.parser
Class ParserThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.nuiton.i18n.plugin.parser.ParserThread
All Implemented Interfaces:
Runnable

public class ParserThread
extends Thread

A thread to launch parser on files.

Since:
1.2
Author:
tchemit

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
protected  int nbFiles
          number of files registred to consume
protected  org.nuiton.io.SortedProperties result
          the shared result where to merge atomic results
protected  BlockingQueue<org.nuiton.i18n.plugin.parser.ParserThread.ParserTask> tasks
           
protected  List<File> touchedFiles
          list of files touched (says having at least one i18n key)
protected  List<File> treatedFiles
          list of files consumed
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ParserThread(org.nuiton.io.SortedProperties result)
           
 
Method Summary
 void addFile(FileParser parser, File... files)
           
 void clear()
           
 List<File> getTouchedFiles()
           
 List<File> getTreatedFiles()
           
 void run()
           
 void terminatesAndWaits()
           
 
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

tasks

protected final BlockingQueue<org.nuiton.i18n.plugin.parser.ParserThread.ParserTask> tasks

treatedFiles

protected final List<File> treatedFiles
list of files consumed


touchedFiles

protected final List<File> touchedFiles
list of files touched (says having at least one i18n key)


result

protected final org.nuiton.io.SortedProperties result
the shared result where to merge atomic results


nbFiles

protected int nbFiles
number of files registred to consume

Constructor Detail

ParserThread

public ParserThread(org.nuiton.io.SortedProperties result)
Method Detail

getTreatedFiles

public List<File> getTreatedFiles()

getTouchedFiles

public List<File> getTouchedFiles()

addFile

public void addFile(FileParser parser,
                    File... files)

terminatesAndWaits

public void terminatesAndWaits()

clear

public void clear()

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread


Copyright © 2007-2010 CodeLutin. All Rights Reserved.