Java 类org.apache.camel.model.RouteBuilderDefinition 实例源码

项目:Camel    文件:AbstractCamelContextFactoryBean.java   
/**
 * Strategy to install all available routes into the context
 */
protected void installRoutes() throws Exception {
    List<RouteBuilder> builders = new ArrayList<RouteBuilder>();

    // lets add RoutesBuilder's added from references
    if (getBuilderRefs() != null) {
        for (RouteBuilderDefinition builderRef : getBuilderRefs()) {
            RoutesBuilder routes = builderRef.createRoutes(getContext());
            if (routes != null) {
                this.builders.add(routes);
            } else {
                throw new CamelException("Cannot find any routes with this RouteBuilder reference: " + builderRef);
            }
        }
    }

    // install already configured routes
    for (RoutesBuilder routeBuilder : this.builders) {
        getContext().addRoutes(routeBuilder);
    }

    // install builders
    for (RouteBuilder builder : builders) {
        // Inject the annotated resource
        postProcessBeforeInit(builder);
        getContext().addRoutes(builder);
    }
}
项目:Camel    文件:CamelContextFactoryBean.java   
public List<RouteBuilderDefinition> getBuilderRefs() {
    return builderRefs;
}
项目:Camel    文件:CamelContextFactoryBean.java   
public void setBuilderRefs(List<RouteBuilderDefinition> builderRefs) {
    this.builderRefs = builderRefs;
}
项目:Camel    文件:CamelContextFactoryBean.java   
public List<RouteBuilderDefinition> getBuilderRefs() {
    return builderRefs;
}
项目:Camel    文件:CamelContextFactoryBean.java   
public void setBuilderRefs(List<RouteBuilderDefinition> builderRefs) {
    this.builderRefs = builderRefs;
}
项目:Camel    文件:CamelContextFactoryBean.java   
public List<RouteBuilderDefinition> getBuilderRefs() {
    return builderRefs;
}
项目:Camel    文件:CamelContextFactoryBean.java   
public void setBuilderRefs(List<RouteBuilderDefinition> builderRefs) {
    this.builderRefs = builderRefs;
}
项目:switchyard    文件:CamelContextFactoryBeanDelegate.java   
@Override
public List<RouteBuilderDefinition> getBuilderRefs() {
    return _factoryBean.getBuilderRefs();
}
项目:camel-cdi    文件:CamelContextFactoryBean.java   
public List<RouteBuilderDefinition> getBuilderRefs() {
    return builderRefs;
}
项目:camel-cdi    文件:CamelContextFactoryBean.java   
public void setBuilderRefs(List<RouteBuilderDefinition> builderRefs) {
    this.builderRefs = builderRefs;
}
项目:Camel    文件:AbstractCamelContextFactoryBean.java   
public abstract List<RouteBuilderDefinition> getBuilderRefs();