Package org.apache.camel.language.bean

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


        this.method = method;
    }

    @Override
    public Expression createExpression(RouteContext routeContext) {
        return new BeanExpression(beanName(), getMethod());
    }
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(ref, getMethod());
        }

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

    }
   
    @Override
    public Expression createExpression(CamelContext camelContext) {
        if (beanType != null) {           
            return new BeanExpression(ObjectHelper.newInstance(beanType), getMethod());
        } else if (instance != null) {
            return new BeanExpression(instance, getMethod());
        } else {
            return new BeanExpression(beanName(), getMethod());
        }
    }
View Full Code Here

    }

    @Override
    public Predicate createPredicate(CamelContext camelContext) {
        if (beanType != null) {
            return new BeanExpression(ObjectHelper.newInstance(beanType), getMethod());
        } else if (instance != null) {
            return new BeanExpression(instance, getMethod());
        } else {
            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

        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

    @SuppressWarnings("unchecked")
    @Override
    public Expression createExpression(RouteContext routeContext) {
        if (beanType != null) {           
            return new BeanExpression(ObjectHelper.newInstance(beanType), getMethod());
        } else {
            return new BeanExpression(beanName(), getMethod());  
        }
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    @Override
    public Predicate createPredicate(RouteContext routeContext) {
        if (beanType != null) {
            return new BeanExpression(ObjectHelper.newInstance(beanType), getMethod());
        } else {
            return new BeanExpression(beanName(), getMethod());
        }
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    @Override
    public Expression createExpression(RouteContext routeContext) {
        if (beanType != null) {           
            return new BeanExpression(ObjectHelper.newInstance(beanType), getMethod());
        } else {
            return new BeanExpression(beanName(), 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.