Package org.apache.camel.processor

Examples of org.apache.camel.processor.Pipeline


        List<Processor> pipe = new ArrayList<Processor>(2);
        pipe.add(thread);
        pipe.add(createChildProcessor(routeContext, true));
        // wrap in nested pipeline so this appears as one processor
        // (recipient list definition does this as well)
        return new Pipeline(routeContext.getCamelContext(), pipe) {
            @Override
            public String toString() {
                return "Threads[" + getOutputs() + "]";
            }
        };
View Full Code Here


                if (interceptedTarget != null) {
                    // wrap in a pipeline so we continue routing to the next
                    List<Processor> list = new ArrayList<Processor>(2);
                    list.add(output);
                    list.add(interceptedTarget);
                    return new Pipeline(list);
                } else {
                    return output;
                }
            }
View Full Code Here

    /**
     * Creates a new instance of some kind of composite processor which defaults
     * to using a {@link Pipeline} but derived classes could change the behaviour
     */
    protected Processor createCompositeProcessor(RouteContext routeContext, List<Processor> list) {
        return new Pipeline(list);
    }
View Full Code Here

                if (interceptedTarget != null) {
                    // wrap in a pipeline so we continue routing to the next
                    List<Processor> list = new ArrayList<Processor>(2);
                    list.add(output);
                    list.add(interceptedTarget);
                    return new Pipeline(context, list);
                } else {
                    return output;
                }
            }
View Full Code Here

            Endpoint key = route.getEndpoint();
            assertEquals("From endpoint", "direct://a", key.getEndpointUri());

            EventDrivenConsumerRoute consumer = assertIsInstanceOf(EventDrivenConsumerRoute.class, route);

            Pipeline line = assertIsInstanceOf(Pipeline.class, unwrap(consumer.getProcessor()));
            assertEquals(3, line.getProcessors().size());
            // last should be our seda

            List<Processor> processors = new ArrayList<Processor>(line.getProcessors());
            Processor sendTo = assertIsInstanceOf(SendProcessor.class, unwrapChannel(processors.get(2)).getNextProcessor());
            assertSendTo(sendTo, "direct://d");
        }
    }
View Full Code Here

            assertEquals("From endpoint", "direct://a", key.getEndpointUri());

            EventDrivenConsumerRoute consumer = assertIsInstanceOf(EventDrivenConsumerRoute.class, route);
            Channel channel = unwrapChannel(consumer.getProcessor());

            Pipeline line = assertIsInstanceOf(Pipeline.class, channel.getNextProcessor());
            Iterator<?> it = line.getProcessors().iterator();

            // EvaluateExpressionProcessor should be wrapped in error handler
            Object first = it.next();
            first = assertIsInstanceOf(DeadLetterChannel.class, first).getOutput();
            assertIsInstanceOf(EvaluateExpressionProcessor.class, first);
View Full Code Here

            assertEquals("From endpoint", "direct://a", key.getEndpointUri());

            EventDrivenConsumerRoute consumer = assertIsInstanceOf(EventDrivenConsumerRoute.class, route);
            Channel channel = unwrapChannel(consumer.getProcessor());

            Pipeline line = assertIsInstanceOf(Pipeline.class, channel.getNextProcessor());
            Iterator<?> it = line.getProcessors().iterator();

            assertIsInstanceOf(ThreadsProcessor.class, it.next());
            // output should be wrapped in a pipeline
            Pipeline threadsLine = assertIsInstanceOf(Pipeline.class, it.next());
            Iterator<Processor> it2 = threadsLine.getProcessors().iterator();
            assertIsInstanceOf(SendProcessor.class, unwrapChannel(it2.next()).getNextProcessor());
            assertIsInstanceOf(SendProcessor.class, unwrapChannel(it2.next()).getNextProcessor());
        }
    }
View Full Code Here

    /**
     * Creates a new instance of some kind of composite processor which defaults
     * to using a {@link Pipeline} but derived classes could change the behaviour
     */
    protected Processor createCompositeProcessor(RouteContext routeContext, List<Processor> list) {
        return new Pipeline(list);
    }
View Full Code Here

                if (interceptedTarget != null) {
                    // wrap in a pipeline so we continue routing to the next
                    List<Processor> list = new ArrayList<Processor>(2);
                    list.add(output);
                    list.add(interceptedTarget);
                    return new Pipeline(list);
                } else {
                    return output;
                }
            }
View Full Code Here

            Endpoint key = route.getEndpoint();
            assertEquals("From endpoint", "seda://a", key.getEndpointUri());

            EventDrivenConsumerRoute consumer = assertIsInstanceOf(EventDrivenConsumerRoute.class, route);

            Pipeline line = assertIsInstanceOf(Pipeline.class, unwrap(consumer.getProcessor()));
            assertEquals(3, line.getProcessors().size());
            // last should be our seda

            List<Processor> processors = new ArrayList<Processor>(line.getProcessors());
            Processor sendTo = assertIsInstanceOf(SendProcessor.class, unwrapChannel(processors.get(2)).getNextProcessor());
            assertSendTo(sendTo, "seda://d");
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.processor.Pipeline

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.