You can use intercept().when(predicate).process(processor) and have predicate depend on a settable value.
Don 2011/5/27 Marcos Díez Fernández <md...@tecsisa.com>: > Hi all, > > As suggested by book/documentation I'm using adviceWith method to add > interceptors to my existing routes, like this: > > for (int i = 0; i < camelContext.getRouteDefinitions().size(); > i++) { > > camelContext.getRouteDefinitions().get(i).adviceWith(camelContext, new > RouteBuilder() { > public void configure() throws > Exception { > > intercept().process(customCamelAuditorProcessor); > } > }); > } > > Question is, would it be possible to remove/disable the added interceptors? > > Thanks in advance, > BR, > Marcos. >