camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manuel Boillod (Commented) (JIRA)" <>
Subject [jira] [Commented] (CAMEL-4004) Permit to override creation of FileConsumer in FileEndPoint
Date Mon, 07 Nov 2011 14:16:52 GMT


Manuel Boillod commented on CAMEL-4004:

Sorry for the delay, but I can't provide a unit test, but I've given to you a patch in the
description of this JIRA.

The solution is to externalize the FileConsumer creation into a new method which could be
Then you could use a different implementation of FileConsumer, like below:


public class PollConditionFileEndpont extends FileEndpoint {

    protected FileConsumer newFileConsumer(Processor processor, FileOperations operations)
    	return new FileConsumer(this, processor, operations){
    		protected boolean prePollCheck() throws Exception {
    			return Boolean.parseBoolean("customizable condition");


So, could you re-open this JIRA ?

> Permit to override creation of FileConsumer in FileEndPoint
> -----------------------------------------------------------
>                 Key: CAMEL-4004
>                 URL:
>             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>
> 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:!default.jspa
For more information on JIRA, see:


View raw message