org.apache.wicket.util.file
Class FileUploadCleaner
java.lang.Object
org.apache.wicket.util.file.FileUploadCleaner
- All Implemented Interfaces:
- IFileUploadCleaner
public class FileUploadCleaner
- extends Object
- implements IFileUploadCleaner
Default implementation of IFileUploadCleaner that uses Apache commons-io
FileCleaningTracker to track and clean the temporary created files.
Note: this implementation starts a daemon thread to do the actual work, so it may not be used in
some environments like Google AppEngine.
|
Method Summary |
void |
destroy()
Call this method to stop the cleaner and to free all allocated resources by it |
void |
track(File file,
Object marker)
Track the specified file, using the provided marker, deleting the file when the marker
instance is garbage collected. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileUploadCleaner
public FileUploadCleaner()
track
public void track(File file,
Object marker)
- Description copied from interface:
IFileUploadCleaner
- Track the specified file, using the provided marker, deleting the file when the marker
instance is garbage collected.
- Specified by:
track in interface IFileUploadCleaner
- Parameters:
file - the file to be tracked, not nullmarker - the marker object used to track the file, not null
destroy
public void destroy()
- Description copied from interface:
IFileUploadCleaner
- Call this method to stop the cleaner and to free all allocated resources by it
- Specified by:
destroy in interface IFileUploadCleaner
Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.