org.apache.axiom.attachments.lifecycle.impl
Class LifecycleManagerImpl
java.lang.Object
org.apache.axiom.attachments.lifecycle.impl.LifecycleManagerImpl
- All Implemented Interfaces:
- LifecycleManager
public class LifecycleManagerImpl
- extends java.lang.Object
- implements LifecycleManager
Field Summary |
private VMShutdownHook |
hook
|
private static org.apache.commons.logging.Log |
log
|
private static java.util.Hashtable |
table
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static final org.apache.commons.logging.Log log
table
private static java.util.Hashtable table
hook
private VMShutdownHook hook
LifecycleManagerImpl
public LifecycleManagerImpl()
create
public FileAccessor create(java.lang.String attachmentDir)
throws java.io.IOException
- Description copied from interface:
LifecycleManager
- Create a unique file in the designated directory
- Specified by:
create
in interface LifecycleManager
- Returns:
-
- Throws:
java.io.IOException
delete
public void delete(java.io.File file)
throws java.io.IOException
- Description copied from interface:
LifecycleManager
- Deletes attachment file
- Specified by:
delete
in interface LifecycleManager
- Throws:
java.io.IOException
deleteOnExit
public void deleteOnExit(java.io.File file)
throws java.io.IOException
- Description copied from interface:
LifecycleManager
- Mark the file for deletion on application/VM exit
- Specified by:
deleteOnExit
in interface LifecycleManager
- Throws:
java.io.IOException
deleteOnTimeInterval
public void deleteOnTimeInterval(int interval,
java.io.File file)
throws java.io.IOException
- Description copied from interface:
LifecycleManager
- Mark attachment file for deletion when designated time interval in seconds
has elapsed.
- Specified by:
deleteOnTimeInterval
in interface LifecycleManager
- Throws:
java.io.IOException
RegisterVMShutdownHook
private VMShutdownHook RegisterVMShutdownHook()
throws java.lang.RuntimeException
- Throws:
java.lang.RuntimeException