Wondering why DefaultEndpoint.createEndpointUri() is not an abstract method

2013-11-20 Thread P Manchanda
Hi Camel Experts, I am newbie to Apache Camel and was doing a hands-on tutorial to create a custom component. That's when I stumbled on this as to why DefaultEndpoint.createEndpointUri() is not an abstract method, even when it has to be overwritten. The implementation of this method in the par

Re: Wondering why DefaultEndpoint.createEndpointUri() is not an abstract method

2013-11-20 Thread Claus Ibsen
Very often the component creates the endpoint using an uri, and therefore you have the uri already. But if you create the endpoint manually without a component, and just configure the endpoint using getter/setter, then there is no uri per see. And then you can implement that method to construct t

Re: Wondering why DefaultEndpoint.createEndpointUri() is not an abstract method

2013-11-21 Thread manchandap
Thanks Claus for quick response. Claus Ibsen-2 wrote > Very often the component creates the endpoint using an uri, and therefore > you have the uri already. Can you point me to some sample components that create the endpoint using an uri -- View this message in context: http://camel.465427.n

Re: Wondering why DefaultEndpoint.createEndpointUri() is not an abstract method

2013-11-21 Thread Claus Ibsen
Every component we ship does that, as they have a xxxComponent doing that. For example LogComponent from camel-core etc. On Thu, Nov 21, 2013 at 10:12 AM, manchandap wrote: > Thanks Claus for quick response. > > > Claus Ibsen-2 wrote >> Very often the component creates the endpoint using an uri

Re: Wondering why DefaultEndpoint.createEndpointUri() is not an abstract method

2013-11-21 Thread manchandap
Thanks for your continued support on this Claus, I think a better way to create an Endpoint is to use the following constructor rather then overriding the createEndpointUri() method. This would help to keep the same info at one place. DefaultEndpoint(String endpointUri, Component component) Const

Re: Wondering why DefaultEndpoint.createEndpointUri() is not an abstract method

2013-11-21 Thread Claus Ibsen
If you want to create a custom Camel component, then it can be a good idea to use the Maven archetype tooling for that, which creates a sample component all setup and ready to use as base for developing the component. http://camel.apache.org/camel-maven-archetypes.html On Thu, Nov 21, 2013 at 11: