Search in sources :

Example 11 with RouteContext

use of org.apache.camel.spi.RouteContext in project fabric8 by jboss-fuse.

the class Tracer method manage.

@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);
        }
    });
}
Also used : Processor(org.apache.camel.Processor) ProcessorFactory(org.apache.camel.spi.ProcessorFactory) RouteContext(org.apache.camel.spi.RouteContext)

Example 12 with RouteContext

use of org.apache.camel.spi.RouteContext in project fabric8 by jboss-fuse.

the class Breadcrumbs method manage.

@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);
        }
    });
}
Also used : Processor(org.apache.camel.Processor) FilterProcessor(org.apache.camel.processor.FilterProcessor) ProcessorFactory(org.apache.camel.spi.ProcessorFactory) RouteContext(org.apache.camel.spi.RouteContext)

Example 13 with RouteContext

use of org.apache.camel.spi.RouteContext in project fabric8 by jboss-fuse.

the class Profiler method manage.

@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 processor = delegate != null ? delegate.createChildProcessor(routeContext, definition, mandatory) : definition.createOutputsProcessor(routeContext);
            return wrap(routeContext, definition, processor);
        }

        @Override
        public Processor createProcessor(RouteContext routeContext, ProcessorDefinition<?> definition) throws Exception {
            Processor processor = delegate != null ? delegate.createProcessor(routeContext, definition) : definition.createProcessor(routeContext);
            return wrap(routeContext, definition, processor);
        }
    });
}
Also used : Processor(org.apache.camel.Processor) FilterProcessor(org.apache.camel.processor.FilterProcessor) ProcessorFactory(org.apache.camel.spi.ProcessorFactory) RouteContext(org.apache.camel.spi.RouteContext)

Aggregations

RouteContext (org.apache.camel.spi.RouteContext)13 Processor (org.apache.camel.Processor)6 Exchange (org.apache.camel.Exchange)4 DefaultRouteContext (org.apache.camel.impl.DefaultRouteContext)4 ArrayList (java.util.ArrayList)3 NoSuchEndpointException (org.apache.camel.NoSuchEndpointException)3 ProcessorFactory (org.apache.camel.spi.ProcessorFactory)3 AsyncProcessor (org.apache.camel.AsyncProcessor)2 CamelContext (org.apache.camel.CamelContext)2 Endpoint (org.apache.camel.Endpoint)2 FailedToCreateRouteException (org.apache.camel.FailedToCreateRouteException)2 FilterProcessor (org.apache.camel.processor.FilterProcessor)2 UnitOfWork (org.apache.camel.spi.UnitOfWork)2 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 MalformedURLException (java.net.MalformedURLException)1 URISyntaxException (java.net.URISyntaxException)1 StringTokenizer (java.util.StringTokenizer)1 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)1 AsyncCallback (org.apache.camel.AsyncCallback)1 AsyncProducerCallback (org.apache.camel.AsyncProducerCallback)1