org.apache.manifoldcf.core.system
Class ManifoldCF.FileTrack

java.lang.Object
  extended by org.apache.manifoldcf.core.system.ManifoldCF.FileTrack
All Implemented Interfaces:
IShutdownHook
Enclosing class:
ManifoldCF

protected static class ManifoldCF.FileTrack
extends java.lang.Object
implements IShutdownHook

Class that tracks files that need to be cleaned up on exit


Field Summary
protected  java.util.HashMap filesToDelete
          Key and value are both File objects
 
Constructor Summary
ManifoldCF.FileTrack()
          Constructor
 
Method Summary
 void addFile(java.io.File f)
          Add a file to track
 void deleteFile(java.io.File f)
          Delete a file
 void doCleanup()
          Delete all remaining files
protected  void finalize()
          Finalizer, which is designed to catch class unloading that tomcat 5.5 does.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filesToDelete

protected java.util.HashMap filesToDelete
Key and value are both File objects

Constructor Detail

ManifoldCF.FileTrack

public ManifoldCF.FileTrack()
Constructor

Method Detail

addFile

public void addFile(java.io.File f)
Add a file to track


deleteFile

public void deleteFile(java.io.File f)
Delete a file


doCleanup

public void doCleanup()
               throws ManifoldCFException
Delete all remaining files

Specified by:
doCleanup in interface IShutdownHook
Throws:
ManifoldCFException

finalize

protected void finalize()
                 throws java.lang.Throwable
Finalizer, which is designed to catch class unloading that tomcat 5.5 does.

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable