Re: CamelContext.hasComponent()

2016-03-30 Thread James Green
I'm looking at code that conditionally adds activemq if configuration is
provided at runtime, hence my use as a consumer.

On 30 March 2016 at 11:25, Claus Ibsen  wrote:

> Just to add a bit context.
>
> This method is less intended for Camel end users, but more for
> component developers / camel itself.
>
>
> On Wed, Mar 30, 2016 at 12:00 PM, Claus Ibsen 
> wrote:
> > No this is by design
> >
> > On Wed, Mar 30, 2016 at 11:56 AM, James Green 
> wrote:
> >> I was expecting this to return boolean, but it returns a Component if
> >> present or null otherwise.
> >>
> >> This feels counter-intuitive and horrible to code against. Are there
> plans
> >> to this this?
> >>
> >> Thanks,
> >>
> >> James
> >
> >
> >
> > --
> > Claus Ibsen
> > -
> > http://davsclaus.com @davsclaus
> > Camel in Action 2: https://www.manning.com/ibsen2
>
>
>
> --
> Claus Ibsen
> -
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>


Re: CamelContext.hasComponent()

2016-03-30 Thread Claus Ibsen
Just to add a bit context.

This method is less intended for Camel end users, but more for
component developers / camel itself.


On Wed, Mar 30, 2016 at 12:00 PM, Claus Ibsen  wrote:
> No this is by design
>
> On Wed, Mar 30, 2016 at 11:56 AM, James Green  
> wrote:
>> I was expecting this to return boolean, but it returns a Component if
>> present or null otherwise.
>>
>> This feels counter-intuitive and horrible to code against. Are there plans
>> to this this?
>>
>> Thanks,
>>
>> James
>
>
>
> --
> Claus Ibsen
> -
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: CamelContext.hasComponent()

2016-03-30 Thread Claus Ibsen
No this is by design

On Wed, Mar 30, 2016 at 11:56 AM, James Green  wrote:
> I was expecting this to return boolean, but it returns a Component if
> present or null otherwise.
>
> This feels counter-intuitive and horrible to code against. Are there plans
> to this this?
>
> Thanks,
>
> James



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


CamelContext.hasComponent()

2016-03-30 Thread James Green
I was expecting this to return boolean, but it returns a Component if
present or null otherwise.

This feels counter-intuitive and horrible to code against. Are there plans
to this this?

Thanks,

James