本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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);
}
示例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();
}