camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CAMEL-2244) Support for processing list-based reference params in DefaultComponent.
Date Tue, 01 Dec 2009 20:12:52 GMT

    [ https://issues.apache.org/activemq/browse/CAMEL-2244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56208#action_56208
] 

Claus Ibsen commented on CAMEL-2244:
------------------------------------

Cool, I think we should look into camel-jetty and see if it cannot use this new feature instead
of its own logic. It has such a feature for security handlers.

> Support for processing list-based reference params in DefaultComponent.
> -----------------------------------------------------------------------
>
>                 Key: CAMEL-2244
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2244
>             Project: Apache Camel
>          Issue Type: Improvement
>    Affects Versions: 2.1.0
>            Reporter: Martin Krasser
>            Assignee: Martin Krasser
>            Priority: Minor
>             Fix For: 2.2.0
>
>
> Add a new method 
> {noformat}
> <T> List<T> resolveAndRemoveReferenceListParameter(Map<String, Object>
parameters, String key, Class<T> elementType, List<T>  defaultValue)
> {noformat}
> to DefaultComponent for processing list-based reference params. Here's an example of
a Spring application context with bean definitions followed by URIs that reference these beans.
> {code:xml}
> <bean id="filter1" class="..."/>
> <bean id="filter2" class="..."/>
> <util:list id="filterList">
>   <ref bean="filter1" />
>   <ref bean="filter2" />
> </util:list>
> {code} 
> The new {{resolveAndRemoveReferenceListParameter}} handles the following cases.
> Resolve reference to a bean of type java.util.List and return that list. 
> {noformat}
> from("mina:tcp://localhost:6142?filters=#filterList")
> {noformat}
> Resolve reference to a bean of type {{elementType}} (see method signature) and return
a list containing that element.
> {noformat}
> from("mina:tcp://localhost:6142?filters=#filter1")
> {noformat}
> Resolve comma-separated reference list to beans of type {{elementType}} (see method signature)
and return a list containing these elements.
> {noformat}
> from("mina:tcp://localhost:6142?filters=#filter1,#filter2")
> {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message