org.objectweb.jonas.ear.lib
Class EarCleaner

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--org.objectweb.jonas.ear.lib.EarCleaner
All Implemented Interfaces:
java.lang.Runnable

public class EarCleaner
extends java.lang.Thread

JOnAS Ear unused direcotry cleaner class. This class provides a way for removing directories wich are unconsistent directories for ear files.

Author:
Florent Benoit, Ludovic Bert

Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Method Summary
static EarCleaner getInstance(java.net.URL earApps, EarDeployerLog earDeployerLog)
          Get an instance of the EarCleaner.
 java.util.Vector removeUnusedDirectories()
          Remove the unused directories and return the new Vector of ears.
 void run()
          Start the thread of this class It will remove all directories
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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

getInstance

public static EarCleaner getInstance(java.net.URL earApps,
                                     EarDeployerLog earDeployerLog)
Get an instance of the EarCleaner.
Parameters:
earApps - the jonasroot apps directory
earDeployerLog - the deployer logger
Returns:
the instance of the EarCleaner.

run

public void run()
Start the thread of this class It will remove all directories
Overrides:
run in class java.lang.Thread

removeUnusedDirectories

public java.util.Vector removeUnusedDirectories()
                                         throws EarCleanerException
Remove the unused directories and return the new Vector of ears.
Returns:
the new earEntry vector.
Throws:
EarCleanerException - if it failed.