org.springframework.integration.adapter.ftp
Class FtpTarget

java.lang.Object
  extended by org.springframework.integration.adapter.ftp.FtpTarget
All Implemented Interfaces:
MessageTarget

public class FtpTarget
extends java.lang.Object
implements MessageTarget

Target adapter for sending files to an FTP server.

Author:
Iwein Fuld

Field Summary
private  FTPClientPool ftpClientPool
           
private  MessageMapper<?,java.io.File> messageMapper
           
 
Constructor Summary
FtpTarget(MessageMapper<?,java.io.File> messageMapper, FTPClientPool ftpClientPool)
           
 
Method Summary
 boolean send(Message message)
          Send a Message to this target.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

messageMapper

private final MessageMapper<?,java.io.File> messageMapper

ftpClientPool

private final FTPClientPool ftpClientPool
Constructor Detail

FtpTarget

public FtpTarget(MessageMapper<?,java.io.File> messageMapper,
                 FTPClientPool ftpClientPool)
Method Detail

send

public boolean send(Message message)
Description copied from interface: MessageTarget
Send a Message to this target. May throw a RuntimeException for non-recoverable errors. Otherwise, if the Message cannot be sent for a non-fatal reason such as timeout, then this method will return 'false', and if the Message is sent successfully, it will return 'true'.

Specified by:
send in interface MessageTarget
Parameters:
message - the Message to send
Returns:
whether the Message has been sent successfully