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-2100) Camel Proxy - Allow it to use single parameter methods as message body so you can route it directly
Date Thu, 22 Oct 2009 12:29:52 GMT

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

Claus Ibsen commented on CAMEL-2100:
------------------------------------

trunk: 828670.

Need to add some wiki documentation about this

> Camel Proxy - Allow it to use single parameter methods as message body so you can route
it directly
> ---------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2100
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2100
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 2.0.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.1.0
>
>
> What does it mean?
> Well using a Camel proxy and have Camel detect when its a single argument method we can
let the value passed in as argument be threated as if it was the message body itself.
> {code}
> public interface MyProxySender {
>     String hello(String name);
> }
> {code}
> Is a single parameter method.
> So if someone passes in a XML document to that method and we want to proxy it in front
of a CBR router we could do this
> {code}
>  <route>
>         <from uri="direct:start"/>
>         <choice>
>             <when>
>                 <xpath>/order/type = 'bar'</xpath>
>                 <to uri="jms:queue:bar"/>
>             </when>
>             <otherwise>
>                 <to uri="jms:queue:other"/>
>             </otherwise>
>         </choice>
>     </route>
> {code}
> And then define the proxy as
> {code}
>         <proxy id="myProxySender"
>                serviceInterface="org.apache.camel.MyProxySender"
>                serviceUrl="direct:start"/>
> {code}

-- 
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