Java 类org.apache.camel.main.MainSupport 实例源码

项目:signalk-server-java    文件:SignalKServer.java   
private void configureRouteManager(MainSupport main) throws Exception {
    logger.info("SignalKServer conf/signalk-config.json changed, restarting");

    if (Util.getConfigPropertyBoolean(ConfigConstants.HAWTIO_START)) {
        logger.info("SignalKServer starting hawtio manager....");
        server = startHawtio();
    }else{
        //start jolokia for remote management
        logger.info("SignalKServer starting jolokia remote management agent....");
        server = startJolokia();
    }

    RouteManager routeManager = RouteManagerFactory.getInstance();

    // add our routes to Camel
    main.addRouteBuilder(routeManager);

    logger.info("SignalKServer configured");

}