public class LifecycleManagerImpl extends Object implements LifecycleManager
| Modifier and Type | Class and Description |
|---|---|
class |
LifecycleManagerImpl.FileDeletor |
| Constructor and Description |
|---|
LifecycleManagerImpl() |
| 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 fileName)
This method will return the file accessor associated with this file.
|
public FileAccessor create(String attachmentDir) throws IOException
LifecycleManagercreate in interface LifecycleManagerFileAccessor for the file created by this methodIOExceptionpublic void delete(File file) throws IOException
LifecycleManagerdelete in interface LifecycleManagerIOExceptionpublic void deleteOnExit(File file) throws IOException
LifecycleManagerdeleteOnExit in interface LifecycleManagerIOExceptionpublic void deleteOnTimeInterval(int interval,
File file)
throws IOException
LifecycleManagerdeleteOnTimeInterval in interface LifecycleManagerIOExceptionpublic FileAccessor getFileAccessor(String fileName) throws IOException
LifecycleManagergetFileAccessor in interface LifecycleManagerFileAccessor object for the given fileIOExceptionCopyright © The Apache Software Foundation. All Rights Reserved.