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
LifecycleManager
create
in interface LifecycleManager
IOException
public void delete(File file) throws IOException
LifecycleManager
delete
in interface LifecycleManager
IOException
public void deleteOnExit(File file) throws IOException
LifecycleManager
deleteOnExit
in interface LifecycleManager
IOException
public void deleteOnTimeInterval(int interval, File file) throws IOException
LifecycleManager
deleteOnTimeInterval
in interface LifecycleManager
IOException
public FileAccessor getFileAccessor(String fileName) throws IOException
LifecycleManager
getFileAccessor
in interface LifecycleManager
IOException
Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.