org.objectweb.jonas_lib.deployment.work
Class WorkCleaner

java.lang.Object
  extended by java.lang.Thread
      extended by org.objectweb.jonas_lib.deployment.work.WorkCleaner
All Implemented Interfaces:
java.lang.Runnable

public class WorkCleaner
extends java.lang.Thread

JOnAS work deployment files and directories cleaner class. This class provides a way for removing entries wich are unconsistent.

Author:
Florent Benoit, Ludovic Bert, Benoit PELLETIER

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Method Summary
 void executeTasks()
          Execute the registered tasks
static WorkCleaner getInstance()
          Get an instance of the Work Cleaner.
protected static org.objectweb.util.monolog.api.Logger getLogger()
           
 void registerTask(AbsCleanTask absCleanTask)
          Register a new clean task
 void run()
          Start the thread of this class It will clean all the work entries
 
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
 

Method Detail

getLogger

protected static org.objectweb.util.monolog.api.Logger getLogger()
Returns:
the logger

getInstance

public static WorkCleaner getInstance()
Get an instance of the Work Cleaner.

Returns:
the instance of the Work Cleaner.

registerTask

public void registerTask(AbsCleanTask absCleanTask)
                  throws CleanerException
Register a new clean task

Parameters:
absCleanTask - the task to add
Throws:
CleanerException - if the task cannot be registred

executeTasks

public void executeTasks()
Execute the registered tasks


run

public void run()
Start the thread of this class It will clean all the work entries

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread