camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Routing to a method of an object with more than one parameters
Date Tue, 04 Mar 2008 07:11:21 GMT
On 03/03/2008, georgiosgeorgiadis <georgiosgeorgiadis@yahoo.co.uk> wrote:
>
>  Thanks, yes, examples will be nice, cause I have searched around the tests of
>  camel and all
>  the objects that are used have only one actual parameter (I am not talking
>  about the ones that pass also @Header, @Properties etc.). My problem is that
>  I have an object that i cannot modify (given to me from outside, means third
>  party class) but I have to make it available on a camel routing via the
>  bean: or pojo: component.

Then create a converter to create a custom Processor for invoking your bean..
http://activemq.apache.org/camel/type-converter.html

@Converter
public class MyProcessorConverter {
  @Converter
  public Processor createAdapter(final MyBeanThatCannotBeModified bean) {
      return new Processor() { ... }
   }

Then you can decide how to convert the message headers/body into
something that can be invoked on your bean.

What is sending the message btw?

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Mime
View raw message