You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Manuel Boillod (JIRA)" <ji...@apache.org> on 2011/05/23 11:19:48 UTC

[jira] [Created] (CAMEL-4004) Permit to override creation of FileConsumer in FileEndPoint

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


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 in simply externalize method which create FileConsumer in the body of createConsumer :

> FileConsumer result = new FileConsumer(this, processor, operations);

could be refactor in :

> FileConsumer result = newFileConsumer(this, processor, operations);
> protected FileConsumer newFileConsumer(GenericFileEndpoint<File> endpoint, Processor processor, GenericFileOperations<File> operations){
>   return new FileConsumer(endpoint, processor, operations)
> }


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-4004) Permit to override creation of FileConsumer in FileEndPoint

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13040622#comment-13040622 ] 

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

Can you provide a patch and an unit test?

> 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
>             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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-4004) Permit to override creation of FileConsumer in FileEndPoint

Posted by "Babak Vahdat (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13144137#comment-13144137 ] 

Babak Vahdat commented on CAMEL-4004:
-------------------------------------

Claus,

you simply take over all those tricky & tough stuff for yourself to fix (namespace aware xml streaming tokenizier support, just to mention one of those last features), and leave us alone with such trival fixes... this's simply not fair ;-)

I see a good match here of your definition for the professionalism and the action you took today by this ticket:

http://camel.465427.n5.nabble.com/HEADS-UP-Adjustments-to-ExecutorServiceManager-on-trunk-tp4693698p4715407.html

Regards, Babak
 
                
> 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

        

[jira] [Commented] (CAMEL-4004) Permit to override creation of FileConsumer in FileEndPoint

Posted by "Manuel Boillod (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13145516#comment-13145516 ] 

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 overloaded. 
Then you could use a different implementation of FileConsumer, like below:

{code}

public class PollConditionFileEndpont extends FileEndpoint {

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

    
}
{code}

So, could you re-open this JIRA ?

Thanks
                
> 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

        

[jira] [Assigned] (CAMEL-4004) Permit to override creation of FileConsumer in FileEndPoint

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-4004:
----------------------------------

    Assignee:     (was: Claus Ibsen)

> 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
>            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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4004) Permit to override creation of FileConsumer in FileEndPoint

Posted by "Manuel Boillod (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Manuel Boillod updated CAMEL-4004:
----------------------------------

    Description: 
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(this, processor, operations);
...
protected FileConsumer newFileConsumer(GenericFileEndpoint<File> endpoint, Processor processor, GenericFileOperations<File> operations){
return new FileConsumer(endpoint, processor, operations)
}{code}


  was:
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 in simply externalize method which create FileConsumer in the body of createConsumer :

> FileConsumer result = new FileConsumer(this, processor, operations);

could be refactor in :

> FileConsumer result = newFileConsumer(this, processor, operations);
> protected FileConsumer newFileConsumer(GenericFileEndpoint<File> endpoint, Processor processor, GenericFileOperations<File> operations){
>   return new FileConsumer(endpoint, processor, operations)
> }



> 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
>
> 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(this, processor, operations);
> ...
> protected FileConsumer newFileConsumer(GenericFileEndpoint<File> endpoint, Processor processor, GenericFileOperations<File> operations){
> return new FileConsumer(endpoint, processor, operations)
> }{code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-4004) Permit to override creation of FileConsumer in FileEndPoint

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13062699#comment-13062699 ] 

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

Anyone in our community want to provide a patch for this?
Mind that there is also the camel-ftp component which may need to be adjusted.

> 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
>            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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CAMEL-4004) Permit to override creation of FileConsumer in FileEndPoint

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-4004:
----------------------------------

    Assignee: Claus Ibsen

> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CAMEL-4004) Permit to override creation of FileConsumer in FileEndPoint

Posted by "Claus Ibsen (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-4004.
--------------------------------

    Resolution: Later
      Assignee: Claus Ibsen
    
> 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

        

[jira] [Commented] (CAMEL-4004) Permit to override creation of FileConsumer in FileEndPoint

Posted by "Claus Ibsen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13148411#comment-13148411 ] 

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

For all components? Not just a file based component?
If so then I suggest to use @dev to talk about such, as its not related very mich to this JIRA ticket.
                
> 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

        

[jira] [Resolved] (CAMEL-4004) Permit to override creation of FileConsumer in FileEndPoint

Posted by "Claus Ibsen (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-4004.
--------------------------------

    Resolution: Fixed
    
> 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

        

[jira] [Updated] (CAMEL-4004) Permit to override creation of FileConsumer in FileEndPoint

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-4004:
-------------------------------

         Priority: Minor  (was: Major)
    Fix Version/s: 2.9.0

> 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
>            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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-4004) Permit to override creation of FileConsumer in FileEndPoint

Posted by "Claus Ibsen (Commented) (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] [Reopened] (CAMEL-4004) Permit to override creation of FileConsumer in FileEndPoint

Posted by "Claus Ibsen (Reopened) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reopened CAMEL-4004:
--------------------------------

    
> 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

        

[jira] [Updated] (CAMEL-4004) Permit to override creation of FileConsumer in FileEndPoint

Posted by "Manuel Boillod (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Manuel Boillod updated CAMEL-4004:
----------------------------------

    Description: 
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}


  was:
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(this, processor, operations);
...
protected FileConsumer newFileConsumer(GenericFileEndpoint<File> endpoint, Processor processor, GenericFileOperations<File> operations){
return new FileConsumer(endpoint, processor, operations)
}{code}



> 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
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-4004) Permit to override creation of FileConsumer in FileEndPoint

Posted by "Bilgin Ibryam (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13147045#comment-13147045 ] 

Bilgin Ibryam commented on CAMEL-4004:
--------------------------------------

I also need to create different consumers based on the options provided in the new component I'm working on. Any proposals how the API could be extended for that purpose in a generic way applicable for all component?
                
> 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