Package org.apache.camel.cdi

Examples of org.apache.camel.cdi.Uri


    @Produces
    @Uri("")
    public Endpoint createEndpoint(InjectionPoint point) {
        Annotated annotated = point.getAnnotated();
        Uri uri = annotated.getAnnotation(Uri.class);
        ObjectHelper.notNull(uri, "Should be annotated with @Uri");
        return CamelContextHelper.getMandatoryEndpoint(getCamelContext(point, uri.context()), uri.value());
    }
View Full Code Here


    @Produces
    @Uri("")
    public ProducerTemplate createProducerTemplate(InjectionPoint point) {
        Annotated annotated = point.getAnnotated();
        Uri uri = annotated.getAnnotation(Uri.class);
        CamelContext camelContext = getCamelContext(point, uri.context());
        ProducerTemplate producerTemplate = camelContext.createProducerTemplate();
        ObjectHelper.notNull(uri, "Should be annotated with @Uri");
        Endpoint endpoint = CamelContextHelper.getMandatoryEndpoint(camelContext, uri.value());
        producerTemplate.setDefaultEndpoint(endpoint);
        return producerTemplate;
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.cdi.Uri

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.