Package org.apache.camel.language.bean

Examples of org.apache.camel.language.bean.BeanExpression$OgnlInvokeProcessor


        return new BeanExpression(beanName(), getMethod());
    }

    @Override
    public Predicate createPredicate(RouteContext routeContext) {
        return new BeanExpression(beanName(), getMethod());
    }
View Full Code Here


        // method is optional but provide it as null to the bean expression
        if (ObjectHelper.isEmpty(method)) {
            method = null;
        }

        return new BeanExpression(beanName, method);
    }
View Full Code Here

            instance = regHolder.getBean();
            holder = new ConstantBeanHolder(instance, camelContext);
        }

        // create answer using the holder
        answer = new BeanExpression(holder, getMethod());

        // and do sanity check that if a method name was given, that it exists
        validateHasMethod(camelContext, instance, beanType, getMethod());
        return answer;
    }
View Full Code Here

        this.method = method;
    }

    @Override
    public Expression createExpression(RouteContext routeContext) {
        return new BeanExpression(beanName(), getMethod());
    }
View Full Code Here

        if (beanType != null) {
            // create a bean if there is a default public no-arg constructor
            if (ObjectHelper.hasDefaultPublicNoArgConstructor(beanType)) {
                instance = camelContext.getInjector().newInstance(beanType);
                answer = new BeanExpression(instance, getMethod());
            } else {
                answer = new BeanExpression(beanType, getMethod());
            }
        } else if (instance != null) {
            answer = new BeanExpression(instance, getMethod());
        } else {
            String ref = beanName();
            // if its a ref then check that the ref exists
            BeanHolder holder = new RegistryBean(camelContext, ref);
            // get the bean which will check that it exists
            instance = holder.getBean();
            answer = new BeanExpression(instance, getMethod());
        }

        validateHasMethod(camelContext, instance, beanType, getMethod());
        return answer;
    }
View Full Code Here

    public Expression createExpression(CamelContext camelContext) {
        Expression answer;

        if (beanType != null) {           
            instance = ObjectHelper.newInstance(beanType);
            return new BeanExpression(instance, getMethod());
        } else if (instance != null) {
            return new BeanExpression(instance, getMethod());
        } else {
            String ref = beanName();
            // if its a ref then check that the ref exists
            BeanHolder holder = new RegistryBean(camelContext, ref);
            // get the bean which will check that it exists
            instance = holder.getBean();
            answer = new BeanExpression(ref, getMethod());
        }

        // validate method
        validateHasMethod(camelContext, instance, getMethod());
View Full Code Here

    public Predicate createPredicate(CamelContext camelContext) {
        Predicate answer;

        if (beanType != null) {
            instance = ObjectHelper.newInstance(beanType);
            answer = new BeanExpression(instance, getMethod());
        } else if (instance != null) {
            answer = new BeanExpression(instance, getMethod());
        } else {
            String ref = beanName();
            // if its a ref then check that the ref exists
            BeanHolder holder = new RegistryBean(camelContext, ref);
            // get the bean which will check that it exists
            instance = holder.getBean();
            answer = new BeanExpression(ref, getMethod());
        }

        // validate method
        validateHasMethod(camelContext, instance, getMethod());
View Full Code Here

TOP

Related Classes of org.apache.camel.language.bean.BeanExpression$OgnlInvokeProcessor

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.