Package org.apache.camel.processor

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


    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

            EventDrivenConsumerRoute consumerRoute = assertIsInstanceOf(EventDrivenConsumerRoute.class, route);
            Processor processor = consumerRoute.getProcessor();

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

            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();
                sendProcessor = assertIsInstanceOf(SendProcessor.class, outputProcessor);
View Full Code Here

            EventDrivenConsumerRoute consumerRoute = assertIsInstanceOf(EventDrivenConsumerRoute.class, route);
            Processor processor = unwrap(consumerRoute.getProcessor());

            LoggingErrorHandler loggingProcessor = assertIsInstanceOf(LoggingErrorHandler.class, processor);
            FilterProcessor filterProcessor = assertIsInstanceOf(FilterProcessor.class, loggingProcessor.getOutput());
            SendProcessor sendProcessor = assertIsInstanceOf(SendProcessor.class, filterProcessor.getProcessor());
            log.debug("Found sendProcessor: " + sendProcessor);
        }
    }
View Full Code Here

        LoadBalancer loadBalancer = LoadBalancerType.getLoadBalancer(routeContext, loadBalancerType, ref);

        for (ProcessorType processorType : outputs) {
            //The outputs should be the SendProcessor
            SendProcessor processor = (SendProcessor) processorType.createProcessor(routeContext);

            loadBalancer.addProcessor(processor);
        }
        return loadBalancer;
    }
View Full Code Here

    public Processor createProcessor(RouteContext routeContext) throws Exception {

        LoadBalancer loadBalancer = LoadBalancerType.getLoadBalancer(routeContext, loadBalancerType, ref);
        for (ProcessorType processorType : getOutputs()) {
            //The outputs should be the SendProcessor
            SendProcessor processor = (SendProcessor) processorType.createProcessor(routeContext);

            loadBalancer.addProcessor(processor);
        }

        return loadBalancer;
View Full Code Here

                    Endpoint endpoint = camelContext.getEndpoint(recoverable.getDeadLetterUri());
                    if (endpoint == null) {
                        throw new NoSuchEndpointException(recoverable.getDeadLetterUri());
                    }
                    // force MEP to be InOnly so when sending to DLQ we would not expect a reply if the MEP was InOut
                    deadLetterProcessor = new SendProcessor(endpoint, ExchangePattern.InOnly);
                    ServiceHelper.startService(deadLetterProcessor);
                }
            }
        }
View Full Code Here

    protected Processor createOutputsProcessor(RouteContext routeContext,
                                               Collection<ProcessorDefinition> outputs) throws Exception {
        LoadBalancer loadBalancer = LoadBalancerDefinition.getLoadBalancer(routeContext, loadBalancerType, ref);
        for (ProcessorDefinition<?> processorType : outputs) {
            // The outputs should be the SendProcessor
            SendProcessor processor = (SendProcessor) processorType.createProcessor(routeContext);
            loadBalancer.addProcessor(processor);
        }
        return loadBalancer;
    }
View Full Code Here

        assertIsInstanceOf(ExchangeCreatedEvent.class, events.get(3));
        assertIsInstanceOf(ExchangeSentEvent.class, events.get(4));

        ExchangeFailureHandledEvent e = assertIsInstanceOf(ExchangeFailureHandledEvent.class, events.get(5));
        assertEquals("should be DLC", true, e.isDeadLetterChannel());
        SendProcessor send = assertIsInstanceOf(SendProcessor.class, e.getFailureHandler());
        assertEquals("mock://dead", send.getDestination().getEndpointUri());

        // dead letter channel will mark the exchange as completed
        assertIsInstanceOf(ExchangeCompletedEvent.class, events.get(6));
        assertIsInstanceOf(ExchangeSentEvent.class, events.get(7));
    }
View Full Code Here

TOP

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

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.