Interface LifecycleManager
- All Known Implementing Classes:
LifecycleManagerImpl
public interface LifecycleManager
Lifecycle Manager will be used to manage the lifecycle of attachment files.
Axiom forks attachment processing based on the size of attachment to be processed.
Attachments are either processed by storing them in memory or by storing them in
file system based on the size of the attachment file.
Lifecycle Manager provides and organized way of managing attachments, by providing
calls to create and delete attachments.
-
Method Summary
Modifier and TypeMethodDescriptionCreate a unique file in the designated directoryvoid
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.getFileAccessor
(String file) This method will return the file accessor associated with this file.
-
Method Details
-
create
Create a unique file in the designated directory- Parameters:
attachmentDir
-- Returns:
- the
FileAccessor
for the file created by this method - Throws:
IOException
-
delete
Deletes attachment file- Parameters:
file
-- Throws:
IOException
-
deleteOnExit
Mark the file for deletion on application/VM exit- Parameters:
file
-- Throws:
IOException
-
deleteOnTimeInterval
Mark attachment file for deletion when designated time interval in seconds has elapsed.- Parameters:
interval
-file
-- Throws:
IOException
-
getFileAccessor
This method will return the file accessor associated with this file.- Parameters:
file
-- Returns:
- the
FileAccessor
object for the given file - Throws:
IOException
-