camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ade <adrian.trena...@googlemail.com>
Subject Giving anonymous processors an identity - is there an annoation for that?
Date Fri, 08 Oct 2010 10:31:29 GMT

Is it possible to give an anonymous inline Processor an identity using a Java
annotation? Am thinking that this would be great for trace or audit
purposes, where you want a tracer or interceptor to log/audit that a
particular processor on the route has been invoked. 

I'm not sure if you can put an annotation on an inline anonymous class;
however, we could perhaps simply annotate the process() method. Something
like this: 


from("...")
  .process(new Processor() { 
    @Processor(label = "doImportantStuff")
    public void process(Exchange ex) throws Exception { 
    } 
  });


Does such an annotation exist in Camel? If not, then do you think this is a
good idea?
-- 
View this message in context: http://camel.465427.n5.nabble.com/Giving-anonymous-processors-an-identity-is-there-an-annoation-for-that-tp3204380p3204380.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message