public interface LifecycleManager
| Modifier and Type | Method and Description |
|---|---|
FileAccessor |
create(String attachmentDir)
Create a unique file in the designated directory
|
void |
delete(File file)
Deletes attachment file
|
void |
deleteOnExit(File file)
Mark the file for deletion on application/VM exit
|
void |
deleteOnTimeInterval(int interval,
File file)
Mark attachment file for deletion when designated time interval in seconds
has elapsed.
|
FileAccessor |
getFileAccessor(String file)
This method will return the file accessor associated with this file.
|
FileAccessor create(String attachmentDir) throws IOException
attachmentDir - FileAccessor for the file created by this methodIOExceptionvoid delete(File file) throws IOException
file - IOExceptionvoid deleteOnExit(File file) throws IOException
file - IOExceptionvoid deleteOnTimeInterval(int interval,
File file)
throws IOException
interval - file - IOExceptionFileAccessor getFileAccessor(String file) throws IOException
file - FileAccessor object for the given fileIOExceptionCopyright © The Apache Software Foundation. All Rights Reserved.