org.jboss.soa.esb.actions
Class AbstractFileAction

java.lang.Object
  extended by java.util.Observable
      extended by org.jboss.soa.esb.actions.AbstractAction
          extended by org.jboss.soa.esb.actions.AbstractFileAction
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
DummyFileAction, FileCopier, FtpDownloader, FtpUploader

public abstract class AbstractFileAction
extends AbstractAction


Nested Class Summary
static class AbstractFileAction.Params
           
 
Field Summary
 
Fields inherited from class org.jboss.soa.esb.actions.AbstractAction
m_oCurr, m_oLogger, m_oParms
 
Constructor Summary
protected AbstractFileAction(DomElement p_oP, java.lang.Object p_oCurr)
          Extend this class if you need to implement an action class intended to process one file at a time
See FileCopier as an example
 
Method Summary
 java.io.File getDoneOkFile()
           
 java.io.File getErrorFile()
           
 java.io.File getInputFile()
           
 java.io.File getWorkFile()
           
 boolean isPostDelete()
           
 boolean renameToDone()
           
 boolean renameToError()
           
 void run()
          Overrides run() in AbstractAction

Files processed by action classes need to be renamed during processing to disable other listeners (or other threads launched by the same listener that started this thread) to pick up the same file
Once processing ends a suffix will be added to the name of the original file that has been processed.

 
Methods inherited from class org.jboss.soa.esb.actions.AbstractAction
getErrorNotification, getOkNotification, processCurrentObject
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFileAction

protected AbstractFileAction(DomElement p_oP,
                             java.lang.Object p_oCurr)
Extend this class if you need to implement an action class intended to process one file at a time
See FileCopier as an example

Parameters:
p_oP - DomElement - Parameter tree passed by controlling listener
p_oCurr - Object - This is the object that's going to get processed
All classes that extend AbstractFileAction receive an instance of the internal
class Params containing info needed to rename the file in different stages
of processing
Method Detail

isPostDelete

public boolean isPostDelete()

getInputFile

public java.io.File getInputFile()

getWorkFile

public java.io.File getWorkFile()

getErrorFile

public java.io.File getErrorFile()

getDoneOkFile

public java.io.File getDoneOkFile()

renameToError

public boolean renameToError()

renameToDone

public boolean renameToDone()

run

public void run()
Overrides run() in AbstractAction

Files processed by action classes need to be renamed during processing to disable other listeners (or other threads launched by the same listener that started this thread) to pick up the same file
Once processing ends a suffix will be added to the name of the original file that has been processed. The suffix will be different according to the result of processing (OK or Exception). Files could be moved to different directories as well
Parameters for these options can be provided at run time in the DomElement (arg 0 in constructor)

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class AbstractAction