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

Claus Ibsen commented on CAMEL-4004:
------------------------------------

Well maybe instead of a newFileConsumer it would be better to offer an API for 
easier providing custom prePoll / postPoll logic to the file consumer?

Then people do not have to extend components in Camel.

That said I went ahead and created the newFileConsumer + unit test.

We do love contributions. Read here. Also how to provide patches, as ASF have 
policy for how thats to happen:
http://camel.apache.org/contributing.html

If you are eager to get this into the code base, then helping out yourself is 
great for the community. And after the first patch, it becomes easier to submit 
the next patch ...

                
> Permit to override creation of FileConsumer in FileEndPoint
> -----------------------------------------------------------
>
>                 Key: CAMEL-4004
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4004
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.7.1
>            Reporter: Manuel Boillod
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>
> The method FileEndPoint.createConsumer does not permit to override type of 
> FileConsumer. I would use a specific FileConsumer which override prePollCheck 
> method.
> This will be possible if you externalize method which create FileConsumer in 
> the body of createConsumer :
> {code}FileConsumer result = new FileConsumer(this, processor, 
> operations);{code}
> could be refactor in :
> {code}FileConsumer result = newFileConsumer(processor, operations);
> ...
> protected FileConsumer newFileConsumer(Processor processor, 
> GenericFileOperations<File> operations){
> return new FileConsumer(this, processor, operations)
> }{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to