org.jboss.soa.esb.notification
Class NotifyFTPList

java.lang.Object
  extended by org.jboss.soa.esb.notification.NotificationTarget
      extended by org.jboss.soa.esb.notification.NotifyFTP
          extended by org.jboss.soa.esb.notification.NotifyFTPList

public class NotifyFTPList
extends NotifyFTP

NotifyFTPList extends NotifyFTP and adds the ability to take a single file name or list of file names located in the ESB Message object.

The file(s) in the Message object should contain a list of files (full paths). This list will be iterated over and every file in the list will be sent to
the configured destination FTP server directory.

Example configuration:

<action name="notificationAction" class="org.jboss.soa.esb.actions.Notifier">
    <property name="okMethod" value="notifyOK"/>
        <property name="notification-details">
            <NotificationList type="ok">
                <target class="NotifyFTPList">
                    <ftp URL="ftp://username:password@localhost/outputdir"
                        filename="{org.jboss.soa.esb.gateway.file}">
                        listFiles="false"
                        deletelistFile="false"
                </target>
            </NotificationList>
        </property>
</action>
 
Description of configuration properties:

Since:
4.3
Author:
Daniel Bevenius

Field Summary
static java.lang.String FILE_LOCATION
           
 
Fields inherited from class org.jboss.soa.esb.notification.NotifyFTP
ATTR_FILENAME, CHILD_FTP, TEMP_FILE_BASE
 
Fields inherited from class org.jboss.soa.esb.notification.NotificationTarget
m_oParms, PRM_NOTIF_CLASS
 
Constructor Summary
NotifyFTPList(ConfigTree config)
           
 
Method Summary
protected  java.lang.String getFileName(Message message)
          Lazy loads filename from config tree.
protected  java.io.File getFileToSend(Message message)
           
protected  void send(Message message)
           
 void sendNotification(Message message)
          If the Message body contains a List of files
 
Methods inherited from class org.jboss.soa.esb.notification.NotifyFTP
getFtpConfig, getFtpEpr
 
Methods inherited from class org.jboss.soa.esb.notification.NotificationTarget
fromParams
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE_LOCATION

public static final java.lang.String FILE_LOCATION
Constructor Detail

NotifyFTPList

public NotifyFTPList(ConfigTree config)
              throws NotificationException
Throws:
NotificationException
Method Detail

sendNotification

public void sendNotification(Message message)
                      throws NotificationException
If the Message body contains a List of files

Overrides:
sendNotification in class NotifyFTP
Parameters:
message - Object - The toString() method of this object will be the actual notification content
Throws:
NotificationException - - invoke Exception.getMessage() at runtime for this object
See Also:
ConfigTree

send

protected void send(Message message)
             throws NotificationException
Throws:
NotificationException

getFileToSend

protected java.io.File getFileToSend(Message message)
Overrides:
getFileToSend in class NotifyFTP

getFileName

protected java.lang.String getFileName(Message message)
                                throws NotificationException
Description copied from class: NotifyFTP
Lazy loads filename from config tree.

Overrides:
getFileName in class NotifyFTP
Returns:
String
Throws:
NotificationException