[
https://issues.apache.org/jira/browse/CAMEL-16338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-16338.
---------------------------------
Resolution: Won't Fix
> 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)