|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
org.nuiton.i18n.plugin.parser.ParserThread
public class ParserThread
A thread to launch parser on files.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
protected I18nParserConfiguration |
configuration
the incoming configuration (from mojo which contains shared result and logger) |
protected int |
nbFiles
number of files registred to consume |
protected BlockingQueue<org.nuiton.i18n.plugin.parser.ParserThread.ParserTask> |
tasks
queue of tasks to consume |
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(I18nParserConfiguration configuration)
|
|
| Method Summary | |
|---|---|
void |
addFile(FileParser parser,
File... files)
Add a file to be consumed. |
void |
clear()
clean internal state after usage of the thread. |
protected ExecutorService |
createExecutor()
Creates the ExecutorService which will consumed i8n tasks. |
protected I18nParserConfiguration |
getConfiguration()
|
org.apache.maven.plugin.logging.Log |
getLog()
|
protected int |
getNbFilesToTreate()
|
org.nuiton.io.SortedProperties |
getResult()
|
List<File> |
getTouchedFiles()
|
List<File> |
getTreatedFiles()
|
boolean |
isShowTouchedFiles()
|
boolean |
isSilent()
|
boolean |
isVerbose()
|
void |
run()
|
void |
terminatesAndWaits()
Ask the thread to stop. |
| 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 |
|---|
protected final I18nParserConfiguration configuration
protected final BlockingQueue<org.nuiton.i18n.plugin.parser.ParserThread.ParserTask> tasks
protected final List<File> treatedFiles
protected final List<File> touchedFiles
protected int nbFiles
| Constructor Detail |
|---|
public ParserThread(I18nParserConfiguration configuration)
| Method Detail |
|---|
public boolean isVerbose()
isVerbose in interface I18nParserConfigurationpublic boolean isSilent()
isSilent in interface I18nParserConfigurationpublic boolean isShowTouchedFiles()
isShowTouchedFiles in interface I18nParserConfigurationpublic org.apache.maven.plugin.logging.Log getLog()
getLog in interface I18nParserConfigurationpublic org.nuiton.io.SortedProperties getResult()
getResult in interface I18nParserConfigurationpublic List<File> getTreatedFiles()
public List<File> getTouchedFiles()
public void addFile(FileParser parser,
File... files)
parser - the parser of the filefiles - files to parsepublic void terminatesAndWaits()
public void run()
run in interface Runnablerun in class Threadpublic void clear()
protected ExecutorService createExecutor()
ExecutorService which will consumed i8n tasks.
protected I18nParserConfiguration getConfiguration()
protected int getNbFilesToTreate()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||