org.jboss.soa.esb.notification
Class NotifyFTPList
java.lang.Object
org.jboss.soa.esb.notification.NotificationTarget
org.jboss.soa.esb.notification.NotifyFTP
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:
class
is name of this class
URL
is the remote FTP server
filename
see NotifyFTP
for details about this configuration property
listFiles
whether the file(s) located in the message body contain paths to files that are to be sent or simply point to files that contain lists for files to be sent.
deleteListFile
indicates if the listFile should be deleted after all items items in it have been sent.
- Since:
- 4.3
- Author:
- Daniel Bevenius
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FILE_LOCATION
public static final java.lang.String FILE_LOCATION
NotifyFTPList
public NotifyFTPList(ConfigTree config)
throws NotificationException
- Throws:
NotificationException
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