当前位置: 首页>>代码示例>>Java>>正文


Java Main.enableHangupSupport方法代码示例

本文整理汇总了Java中org.apache.camel.main.Main.enableHangupSupport方法的典型用法代码示例。如果您正苦于以下问题:Java Main.enableHangupSupport方法的具体用法?Java Main.enableHangupSupport怎么用?Java Main.enableHangupSupport使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.camel.main.Main的用法示例。


在下文中一共展示了Main.enableHangupSupport方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: JdbiExample

import org.apache.camel.main.Main; //导入方法依赖的package包/类
@Inject
JdbiExample(ReceiveCommandsAsJsonRoute receiveCommandsRoute,
			JdbiConsumeCommandsRoute consumeCommandsRoute, 
			JdbiConsumeEventsRoute consumeEventsRoute) throws Exception  {
	
	main = new Main() ;
	main.enableHangupSupport();
	registry = new SimpleRegistry();
	context = new DefaultCamelContext(registry);

	context.addRoutes(receiveCommandsRoute);
	context.addRoutes(consumeCommandsRoute);
	context.addRoutes(consumeEventsRoute);
	
	main.getCamelContexts().clear();
	main.getCamelContexts().add(context);
	main.setDuration(-1);
	main.start();
	
	
}
 
开发者ID:rodolfodpk,项目名称:myeslib,代码行数:22,代码来源:JdbiExample.java

示例2: CmdProducer

import org.apache.camel.main.Main; //导入方法依赖的package包/类
@Inject
CmdProducer(CommandsDataSetsRoute datasetRoute) throws Exception  {
	
	main = new Main() ;
	main.enableHangupSupport();
	registry = new SimpleRegistry();
	context = new DefaultCamelContext(registry);
	
	populate();
	
	registry.put("createCommandDataset", new CreateCommandDataSet(ids, dataSetSize));
	registry.put("increaseCommandDataset", new IncreaseCommandDataSet(ids, dataSetSize));
	registry.put("decreaseCommandDataset", new DecreaseCommandDataSet(ids, dataSetSize));

	context.addRoutes(datasetRoute);
	
	main.getCamelContexts().clear();
	main.getCamelContexts().add(context);
	main.setDuration(-1);
	main.start();
	
}
 
开发者ID:rodolfodpk,项目名称:myeslib,代码行数:23,代码来源:CmdProducer.java

示例3: boot

import org.apache.camel.main.Main; //导入方法依赖的package包/类
private void boot() throws Exception{
    ApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring-context.xml");
    CamelContext  camelContext = SpringCamelContext.springCamelContext(applicationContext, false);
    main = new Main();
    main.enableHangupSupport();

    camelContext.start();
    main.getOrCreateCamelContext();
    main.run();
}
 
开发者ID:srecon,项目名称:OracleToElasticSearch,代码行数:11,代码来源:Standalone.java

示例4: boot

import org.apache.camel.main.Main; //导入方法依赖的package包/类
public void boot(String port) throws Exception {
  System.setProperty("port", port);

  // create a Main instance
  main = new Main();
  // enable hangup support so you can press ctrl + c to terminate the JVM
  main.enableHangupSupport();
  // add routes
  main.addRouteBuilder(new TimeServiceRouteBuilder());

  // run until you terminate the JVM
  System.out.println(String.format("Starting Camel, using port %s. Use ctrl + c to terminate the JVM.", port));
  main.run();
}
 
开发者ID:MoriTanosuke,项目名称:first-camel-microservice,代码行数:15,代码来源:RunTimeService.java

示例5: boot

import org.apache.camel.main.Main; //导入方法依赖的package包/类
public void boot(String port) throws Exception {
  System.setProperty("port", port);

  // create a Main instance
  main = new Main();
  // enable hangup support so you can press ctrl + c to terminate the JVM
  main.enableHangupSupport();
  // add routes
  main.addRouteBuilder(new DateServiceRouteBuilder());

  // run until you terminate the JVM
  System.out.println(String.format("Starting Camel, using port %s. Use ctrl + c to terminate the JVM.", port));
  main.run();
}
 
开发者ID:MoriTanosuke,项目名称:first-camel-microservice,代码行数:15,代码来源:RunDateService.java

示例6: startWithCamelMainWrapper

import org.apache.camel.main.Main; //导入方法依赖的package包/类
private static void startWithCamelMainWrapper(String[] args) throws Exception {
    Main main = new Main();
    main.enableHangupSupport();
    main.addRouteBuilder(new MyRouteBuilder());
    main.run(args);
}
 
开发者ID:WillemJiang,项目名称:camel-test-framework-demo,代码行数:7,代码来源:MainApp.java

示例7: moveFileTest

import org.apache.camel.main.Main; //导入方法依赖的package包/类
@Test
public  void moveFileTest() throws Exception {

    Main main = new Main();
    main.addRouteBuilder(new MoreRouterBuilders.SyncIDEAConfig());
    main.enableHangupSupport();
    main.run();







}
 
开发者ID:tianzhidao28,项目名称:IDEAConfigSync,代码行数:16,代码来源:LocalMoveTest.java


注:本文中的org.apache.camel.main.Main.enableHangupSupport方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。