Package org.apache.camel.model

Examples of org.apache.camel.model.ModelCamelContext


            }
        }
    }

    protected void populateRoutes() throws Exception {
        ModelCamelContext camelContext = getContext();
        if (camelContext == null) {
            throw new IllegalArgumentException("CamelContext has not been injected!");
        }
        getRouteCollection().setCamelContext(camelContext);
        camelContext.addRouteDefinitions(getRouteCollection().getRoutes());
    }
View Full Code Here


        getRouteCollection().setCamelContext(camelContext);
        camelContext.addRouteDefinitions(getRouteCollection().getRoutes());
    }

    protected void populateRests() throws Exception {
        ModelCamelContext camelContext = getContext();
        if (camelContext == null) {
            throw new IllegalArgumentException("CamelContext has not been injected!");
        }
        getRestCollection().setCamelContext(camelContext);

        // setup rest configuration before adding the rests
        if (getRestConfiguration() != null) {
            RestConfiguration config = getRestConfiguration().asRestConfiguration(getContext());
            camelContext.setRestConfiguration(config);
        }
        camelContext.addRestDefinitions(getRestCollection().getRests());
    }
View Full Code Here

     */
    private CamelContext aggregateCamelContext() throws Exception {
        if (camelContexts.size() == 1) {
            return camelContexts.get(0);
        } else {
            ModelCamelContext answer = new DefaultCamelContext();
            for (CamelContext camelContext : camelContexts) {
                answer.addRouteDefinitions(((ModelCamelContext)camelContext).getRouteDefinitions());
            }
            return answer;
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.model.ModelCamelContext

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.