Package org.apache.camel.component.bean

Examples of org.apache.camel.component.bean.ConstantTypeBeanHolder


        if (bean != null) {
            holder = new ConstantBeanHolder(bean, context);
        } else if (beanName != null) {
            holder = new RegistryBean(context, beanName);
        } else if (type != null) {
            holder = new ConstantTypeBeanHolder(type, context);
        } else {
            throw new IllegalArgumentException("Either bean, beanName or type should be set on " + this);
        }
        return holder;
    }
View Full Code Here


        if (bean != null) {
            holder = new ConstantBeanHolder(bean, exchange.getContext());
        } else if (beanName != null) {
            holder = new RegistryBean(exchange.getContext(), beanName);
        } else if (type != null) {
            holder = new ConstantTypeBeanHolder(type, exchange.getContext());
        } else {
            throw new IllegalArgumentException("Either bean, beanName or type should be set on " + this);
        }

        // invoking the bean can either be the easy way or using OGNL
View Full Code Here

            // create a bean if there is a default public no-arg constructor
            if (ObjectHelper.hasDefaultPublicNoArgConstructor(beanType)) {
                instance = camelContext.getInjector().newInstance(beanType);
                holder = new ConstantBeanHolder(instance, camelContext);
            } else {
                holder = new ConstantTypeBeanHolder(beanType, camelContext);
            }
        } else if (instance != null) {
            holder = new ConstantBeanHolder(instance, camelContext);
        } else {
            String ref = beanName();
View Full Code Here

                throw new IllegalArgumentException("The bean instance is a java.lang.String type: " + bean
                    + ". We suppose you want to refer to a bean instance by its id instead. Please use beanRef.");
            }

            // the holder should either be bean or type based
            beanHolder = bean != null ? new ConstantBeanHolder(bean, routeContext.getCamelContext()) : new ConstantTypeBeanHolder(clazz, routeContext.getCamelContext());
            answer = new BeanProcessor(beanHolder);
        }
       
        // check for multiParameterArray setting
        if (multiParameterArray != null) {
View Full Code Here

        if (bean != null) {
            holder = new ConstantBeanHolder(bean, context);
        } else if (beanName != null) {
            holder = new RegistryBean(context, beanName);
        } else if (type != null) {
            holder = new ConstantTypeBeanHolder(type, context);
        } else {
            throw new IllegalArgumentException("Either bean, beanName or type should be set on " + this);
        }
        return holder;
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.component.bean.ConstantTypeBeanHolder

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.