You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2015/07/01 11:17:05 UTC
[2/2] camel git commit: CAMEL-8914: When using
interceptSendToEndpoint then intercepted endpoints should be shutdown when
Camel shutdown.
CAMEL-8914: When using interceptSendToEndpoint then intercepted endpoints should be shutdown when Camel shutdown.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5846204b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5846204b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5846204b
Branch: refs/heads/camel-2.15.x
Commit: 5846204b210dfaf9aa914e413c07f4e1c4067230
Parents: 97c6a86
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Jul 1 11:22:44 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Jul 1 11:23:08 2015 +0200
----------------------------------------------------------------------
.../java/org/apache/camel/impl/InterceptSendToEndpoint.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/5846204b/camel-core/src/main/java/org/apache/camel/impl/InterceptSendToEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/InterceptSendToEndpoint.java b/camel-core/src/main/java/org/apache/camel/impl/InterceptSendToEndpoint.java
index 9c73ed2..b94b3eb 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/InterceptSendToEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/InterceptSendToEndpoint.java
@@ -29,6 +29,7 @@ import org.apache.camel.ExchangePattern;
import org.apache.camel.PollingConsumer;
import org.apache.camel.Processor;
import org.apache.camel.Producer;
+import org.apache.camel.ShutdownableService;
import org.apache.camel.util.ServiceHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -40,7 +41,7 @@ import static org.apache.camel.processor.PipelineHelper.continueProcessing;
*
* @version
*/
-public class InterceptSendToEndpoint implements Endpoint {
+public class InterceptSendToEndpoint implements Endpoint, ShutdownableService {
private static final Logger LOG = LoggerFactory.getLogger(InterceptSendToEndpoint.class);
@@ -230,6 +231,11 @@ public class InterceptSendToEndpoint implements Endpoint {
}
@Override
+ public void shutdown() throws Exception {
+ ServiceHelper.stopAndShutdownServices(delegate, detour);
+ }
+
+ @Override
public String toString() {
return delegate.toString();
}