Java 类org.apache.camel.ShutdownRoute 实例源码

项目:Camel    文件:DefaultRouteContext.java   
public ShutdownRoute getShutdownRoute() {
    if (shutdownRoute != null) {
        return shutdownRoute;
    } else {
        // fallback to the option from camel context
        return getCamelContext().getShutdownRoute();
    }
}
项目:Camel    文件:JmsDiscoveryTest.java   
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");
        }
    };
}
项目:Camel    文件:MulticastDisruptorComponentTest.java   
@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");
            }
        };
    }
项目:camelinaction2    文件:InventoryRouteDefer.java   
@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");
}
项目:camelinaction    文件:InventoryRouteDefer.java   
@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");
}
项目:t4f-data    文件:InventoryRouteDefer.java   
@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");
}
项目:Camel    文件:RouteDefinition.java   
public ShutdownRoute getShutdownRoute() {
    return shutdownRoute;
}
项目:Camel    文件:RouteDefinition.java   
/**
 * To control how to shutdown the route.
 */
@XmlAttribute @Metadata(defaultValue = "Default")
public void setShutdownRoute(ShutdownRoute shutdownRoute) {
    this.shutdownRoute = shutdownRoute;
}
项目:Camel    文件:DefaultCamelContext.java   
public ShutdownRoute getShutdownRoute() {
    return shutdownRoute;
}
项目:Camel    文件:DefaultCamelContext.java   
public void setShutdownRoute(ShutdownRoute shutdownRoute) {
    this.shutdownRoute = shutdownRoute;
}
项目:Camel    文件:DefaultRouteContext.java   
public void setShutdownRoute(ShutdownRoute shutdownRoute) {
    this.shutdownRoute = shutdownRoute;
}
项目:Camel    文件:CamelContextFactoryBean.java   
public ShutdownRoute getShutdownRoute() {
    return shutdownRoute;
}
项目:Camel    文件:CamelContextFactoryBean.java   
public void setShutdownRoute(ShutdownRoute shutdownRoute) {
    this.shutdownRoute = shutdownRoute;
}
项目:Camel    文件:CamelContextFactoryBean.java   
public ShutdownRoute getShutdownRoute() {
    return shutdownRoute;
}
项目:Camel    文件:CamelContextFactoryBean.java   
public void setShutdownRoute(ShutdownRoute shutdownRoute) {
    this.shutdownRoute = shutdownRoute;
}
项目:Camel    文件:CamelContextFactoryBean.java   
public ShutdownRoute getShutdownRoute() {
    return shutdownRoute;
}
项目:Camel    文件:CamelContextFactoryBean.java   
public void setShutdownRoute(ShutdownRoute shutdownRoute) {
    this.shutdownRoute = shutdownRoute;
}
项目:switchyard    文件:CamelContextFactoryBeanDelegate.java   
@Override
public ShutdownRoute getShutdownRoute() {
    return _factoryBean.getShutdownRoute();
}
项目:dropwizard-camel    文件:ManagedCamelContext.java   
@Override
public void setShutdownRoute(ShutdownRoute shutdownRoute) {
    context.setShutdownRoute(shutdownRoute);
}
项目:dropwizard-camel    文件:ManagedCamelContext.java   
@Override
public ShutdownRoute getShutdownRoute() {
    return context.getShutdownRoute();
}
项目:camel-cdi    文件:CamelContextFactoryBean.java   
public ShutdownRoute getShutdownRoute() {
    return shutdownRoute;
}
项目:camel-cdi    文件:CamelContextFactoryBean.java   
public void setShutdownRoute(ShutdownRoute shutdownRoute) {
    this.shutdownRoute = shutdownRoute;
}
项目:Camel    文件:AbstractCamelContextFactoryBean.java   
public abstract ShutdownRoute getShutdownRoute();