org.apache.camel.impl.engine.AbstractCamelContext Java Examples

The following examples show how to use org.apache.camel.impl.engine.AbstractCamelContext. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CamelSupport.java    From camel-quarkus with Apache License 2.0 5 votes vote down vote up
public static String getCamelVersion() {
    String version = null;

    Package aPackage = AbstractCamelContext.class.getPackage();
    if (aPackage != null) {
        version = aPackage.getImplementationVersion();
        if (version == null) {
            version = aPackage.getSpecificationVersion();
        }
    }

    return Objects.requireNonNull(version, "Could not determine Camel version");
}
 
Example #2
Source File: CamelRoutesSetup.java    From quarkus-in-prod with Apache License 2.0 5 votes vote down vote up
public void start() throws Exception {
    final AbstractCamelContext context = getCamelContex();
    log.info("Starting camel routes");
    for (RouteDefinition routeDefinition : context.getExtension(Model.class).getRouteDefinitions()) {
        context.startRoute(routeDefinition.getId());
    }
}
 
Example #3
Source File: CamelRoutesSetup.java    From quarkus-in-prod with Apache License 2.0 5 votes vote down vote up
public void start() throws Exception {
    final AbstractCamelContext context = getCamelContex();
    log.info("Starting camel routes");
    for (RouteDefinition routeDefinition : context.getExtension(Model.class).getRouteDefinitions()) {
        context.startRoute(routeDefinition.getId());
    }
}
 
Example #4
Source File: CamelRoutesSetup.java    From quarkus-in-prod with Apache License 2.0 4 votes vote down vote up
private AbstractCamelContext getCamelContex() {
    return (AbstractCamelContext) camelContext; //this cast is safe
}
 
Example #5
Source File: CamelRoutesSetup.java    From quarkus-in-prod with Apache License 2.0 4 votes vote down vote up
private AbstractCamelContext getCamelContex() {
    return (AbstractCamelContext) camelContext; //this cast is safe
}