Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.soa.esb.notification
Class NotifyFTP

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

Direct Known Subclasses:
  NotifyFTPList

    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:

    <NotificationList type="OK" xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd">
            <target class="NotifyFTP">
                    <ftp URL="ftp://username:pwd@server.com/remote/dir" filename="{jbossesb.message.id}.txt"/>
            </target>
    </NotificationList>

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 java.io.File` | `getFileToSend(Message message)`
`protected ConfigTree` | `getFtpConfig()` Get the ConfigTree for the 'ftp' element.
`protected FTPEpr` | `getFtpEpr()` Builds an FTP EPR from the configuration data.
`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:
    ConfigTree
  Throws:
    `NotificationException`

### getFileName

    protected java.lang.String getFileName(Message message)
                                    throws NotificationException

  Lazy loads filename from config tree.

  Returns:
    String
  Throws:
    `NotificationException`

### getFtpEpr

    protected FTPEpr getFtpEpr()
                        throws NotificationException

  Builds an FTP EPR from the configuration data.

  Returns:
    FTPEpr
  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`
  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`

### getFileToSend

    protected java.io.File getFileToSend(Message message)
                                  throws java.io.IOException

  Throws:
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD