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 methodIOException
void delete(File file) throws IOException
file
- IOException
void deleteOnExit(File file) throws IOException
file
- IOException
void deleteOnTimeInterval(int interval, File file) throws IOException
interval
- file
- IOException
FileAccessor getFileAccessor(String file) throws IOException
file
- FileAccessor
object for the given fileIOException
Copyright © 2004–2018 The Apache Software Foundation. All rights reserved.