Package org.apache.camel.impl

Examples of org.apache.camel.impl.ProcessorEndpoint


        if (factory != null) {
            xslt.getConverter().setTransformerFactory(factory);
        }
        xslt.setTransformerInputStream(resource.getInputStream());
        configureXslt(xslt, uri, remaining, parameters);
        return new ProcessorEndpoint(uri, this, xslt);
    }
View Full Code Here


        if (endpoint != null) {
            endpoint.setCamelContext(this);
            return endpoint;
        }

        return new ProcessorEndpoint(uri, this, new BeanProcessor(bean, this));
    }
View Full Code Here

*/
public class BeanComponentCustomCreateEndpointTest extends ContextTestSupport {

    public void testCreateEndpoint() throws Exception {
        BeanComponent bc = context.getComponent("bean", BeanComponent.class);
        ProcessorEndpoint pe = bc.createEndpoint(new MyFooBean());
        assertNotNull(pe);

        String uri = pe.getEndpointUri();
        assertEquals("bean:generated:MyFooBean", uri);

        Producer producer = pe.createProducer();
        Exchange exchange = producer.createExchange();
        exchange.getIn().setBody("World");

        producer.start();
        producer.process(exchange);
View Full Code Here

        assertEquals("Hello World", exchange.getOut().getBody());
    }

    public void testCreateEndpointUri() throws Exception {
        BeanComponent bc = context.getComponent("bean", BeanComponent.class);
        ProcessorEndpoint pe = bc.createEndpoint(new MyFooBean(), "bean:cheese");
        assertNotNull(pe);

        String uri = pe.getEndpointUri();
        assertEquals("bean:cheese", uri);

        Producer producer = pe.createProducer();
        Exchange exchange = producer.createExchange();
        exchange.getIn().setBody("World");

        producer.start();
        producer.process(exchange);
View Full Code Here

        testTransformerFactory = TransformerFactory.newInstance();

        registry.bind("testConverter", testConverter);
        registry.bind("testTransformerFactory", testTransformerFactory);

        ProcessorEndpoint pep1 = context.getEndpoint(TEST_URI_1, ProcessorEndpoint.class);
        ProcessorEndpoint pep2 = context.getEndpoint(TEST_URI_2, ProcessorEndpoint.class);

        builder1 = (XsltBuilder)pep1.getProcessor();
        builder2 = (XsltBuilder)pep2.getProcessor();

        context.addRoutes(builder);
        context.start();
    }
View Full Code Here

        // force loading of schema at create time otherwise concurrent processing could
        // cause thread safe issues for the javax.xml.validation.SchemaFactory
        validator.loadSchema();

        return new ProcessorEndpoint(uri, this, validator);
    }
View Full Code Here

        if (factory != null) {
            xslt.getConverter().setTransformerFactory(factory);
        }
        xslt.setTransformerInputStream(resource.getInputStream());
        configureXslt(xslt, uri, remaining, parameters);
        return new ProcessorEndpoint(uri, this, xslt);
    }
View Full Code Here

        if (endpoint != null) {
            endpoint.setCamelContext(this);
            return endpoint;
        }

        return new ProcessorEndpoint(uri, this, new BeanProcessor(bean, this));
    }
View Full Code Here

        validator.setSchemaResource(resource);
        if (log.isDebugEnabled()) {
            log.debug(this + " using schema resource: " + resource);
        }
        configureValidator(validator, uri, remaining, parameters);
        return new ProcessorEndpoint(uri, this, validator);
    }
View Full Code Here

        if (log.isDebugEnabled()) {
            log.debug(this + " using schema resource: " + resource);
        }
        XQueryBuilder xslt = XQueryBuilder.xquery(resource.getURL());
        configureXslt(xslt, uri, remaining, parameters);
        return new ProcessorEndpoint(uri, this, xslt);
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.impl.ProcessorEndpoint

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.