org.jboss.soa.esb.actions
Class FtpUploader

java.lang.Object
  extended by java.util.Observable
      extended by org.jboss.soa.esb.actions.AbstractAction
          extended by org.jboss.soa.esb.actions.AbstractFileAction
              extended by org.jboss.soa.esb.actions.FtpUploader
All Implemented Interfaces:
java.lang.Runnable

public class FtpUploader
extends AbstractFileAction


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jboss.soa.esb.actions.AbstractFileAction
AbstractFileAction.Params
 
Field Summary
 
Fields inherited from class org.jboss.soa.esb.actions.AbstractAction
m_oCurr, m_oLogger, m_oParms
 
Constructor Summary
FtpUploader(DomElement p_oP, java.lang.Object p_oCurr)
          Will connect to an existing FTP server, and upload the file
 
Method Summary
 java.io.Serializable getErrorNotification()
           
 java.io.Serializable getOkNotification()
           
 void processCurrentObject()
           
 void run()
          Overrides run() in AbstractFileAction

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.AbstractFileAction
getDoneOkFile, getErrorFile, getInputFile, getWorkFile, isPostDelete, renameToDone, renameToError
 
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

FtpUploader

public FtpUploader(DomElement p_oP,
                   java.lang.Object p_oCurr)
Will connect to an existing FTP server, and upload the file

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

run

public void run()
Overrides run() in AbstractFileAction

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 AbstractFileAction

processCurrentObject

public void processCurrentObject()
                          throws java.lang.Exception
Specified by:
processCurrentObject in class AbstractAction
Throws:
java.lang.Exception

getOkNotification

public java.io.Serializable getOkNotification()
Specified by:
getOkNotification in class AbstractAction

getErrorNotification

public java.io.Serializable getErrorNotification()
Specified by:
getErrorNotification in class AbstractAction