Java 类org.apache.camel.spring.boot.FatJarRouter 实例源码

项目:ptmatchadapter    文件:PtmatchAdapter.java   
public static void main(String... args) {
  // Create a one-time task that will open a url to config page in a browser
  // after the application has been given a couple of seconds to start up.
  new Timer().schedule(new TimerTask() {
    @Override
    public void run() {
      LOG.info("============= Open URL in Browser");
      // Open a Browser window for the user
      BareBonesBrowserLaunch.openURL("http://localhost:8082/index.html");
      LOG.info("============= After Open URL in Browser");
    }
  }, 9000);


  LOG.info("============= Call Fat Jar Router Main");
  // Call Fat Jar Router main last because it never returns
  FatJarRouter.main(args);
  LOG.info("============= Returned from Fat Jar Router Main");
}
项目:Camel    文件:StandaloneFatJarRouterTest.java   
@Test
public void shouldStartCamelRoute() throws InterruptedException, IOException {
    // Given
    final int port = SocketUtils.findAvailableTcpPort();
    final URL httpEndpoint = new URL("http://localhost:" + port);
    new Thread() {
        @Override
        public void run() {
            FatJarRouter.main("--spring.main.sources=org.apache.camel.spring.boot.fatjarroutertests.TestFatJarRouter", "--http.port=" + port);
        }
    }.start();
    await().atMost(1, MINUTES).until(new Callable<Boolean>() {
        @Override
        public Boolean call() throws Exception {
            try {
                httpEndpoint.openStream();
            } catch (ConnectException ex) {
                return false;
            }
            return true;
        }
    });

    // When
    String response = IOUtils.toString(httpEndpoint);

    // Then
    assertEquals("stringBean", response);
}
项目:Camel    文件:MySpringBootRouterWarInitializer.java   
@Override
protected Class<? extends FatJarRouter> routerClass() {
    return MySpringBootRouter.class;
}
项目:Camel    文件:MySpringBootRouterWarInitializer.java   
@Override
protected Class<? extends FatJarRouter> routerClass() {
    return MySpringBootRouter.class;
}
项目:t5-doc    文件:T5FatWarRouter.java   
@Override
protected Class<? extends FatJarRouter> routerClass() {
    return T5FatJarRouter.class;
}
项目:camel_cxfrs_spring_boot_java_dsl    文件:MySpringBootRouterWarInitializer.java   
@Override
protected Class<? extends FatJarRouter> routerClass() {
    return MySpringBootRouter.class;
}
项目:camel-spring    文件:MainSpringBootCamelRouterWarInitializer.java   
@Override protected Class<? extends FatJarRouter> routerClass() {

        return MainSpringBootCamelRouter.class;
    }