org.apache.axiom.attachments.lifecycle.impl
Class DataHandlerExtImpl

java.lang.Object
  extended by javax.activation.DataHandler
      extended by org.apache.axiom.attachments.lifecycle.impl.DataHandlerExtImpl
All Implemented Interfaces:
java.awt.datatransfer.Transferable, java.util.Observer, DataHandlerExt

public class DataHandlerExtImpl
extends javax.activation.DataHandler
implements DataHandlerExt, java.util.Observer


Constructor Summary
DataHandlerExtImpl(javax.activation.DataHandler dataHandler, LifecycleManager manager)
           
 
Method Summary
 void deleteWhenReadOnce()
          This method will give users an option to trigger a delete on temporary attachment file when DataHandler associated with the attachment is read once.
 void purgeDataSource()
          This method will give users an option to trigger a purge on temporary attachment files.
 void update(java.util.Observable o, java.lang.Object arg)
           
 
Methods inherited from class javax.activation.DataHandler
getAllCommands, getBean, getCommand, getContent, getContentType, getDataSource, getInputStream, getName, getOutputStream, getPreferredCommands, getTransferData, getTransferDataFlavors, isDataFlavorSupported, setCommandMap, setDataContentHandlerFactory, writeTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataHandlerExtImpl

public DataHandlerExtImpl(javax.activation.DataHandler dataHandler,
                          LifecycleManager manager)
Method Detail

deleteWhenReadOnce

public void deleteWhenReadOnce()
                        throws java.io.IOException
Description copied from interface: DataHandlerExt
This method will give users an option to trigger a delete on temporary attachment file when DataHandler associated with the attachment is read once. Temp files are created for attachment data that is greater than a threshold limit. On client side These temp attachment files are not deleted untill the virtual machine exits. This method gives options to user to trigger a delete on attachment files when they read the dataHandler once.

Specified by:
deleteWhenReadOnce in interface DataHandlerExt
Throws:
java.io.IOException

purgeDataSource

public void purgeDataSource()
                     throws java.io.IOException
Description copied from interface: DataHandlerExt
This method will give users an option to trigger a purge on temporary attachment files. Temp files are created for attachment data that is greater than a threshold limit. On client side These temp attachment files are not deleted untilthe virtual machine exits as user can choose to read this dataHandler. So if user is not going to use the data handlers provided on this temproray files they can choose to purge the file.

Specified by:
purgeDataSource in interface DataHandlerExt
Throws:
java.io.IOException

update

public void update(java.util.Observable o,
                   java.lang.Object arg)
Specified by:
update in interface java.util.Observer


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.