Skip to content

Commit

Permalink
Added an API to RoutePolicySupport for stopRoute to control timeout f…
Browse files Browse the repository at this point in the history
…or graceful shutdown

git-svn-id: https://svn.apache.org/repos/asf/camel/trunk@1001004 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Ashwin J. Karpe committed Sep 24, 2010
1 parent ba65e3a commit 35fc173
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -16,6 +16,8 @@
*/
package org.apache.camel.impl;

import java.util.concurrent.TimeUnit;

import org.apache.camel.Consumer;
import org.apache.camel.Exchange;
import org.apache.camel.Route;
Expand Down Expand Up @@ -71,6 +73,10 @@ protected void stopRoute(Route route) throws Exception {
route.getRouteContext().getCamelContext().stopRoute(route.getId());
}

protected void stopRoute(Route route, long timeout, TimeUnit timeUnit) throws Exception {
route.getRouteContext().getCamelContext().stopRoute(route.getId(), timeout, timeUnit);
}

/**
* Handles the given exception using the {@link #getExceptionHandler()}
*
Expand Down

0 comments on commit 35fc173

Please sign in to comment.