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 classLifecycleManagerImpl.FileDeletor
-
Constructor Summary
Constructors Constructor Description LifecycleManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileAccessorcreate(String attachmentDir)Create a unique file in the designated directoryvoiddelete(File file)Deletes attachment filevoiddeleteOnExit(File file)Mark the file for deletion on application/VM exitvoiddeleteOnTimeInterval(int interval, File file)Mark attachment file for deletion when designated time interval in seconds has elapsed.FileAccessorgetFileAccessor(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:LifecycleManagerCreate a unique file in the designated directory- Specified by:
createin interfaceLifecycleManager- Returns:
- the
FileAccessorfor the file created by this method - Throws:
IOException
-
delete
public void delete(File file) throws IOException
Description copied from interface:LifecycleManagerDeletes attachment file- Specified by:
deletein interfaceLifecycleManager- Throws:
IOException
-
deleteOnExit
public void deleteOnExit(File file) throws IOException
Description copied from interface:LifecycleManagerMark the file for deletion on application/VM exit- Specified by:
deleteOnExitin interfaceLifecycleManager- Throws:
IOException
-
deleteOnTimeInterval
public void deleteOnTimeInterval(int interval, File file) throws IOExceptionDescription copied from interface:LifecycleManagerMark attachment file for deletion when designated time interval in seconds has elapsed.- Specified by:
deleteOnTimeIntervalin interfaceLifecycleManager- Throws:
IOException
-
getFileAccessor
public FileAccessor getFileAccessor(String fileName) throws IOException
Description copied from interface:LifecycleManagerThis method will return the file accessor associated with this file.- Specified by:
getFileAccessorin interfaceLifecycleManager- Returns:
- the
FileAccessorobject for the given file - Throws:
IOException
-
-