Examples of process()


Examples of org.apache.camel.AsyncProcessor.process()

            throw new IllegalStateException("No processors could be chosen to process CircuitBreaker");
        }

        AsyncProcessor albp = AsyncProcessorConverterHelper.convert(processor);
        // Added a callback for processing the exchange in the callback
        boolean sync = albp.process(exchange, new CircuitBreakerCallback(exchange, callback));
       
        // We need to check the exception here as albp is use sync call 
        if (sync) {
            boolean failed = hasFailed(exchange);
            if (!failed) {
View Full Code Here

Examples of org.apache.camel.Processor.process()

        }
        Processor processor = chooseProcessor(list, exchange);
        if (processor == null) {
            throw new IllegalStateException("No processors could be chosen to process " + exchange);
        } else {
            processor.process(exchange);
        }
    }

    protected abstract Processor chooseProcessor(List<Processor> processors, Exchange exchange);
}
View Full Code Here

Examples of org.apache.camel.Producer.process()

                Producer producer;
                try {
                    producer = endpoint.createProducer();
                    producer.start();
                    producer.process(exchange);
                    producer.stop();
                } catch (Exception e) {
                    throw ObjectHelper.wrapRuntimeCamelException(e);
                }
View Full Code Here

Examples of org.apache.camel.component.bean.BeanProcessor.process()

        LOG.info("Value: " + value);
    }

    public void testBeanProcessor() throws Exception {
        BeanProcessor processor = new BeanProcessor(bean, info);
        processor.process(exchange);

        LOG.info("Exchange is: " + exchange);
    }

    protected void setUp() throws Exception {
View Full Code Here

Examples of org.apache.camel.component.cxf.transport.CamelDestination.ConsumerProcessor.process()

        EasyMock.replay(dest);
        ConsumerProcessor consumerProcessor = dest.new ConsumerProcessor();
       
        // Send our dummy exchange and check that the exception that occured on incoming is set
        DefaultExchange exchange = new DefaultExchange(camelContext);
        consumerProcessor.process(exchange);
        Exception exc = exchange.getException();
        Assert.assertNotNull(exc);
        Assert.assertEquals(expectedException, exc);
        EasyMock.verify(dest);
    }
View Full Code Here

Examples of org.apache.camel.processor.MarshalProcessor.process()

        customer.setAge(35);
        customer.setCountry("USA");
       
        exchange.getIn().setBody(customer, JavaSource.class);
       
        marshalProcessor.process(exchange);
       
        assertXMLEqual(getCustomerXml(CUSTOMER_XML_EXPECTED), exchange.getOut().getBody(String.class));
    }
   
    @Test
View Full Code Here

Examples of org.apache.camel.processor.MulticastProcessor.process()

            // use a multicast processor to process it
            MulticastProcessor mp = endpoint.getConsumerMulticastProcessor();
            ObjectHelper.notNull(mp, "ConsumerMulticastProcessor", this);

            // and use the asynchronous routing engine to support it
            mp.process(exchange, new AsyncCallback() {
                public void done(boolean doneSync) {
                    // done the uow on the completions
                    UnitOfWorkHelper.doneSynchronizations(exchange, completions, LOG);
                }
            });
View Full Code Here

Examples of org.apache.camel.processor.Pipeline.process()

            }
        };

        Pipeline pipeline = new Pipeline(Collections.singletonList(myProcessor));
        FileExchange exchange = new FileExchange(context, file);
        pipeline.process(exchange.copy());           
    }

    @Override
    protected void setUp() throws Exception {
        super.setUp();
View Full Code Here

Examples of org.apache.camel.processor.SendProcessor.process()

                    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

Examples of org.apache.camel.processor.UnitOfWorkProducer.process()

                // send the exchange using the processor
                StopWatch watch = new StopWatch();
                try {
                    // ensure we run in an unit of work
                    Producer target = new UnitOfWorkProducer(producer);
                    target.process(exchange);
                } catch (Throwable e) {
                    // ensure exceptions is caught and set on the exchange
                    exchange.setException(e);
                } finally {
                    // emit event that the exchange was sent to the endpoint
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.