[
https://issues.apache.org/jira/browse/CAMEL-16338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17300145#comment-17300145
]
Claus Ibsen commented on CAMEL-16338:
-------------------------------------
Yeah that is a too invasive change for very little gain. Especially when its
for extending other components.
Camel end users shouldn't often not work with those APIs directly but use the
route DSL, component DSL, endpoint DSL etc.
> Return parametrized Endpoint class from Component#createEndpoint
> ----------------------------------------------------------------
>
> Key: CAMEL-16338
> URL: https://issues.apache.org/jira/browse/CAMEL-16338
> Project: Camel
> Issue Type: Wish
> Components: came-core
> Reporter: Stepan Shcherbakov
> Priority: Trivial
> Labels: performance
>
> There is Component interface in camel with methods:
>
> {code:java}
> Endpoint createEndpoint(String uri) throws Exception;{code}
> and
> {code:java}
> Endpoint createEndpoint(String uri, Map<String, Object> parameters) throws
> Exception;
> {code}
> This signature is OK, but, when i write my own components, its uncomfortable.
> For example, i work with RabbitMqComponent and i would like to configure
> RabbitMqEndpoint.
> When i call RabbitMqComponent#createEndpoint i have to cast Endpoint to
> RabbitMqEndpoint.
>
> May be Component interface should be like that:
> {code:java}
> public interface Component<T extends Endpoint> extends CamelContextAware,
> Service {
> T createEndpoint(String uri) throws Exception;
> T createEndpoint(String uri, Map<String, Object> parameters) throws
> Exception;
> }{code}
> or it would lead to backward compability problems?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)