public ShutdownRoute getShutdownRoute() { if (shutdownRoute != null) { return shutdownRoute; } else { // fallback to the option from camel context return getCamelContext().getShutdownRoute(); } }
protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { public void configure() throws Exception { // lets setup the heartbeats from("timer:heartbeats?delay=100") .to("bean:service1?method=status") .to("activemq:topic:registry.heartbeats"); // defer shutting this route down as the first route depends upon it to // be running so it can complete its current exchanges from("activemq:topic:registry.heartbeats") .shutdownRoute(ShutdownRoute.Defer) .to("bean:registry?method=onEvent", "mock:result"); } }; }
@Override protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { @Override public void configure() throws Exception { from("disruptor:test?multipleConsumers=true").to("mock:result1") .setShutdownRoute(ShutdownRoute.Defer); from("disruptor:test?multipleConsumers=true").to("mock:result2") .setShutdownRoute(ShutdownRoute.Defer); // from("disruptor:testAsynchronous").process(threadCounter).to("mock:result"); // from("disruptor:testMultipleConsumers?concurrentConsumers=4").process(threadCounter).to("mock:result"); } }; }
@Override public void configure() throws Exception { // this is the webservice route which is started last from("cxf:bean:inventoryEndpoint") .routeId("webservice").startupOrder(3) .to("direct:update") .transform().method("inventoryService", "replyOk"); // this is the file route which is started 2nd last from("file://target/inventory/updates") .routeId("file").startupOrder(2) .split(body().tokenize("\n")) .convertBodyTo(UpdateInventoryInput.class) .to("direct:update"); // this is the shared route which then must be started first from("direct:update") .routeId("update").startupOrder(1) // we must defer shutting down this route as its a shared route by the two others .shutdownRoute(ShutdownRoute.Defer) .to("bean:inventoryService?method=updateInventory"); }
public ShutdownRoute getShutdownRoute() { return shutdownRoute; }
/** * To control how to shutdown the route. */ @XmlAttribute @Metadata(defaultValue = "Default") public void setShutdownRoute(ShutdownRoute shutdownRoute) { this.shutdownRoute = shutdownRoute; }
public void setShutdownRoute(ShutdownRoute shutdownRoute) { this.shutdownRoute = shutdownRoute; }
@Override public ShutdownRoute getShutdownRoute() { return _factoryBean.getShutdownRoute(); }
@Override public void setShutdownRoute(ShutdownRoute shutdownRoute) { context.setShutdownRoute(shutdownRoute); }
@Override public ShutdownRoute getShutdownRoute() { return context.getShutdownRoute(); }
public abstract ShutdownRoute getShutdownRoute();