Package 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 Object implements LifecycleManager

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `class`
  `LifecycleManagerImpl.FileDeletor`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LifecycleManagerImpl()`

- ## Method Summary

  Modifier and Type
  Method
  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.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### LifecycleManagerImpl

    public LifecycleManagerImpl()

- ## Method Details

  - ### 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 interface `LifecycleManager`
    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 interface `LifecycleManager`
    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 interface `LifecycleManager`
    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 interface `LifecycleManager`
    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 interface `LifecycleManager`
    Returns:
      the `FileAccessor` object for the given file
    Throws:
      `IOException`