You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Rich Newcomb (JIRA)" <ji...@apache.org> on 2012/10/03 01:07:08 UTC

[jira] [Commented] (CAMEL-5320) camel-ftp - Add option to check files without downloading

    [ https://issues.apache.org/jira/browse/CAMEL-5320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468162#comment-13468162 ] 

Rich Newcomb commented on CAMEL-5320:
-------------------------------------

It would be useful to have some clarification about the desired behavior when 'download = false'.

Should the message body contain some value, or should it instead be empty / null?

I propose propagating a null body, similar to the behavior that occurs when Camel optionally sends a null message for empty polling results.
In the case of 'download = false', the route is configured to _not_ return the results that would have otherwise been returned (i.e., the file content). Therefore, an empty message body seems appropriate.

Note that the message recipient could then access the file attributes as such:

 GenericFile<FTPFile> ftpFileInfo = (GenericFile<FTPFile>) exchange.getProperty(FileComponent.FILE_EXCHANGE_FILE)

Does this seem reasonable?   If not, what content would you expect to see in the message body?
                
> camel-ftp - Add option to check files without downloading
> ---------------------------------------------------------
>
>                 Key: CAMEL-5320
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5320
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-ftp
>    Affects Versions: 2.9.2
>            Reporter: Nestor Urquiza
>             Fix For: 2.11.0
>
>
> download=false could be an option to stop poll consumers from downloading files when all you need is to check for file attributes.
> The need was generated from ftp component but it could potentially apply to any file consumer. For more info see the original thread http://camel.465427.n5.nabble.com/Camel-FTP-SFTP-check-instead-of-download-td5713363.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira