Package org.apache.camel.impl

Examples of org.apache.camel.impl.DefaultCamelBeanPostProcessor


        template = threadTemplate.get();
        consumer = threadConsumer.get();
        camelContextService = threadService.get();

        // use the default bean post processor from camel-core
        DefaultCamelBeanPostProcessor processor = new DefaultCamelBeanPostProcessor(context);
        processor.postProcessBeforeInitialization(this, getClass().getName());
        processor.postProcessAfterInitialization(this, getClass().getName());
    }
View Full Code Here


                                String beanName) {
        for (Method method : consumeMethods) {
            Consume annotation = method.getAnnotation(Consume.class);
            if (annotation != null) {
                String contextName = CamelExtension.getCamelContextName(annotation.context(), startup);
                DefaultCamelBeanPostProcessor postProcessor = camelExtension.getPostProcessor(
                        contextName);
                if (postProcessor != null) {
                    postProcessor.getPostProcessorHelper().consumerInjection(method, reference, beanName);
                }
            }
        }
        for (Method method : produceMethods) {
            Produce annotation = method.getAnnotation(Produce.class);
            if (annotation != null) {
                String contextName = CamelExtension.getCamelContextName(annotation.context(), startup);
                DefaultCamelBeanPostProcessor postProcessor = camelExtension.getPostProcessor(
                        contextName);
                if (postProcessor != null && postProcessor.getPostProcessorHelper().matchContext(contextName)) {
                    postProcessor.setterInjection(method, reference, beanName, annotation.uri(), annotation.ref(),
                            annotation.property());
                }
            }
        }
        for (Method method : endpointMethods) {
            EndpointInject annotation = method.getAnnotation(EndpointInject.class);
            if (annotation != null) {
                String contextName = CamelExtension.getCamelContextName(annotation.context(), startup);
                DefaultCamelBeanPostProcessor postProcessor = camelExtension.getPostProcessor(
                        contextName);
                if (postProcessor != null && postProcessor.getPostProcessorHelper().matchContext(contextName)) {
                    postProcessor.setterInjection(method, reference, beanName, annotation.uri(), annotation.ref(),
                            annotation.property());

                }
            }
        }
        for (Field field : produceFields) {
            Produce annotation = field.getAnnotation(Produce.class);
            if (annotation != null) {
                String contextName = CamelExtension.getCamelContextName(annotation.context(), startup);
                DefaultCamelBeanPostProcessor postProcessor = camelExtension.getPostProcessor(
                        contextName);
                if (postProcessor != null && postProcessor.getPostProcessorHelper().matchContext(contextName)) {
                    postProcessor.injectField(field, annotation.uri(), annotation.ref(),
                            annotation.property(), reference, beanName);
                }
            }
        }
        for (Field field : endpointFields) {
            EndpointInject annotation = field.getAnnotation(EndpointInject.class);
            String contextName = CamelExtension.getCamelContextName(annotation.context(), startup);
            DefaultCamelBeanPostProcessor postProcessor = camelExtension.getPostProcessor(
                    contextName);
            if (postProcessor != null && postProcessor.getPostProcessorHelper().matchContext(contextName)) {
                postProcessor.injectField(field, annotation.uri(), annotation.ref(),
                        annotation.property(), reference, beanName);
            }
        }
    }
View Full Code Here

    }

    protected DefaultCamelBeanPostProcessor getPostProcessor(String context) {
        CamelContext camelContext = getCamelContext(context);
        if (camelContext != null) {
            return new DefaultCamelBeanPostProcessor(camelContext);
        } else {
            throw new IllegalArgumentException("No such CamelContext '" + context + "' available!");
        }
    }
View Full Code Here

     * Derived classes using IoC / DI frameworks may wish to turn this into a NoOp such as for CDI
     * we would just use CDI to inject this
     */
    protected void applyCamelPostProcessor() throws Exception {
        // use the default bean post processor from camel-core
        DefaultCamelBeanPostProcessor processor = new DefaultCamelBeanPostProcessor(context);
        processor.postProcessBeforeInitialization(this, getClass().getName());
        processor.postProcessAfterInitialization(this, getClass().getName());
    }
View Full Code Here

     * Derived classes using IoC / DI frameworks may wish to turn this into a NoOp such as for CDI
     * we would just use CDI to inject this
     */
    protected void applyCamelPostProcessor() throws Exception {
        // use the default bean post processor from camel-core
        DefaultCamelBeanPostProcessor processor = new DefaultCamelBeanPostProcessor(context);
        processor.postProcessBeforeInitialization(this, getClass().getName());
        processor.postProcessAfterInitialization(this, getClass().getName());
    }
View Full Code Here

    }

    protected DefaultCamelBeanPostProcessor getPostProcessor(String context) {
        CamelContext camelContext = getCamelContext(context);
        if (camelContext != null) {
            return new DefaultCamelBeanPostProcessor(camelContext);
        } else {
            throw new IllegalArgumentException("No such CamelContext '" + context + "' available!");
        }
    }
View Full Code Here

                                String beanName) {
        for (Method method : consumeMethods) {
            Consume annotation = method.getAnnotation(Consume.class);
            if (annotation != null) {
                String contextName = CamelExtension.getCamelContextName(annotation.context(), startup);
                DefaultCamelBeanPostProcessor postProcessor = camelExtension.getPostProcessor(
                        contextName);
                if (postProcessor != null) {
                    postProcessor.getPostProcessorHelper().consumerInjection(method, reference, beanName);
                }
            }
        }
        for (Method method : produceMethods) {
            Produce annotation = method.getAnnotation(Produce.class);
            if (annotation != null) {
                String contextName = CamelExtension.getCamelContextName(annotation.context(), startup);
                DefaultCamelBeanPostProcessor postProcessor = camelExtension.getPostProcessor(
                        contextName);
                if (postProcessor != null && postProcessor.getPostProcessorHelper().matchContext(contextName)) {
                    postProcessor.setterInjection(method, reference, beanName, annotation.uri(), annotation.ref(),
                            annotation.property());
                }
            }
        }
        for (Method method : endpointMethods) {
            EndpointInject annotation = method.getAnnotation(EndpointInject.class);
            if (annotation != null) {
                String contextName = CamelExtension.getCamelContextName(annotation.context(), startup);
                DefaultCamelBeanPostProcessor postProcessor = camelExtension.getPostProcessor(
                        contextName);
                if (postProcessor != null && postProcessor.getPostProcessorHelper().matchContext(contextName)) {
                    postProcessor.setterInjection(method, reference, beanName, annotation.uri(), annotation.ref(),
                            annotation.property());

                }
            }
        }
        for (Field field : produceFields) {
            Produce annotation = field.getAnnotation(Produce.class);
            if (annotation != null) {
                String contextName = CamelExtension.getCamelContextName(annotation.context(), startup);
                DefaultCamelBeanPostProcessor postProcessor = camelExtension.getPostProcessor(
                        contextName);
                if (postProcessor != null && postProcessor.getPostProcessorHelper().matchContext(contextName)) {
                    postProcessor.injectField(field, annotation.uri(), annotation.ref(),
                            annotation.property(), reference, beanName);
                }
            }
        }
        for (Field field : endpointFields) {
            EndpointInject annotation = field.getAnnotation(EndpointInject.class);
            String contextName = CamelExtension.getCamelContextName(annotation.context(), startup);
            DefaultCamelBeanPostProcessor postProcessor = camelExtension.getPostProcessor(
                    contextName);
            if (postProcessor != null && postProcessor.getPostProcessorHelper().matchContext(contextName)) {
                postProcessor.injectField(field, annotation.uri(), annotation.ref(),
                        annotation.property(), reference, beanName);
            }
        }
    }
View Full Code Here

     * Derived classes using IoC / DI frameworks may wish to turn this into a NoOp such as for CDI
     * we would just use CDI to inject this
     */
    protected void applyCamelPostProcessor() throws Exception {
        // use the default bean post processor from camel-core
        DefaultCamelBeanPostProcessor processor = new DefaultCamelBeanPostProcessor(context);
        processor.postProcessBeforeInitialization(this, getClass().getName());
        processor.postProcessAfterInitialization(this, getClass().getName());
    }
View Full Code Here

        template = threadTemplate.get();
        consumer = threadConsumer.get();
        camelContextService = threadService.get();

        // use the default bean post processor from camel-core
        DefaultCamelBeanPostProcessor processor = new DefaultCamelBeanPostProcessor(context);
        processor.postProcessBeforeInitialization(this, getClass().getName());
        processor.postProcessAfterInitialization(this, getClass().getName());
    }
View Full Code Here

     * Derived classes using IoC / DI frameworks may wish to turn this into a NoOp such as for CDI
     * we would just use CDI to inject this
     */
    protected void applyCamelPostProcessor() throws Exception {
        // use the default bean post processor from camel-core
        DefaultCamelBeanPostProcessor processor = new DefaultCamelBeanPostProcessor(context);
        processor.postProcessBeforeInitialization(this, getClass().getName());
        processor.postProcessAfterInitialization(this, getClass().getName());
    }
View Full Code Here

TOP

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

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.