camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Moulliard <cmoulli...@gmail.com>
Subject Re: @Handler, @Body, @Header : question
Date Tue, 09 Jun 2009 08:22:30 GMT
In which package is defined this annotation (@handler) ?

What will happen if we have several @handler defined in a class ?

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com


On Tue, Jun 9, 2009 at 10:13 AM, Claus Ibsen <claus.ibsen@gmail.com> wrote:

> On Tue, Jun 9, 2009 at 9:51 AM, Charles Moulliard<cmoulliard@gmail.com>
> wrote:
> > Hi,
> >
> > If we add the following annotation @Handler to our method, can we
> continue
> > to use annotations like @Header, @Body as parameters ?
> Yes. @Handler is just a hint to Camel that it should prefer to use
> this one over any other methods.
>
> >
> > Example
> >
> > public class Bar {
> >
> >    @Handler
> >    public String doSomething(@Header(name = "user") String user,
> > @Body String body, Exchange exchange) {
> >      // process the in body and return whatever you want
> >      return "Bye World";
> >   }
> >
> >
> > Regards,
> >
> > Charles Moulliard
> > Senior Enterprise Architect
> > Apache Camel Committer
> >
> > *****************************
> > blog : http://cmoulliard.blogspot.com
> >
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message