You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Petr Kuzel <pe...@eurofins.com.INVALID> on 2023/05/26 14:22:40 UTC
@UriParam at endpoint vs at configuration
Hi Camel devs,
I have crossed over following alternatives while adding a new parameter.
A:
class Endpoint extends RemoteFileEndpoint
@UriParam
protected X newParameter;
B:
class Configuration extends RemoteFileConfiguration
@UriParam
protected X newParameter;
Is there a best practice to follow, please? Based on
reading existing code I have not figured out, yet.
Best regards
Cc.
--
Mr. Petr Kužel, Software Engineer
Eurofins International Support Services s.à r.l.
Val Fleuri 23
L-1526 LUXEMBOURG
Re: @UriParam at endpoint vs at configuration
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
There is no strict rule.
Some components have a configuration class that (IMHO is a bit cleaner) as
the configuration class is only responsible for the configuration options.
But Camel does not enforce any style. And today it would be a lot of work
to enforce every component to have a specific configuration class etc.
On Fri, May 26, 2023 at 4:23 PM Petr Kuzel <pe...@eurofins.com.invalid>
wrote:
> Hi Camel devs,
>
> I have crossed over following alternatives while adding a new parameter.
>
> A:
>
> class Endpoint extends RemoteFileEndpoint
>
> @UriParam
> protected X newParameter;
>
> B:
>
> class Configuration extends RemoteFileConfiguration
>
> @UriParam
> protected X newParameter;
>
>
> Is there a best practice to follow, please? Based on
> reading existing code I have not figured out, yet.
>
> Best regards
> Cc.
>
> --
> Mr. Petr Kužel, Software Engineer
> Eurofins International Support Services s.à r.l.
> Val Fleuri 23
> L-1526 LUXEMBOURG
>
>
--
Claus Ibsen
-----------------
@davsclaus
Camel in Action 2: https://www.manning.com/ibsen2