camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mattias Severson <mat...@gmail.com>
Subject Configuration of connection timeout when transmitting files to remote SFTP server?
Date Mon, 05 Jul 2010 13:27:00 GMT

Hi,

How do I set the connection timeout when connecting to a remote FTP server?
I attempt to use the  ftpClient.connectionTimeout of the 
http://commons.apache.org/net/api/org/apache/commons/net/ftp/FTPClient.html
FTPClient  class. It seem to work if the server uses FTP and FTPS, e.g.
ftp://user@host/dir?password=secret&ftpClient.connectionTimeout=30000&disconnect=true&passiveMode=true.
However, when I try to connect to a remote SFTP server I get an exception:

sftp://user@host/dir?password=secret&ftpClient.connectionTimeout=30000&disconnect=true&passiveMode=true
ResolveEndpointFailedException: 
[...]
There are 1 parameters that couldn't be set on the endpoint. Check the uri
if the parameters are spelt correctly and that they are properties of the
endpoint. Unknown parameters=[{ftpClient.connectionTimeout=30000}]

I am using a producer template to transmit the files, e.g. 
producerTemplate.sendBodyAndHeader(uri, file, Exchange.FILE_NAME,
file.getName());

Camel version: 2.3.0
-- 
View this message in context: http://camel.465427.n5.nabble.com/Configuration-of-connection-timeout-when-transmitting-files-to-remote-SFTP-server-tp696546p696546.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message