Class LifecycleManagerImpl
- java.lang.Object
-
- org.apache.axiom.attachments.lifecycle.impl.LifecycleManagerImpl
-
- All Implemented Interfaces:
LifecycleManager
public class LifecycleManagerImpl extends Object implements LifecycleManager
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
LifecycleManagerImpl.FileDeletor
-
Constructor Summary
Constructors Constructor Description LifecycleManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileAccessor
create(String attachmentDir)
Create a unique file in the designated directoryvoid
delete(File file)
Deletes attachment filevoid
deleteOnExit(File file)
Mark the file for deletion on application/VM exitvoid
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.
-
-
-
Method Detail
-
create
public FileAccessor create(String attachmentDir) throws IOException
Description copied from interface:LifecycleManager
Create a unique file in the designated directory- Specified by:
create
in interfaceLifecycleManager
- Returns:
- the
FileAccessor
for the file created by this method - Throws:
IOException
-
delete
public void delete(File file) throws IOException
Description copied from interface:LifecycleManager
Deletes attachment file- Specified by:
delete
in interfaceLifecycleManager
- Throws:
IOException
-
deleteOnExit
public void deleteOnExit(File file) throws IOException
Description copied from interface:LifecycleManager
Mark the file for deletion on application/VM exit- Specified by:
deleteOnExit
in interfaceLifecycleManager
- Throws:
IOException
-
deleteOnTimeInterval
public void deleteOnTimeInterval(int interval, File file) throws IOException
Description copied from interface:LifecycleManager
Mark attachment file for deletion when designated time interval in seconds has elapsed.- Specified by:
deleteOnTimeInterval
in interfaceLifecycleManager
- Throws:
IOException
-
getFileAccessor
public FileAccessor getFileAccessor(String fileName) throws IOException
Description copied from interface:LifecycleManager
This method will return the file accessor associated with this file.- Specified by:
getFileAccessor
in interfaceLifecycleManager
- Returns:
- the
FileAccessor
object for the given file - Throws:
IOException
-
-