|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IFileCleaner
Keeps track of files awaiting deletion, and deletes them when an associated marker object is reclaimed by the garbage collector.
Needed to remove files created temporarily for the needs of FileUpload functionality.
Method Summary | |
---|---|
void |
destroy()
Call this method to stop the cleaner and to free all allocated resources by it |
void |
track(java.io.File file,
java.lang.Object marker)
Track the specified file, using the provided marker, deleting the file when the marker instance is garbage collected. |
void |
track(java.io.File file,
java.lang.Object marker,
FileDeleteStrategy deleteStrategy)
Track the specified file, using the provided marker, deleting the file when the marker instance is garbage collected. |
Method Detail |
---|
void track(java.io.File file, java.lang.Object marker)
file
- the file to be tracked, not nullmarker
- the marker object used to track the file, not null
java.lang.NullPointerException
- if the file is nullvoid track(java.io.File file, java.lang.Object marker, FileDeleteStrategy deleteStrategy)
file
- the file to be tracked, not nullmarker
- the marker object used to track the file, not nulldeleteStrategy
- the strategy that actually deletes the file. E.g. to delete a non-empty folder the
strategy should delete all children first
java.lang.NullPointerException
- if the file is nullvoid destroy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |