camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ade <>
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: 

  .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:
Sent from the Camel - Users mailing list archive at

View raw message