org.jboss.soa.esb.notification
Class NotifyFTP

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

public class NotifyFTP
extends NotificationTarget

Sends a message to an outgoing FTP server. The outgoing filename can have values of message properties injected into it to make it unique. The notification-details property looks something like:

Author:
Rex Sheridan

Field Summary
static java.lang.String ATTR_FILENAME
          Filename attribute
static java.lang.String CHILD_FTP
          FTP child tag name
static java.lang.String TEMP_FILE_BASE
          Base filename for temp file
 
Fields inherited from class org.jboss.soa.esb.notification.NotificationTarget
m_oParms, PRM_NOTIF_CLASS
 
Constructor Summary
NotifyFTP(ConfigTree config)
          Create an outgoing FTP notification based on the given configuration.
 
Method Summary
protected  java.lang.String getFileName(Message message)
          Lazy loads filename from config tree.
protected  ConfigTree getFtpConfig()
          Get the ConfigTree for the 'ftp' element.
protected  FTPEpr getFtpEpr()
          Builds an FTP EPR from the configutation data.
protected  java.lang.String replaceArgument(java.lang.String value, Message message)
          Look for arguments in the form '{prop.name}' and replace them with corresponding message properties.
protected  java.lang.String replaceArguments(java.lang.String value, Message message)
          Replaces any arguments in the form '{prop.name}' with corresponding message property values.
 void sendNotification(Message message)
          Derived classes must implement this method to do what has to be done to trigger that specific type of notification event
 
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

CHILD_FTP

public static final java.lang.String CHILD_FTP
FTP child tag name

See Also:
Constant Field Values

ATTR_FILENAME

public static final java.lang.String ATTR_FILENAME
Filename attribute

See Also:
Constant Field Values

TEMP_FILE_BASE

public static final java.lang.String TEMP_FILE_BASE
Base filename for temp file

See Also:
Constant Field Values
Constructor Detail

NotifyFTP

public NotifyFTP(ConfigTree config)
Create an outgoing FTP notification based on the given configuration.

Parameters:
config -
Method Detail

getFtpConfig

protected ConfigTree getFtpConfig()
                           throws NotificationException
Get the ConfigTree for the 'ftp' element.

Returns:
Throws:
NotificationException

getFileName

protected java.lang.String getFileName(Message message)
                                throws NotificationException
Lazy loads filename from config tree.

Returns:
Throws:
NotificationException

replaceArguments

protected java.lang.String replaceArguments(java.lang.String value,
                                            Message message)
Replaces any arguments in the form '{prop.name}' with corresponding message property values.

Parameters:
value -
message -
Returns:

replaceArgument

protected java.lang.String replaceArgument(java.lang.String value,
                                           Message message)
Look for arguments in the form '{prop.name}' and replace them with corresponding message properties.

Parameters:
value -
message -
Returns:

getFtpEpr

protected FTPEpr getFtpEpr()
                    throws NotificationException
Builds an FTP EPR from the configutation data.

Parameters:
config -
Returns:
Throws:
NotificationException

sendNotification

public void sendNotification(Message message)
                      throws NotificationException
Description copied from class: NotificationTarget
Derived classes must implement this method to do what has to be done to trigger that specific type of notification event

Specified by:
sendNotification in class NotificationTarget
Throws:
NotificationException - - invoke Exception.getMessage() at runtime for this object
See Also:
ConfigTree