[
https://issues.apache.org/jira/browse/CAMEL-4565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14623580#comment-14623580
]
Claus Ibsen commented on CAMEL-4565:
------------------------------------
Yeah wonder if we can use the parameters as-is and avoid the BeanInovacation -
or have it someplaces else. It seems more natural today to use the passed in
values as is, and let Camel bean binding figure out the invocations.
There is a few other tickets related to proxy improvements. Lets see if we can
do something to make this better.
> Allow to send messages using a user supplied pojo interface
> -----------------------------------------------------------
>
> Key: CAMEL-4565
> URL: https://issues.apache.org/jira/browse/CAMEL-4565
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Christian Schneider
> Fix For: 2.16.0
>
>
> The basic requirement is that we want to send a user defined object to a
> camel endpoint. The user code for sending the object should not contain any
> camel code.
> So imagine a simple DTO like Person with properties name and age. I would
> like to use an interface like
> interface PersonSender {
> void send(Person person);
> }
> So in the use code I code get an implementation injected that I simply could
> call with
> sender.send(person);
> So this is quite similar to our Pojo Messaging @Produce but I don“t want to
> send a BeanInvocation. Instead I would like to just have the Person object in
> the body. Ideally this should also support request / response if there is a
> return type.
> Additionally it should be configurable if it should send aynschronously or
> synchronously.
> Optionally we may also support a handler or Future for the response.
> To get the interface implementation we should support up to three variants.
> 1) Create the dynamic proxy programmatically
> 2) Define the proxy thiough a spring bean
> 3) Create and inject the proxy using the @Produce annotation (we will need a
> flag to switch behaviour or use a second annotation)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)