Examples of SendProcessor


Examples of org.apache.camel.processor.SendProcessor

            assertEquals("messageIdExpression", "header(myMessageId)", idempotentConsumer
                .getMessageIdExpression().toString());

            assertIsInstanceOf(MemoryMessageIdRepository.class, idempotentConsumer.getMessageIdRepository());

            SendProcessor sendProcessor = assertIsInstanceOf(SendProcessor.class,
                                                             unwrapErrorHandler(idempotentConsumer
                                                                 .getNextProcessor()));
            assertEquals("Endpoint URI", "seda:b", sendProcessor.getDestination().getEndpointUri());
        }
    }
View Full Code Here

Examples of org.apache.camel.processor.SendProcessor

    protected void assertSendTo(Processor processor, String uri) {
        if (!(processor instanceof SendProcessor)) {
            processor = unwrapErrorHandler(processor);
        }

        SendProcessor sendProcessor = assertIsInstanceOf(SendProcessor.class, processor);
        assertEquals("Endpoint URI", uri, sendProcessor.getDestination().getEndpointUri());
    }
View Full Code Here

Examples of org.apache.camel.processor.SendProcessor

            EventDrivenConsumerRoute consumerRoute = assertIsInstanceOf(EventDrivenConsumerRoute.class, route);
            Processor processor = consumerRoute.getProcessor();
            processor = unwrap(processor);
            LoggingErrorHandler loggingProcessor = assertIsInstanceOf(LoggingErrorHandler.class, processor);
            processor = unwrap(loggingProcessor.getOutput());
            SendProcessor sendProcessor = assertIsInstanceOf(SendProcessor.class, processor);
            log.debug("Found sendProcessor: " + sendProcessor);
        }
    }
View Full Code Here

Examples of org.apache.camel.processor.SendProcessor

            Endpoint key = route.getEndpoint();
            String endpointUri = key.getEndpointUri();
            EventDrivenConsumerRoute consumerRoute = assertIsInstanceOf(EventDrivenConsumerRoute.class, route);
            Processor processor = unwrap(consumerRoute.getProcessor());

            SendProcessor sendProcessor = null;
            if (endpointUri.equals("seda:a")) {
                LoggingErrorHandler loggingProcessor = assertIsInstanceOf(LoggingErrorHandler.class,
                                                                          processor);
                Processor outputProcessor = loggingProcessor.getOutput();
                if (Boolean.getBoolean(JmxSystemPropertyKeys.DISABLED)) {
View Full Code Here

Examples of org.apache.camel.processor.SendProcessor

                    assertIsInstanceOf(InstrumentationProcessor.class, loggingProcessor.getOutput());
                processor = interceptor.getProcessor();
            }

            FilterProcessor filterProcessor = assertIsInstanceOf(FilterProcessor.class, processor);
            SendProcessor sendProcessor = assertIsInstanceOf(SendProcessor.class, filterProcessor.getProcessor());

            log.debug("Found sendProcessor: " + sendProcessor);
        }
    }
View Full Code Here

Examples of org.apache.camel.processor.SendProcessor

   
    public void testAggregateIgnoreInvalidCorrelationKey() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedBodiesReceived("A+C+END");

        Processor done = new SendProcessor(context.getEndpoint("mock:result"));
        Expression corr = header("id");
        AggregationStrategy as = new BodyInAggregatingStrategy();
        Predicate complete = body().contains("END");

        AggregateProcessor ap = new AggregateProcessor(context, done, corr, as, executorService);
View Full Code Here

Examples of org.apache.camel.processor.SendProcessor

    public void testAggregateBadCorrelationKey() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedBodiesReceived("A+C+END");

        Processor done = new SendProcessor(context.getEndpoint("mock:result"));
        Expression corr = header("id");
        AggregationStrategy as = new BodyInAggregatingStrategy();
        Predicate complete = body().contains("END");

        AggregateProcessor ap = new AggregateProcessor(context, done, corr, as, executorService);
View Full Code Here

Examples of org.apache.camel.processor.SendProcessor

    public void testAggregateCloseCorrelationKeyOnCompletion() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedBodiesReceived("A+B+END");

        Processor done = new SendProcessor(context.getEndpoint("mock:result"));
        Expression corr = header("id");
        AggregationStrategy as = new BodyInAggregatingStrategy();
        Predicate complete = body().contains("END");

        AggregateProcessor ap = new AggregateProcessor(context, done, corr, as, executorService);
View Full Code Here

Examples of org.apache.camel.processor.SendProcessor

    public void testAggregateUseBatchSizeFromConsumer() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedBodiesReceived("A+B", "C+D+E");
        mock.expectedPropertyReceived(Exchange.AGGREGATED_COMPLETED_BY, "consumer");

        Processor done = new SendProcessor(context.getEndpoint("mock:result"));
        Expression corr = header("id");
        AggregationStrategy as = new BodyInAggregatingStrategy();

        AggregateProcessor ap = new AggregateProcessor(context, done, corr, as, executorService);
        ap.setCompletionSize(100);
View Full Code Here

Examples of org.apache.camel.processor.SendProcessor

            public void process(Exchange exchange) throws Exception {
                if (exchange.getIn().getBody(String.class).contains("Kaboom")) {
                    throw new IllegalArgumentException("Damn");
                }
                // else send it further along
                SendProcessor send = new SendProcessor(context.getEndpoint("mock:result"));
                send.start();
                send.process(exchange);
            }
        };
               
        Expression corr = header("id");
        AggregationStrategy as = new BodyInAggregatingStrategy();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.