disable();
}
@Override
public void manage(CamelContext context) throws Exception {
final ProcessorFactory delegate = context.getProcessorFactory();
context.setProcessorFactory(new ProcessorFactory() {
@Override
public Processor createChildProcessor(RouteContext routeContext, ProcessorDefinition<?> definition, boolean mandatory) throws Exception {
Processor proc = delegate != null ? delegate.createChildProcessor(routeContext, definition, mandatory)
: definition.createOutputsProcessor(routeContext);
return wrap(routeContext, definition, proc);
}
@Override
public Processor createProcessor(RouteContext routeContext, ProcessorDefinition<?> definition) throws Exception {
Processor proc = delegate != null ? delegate.createProcessor(routeContext, definition)
: definition.createProcessor(routeContext);
return wrap(routeContext, definition, proc);
}
});
}