camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/2] camel git commit: CAMEL-8914: When using interceptSendToEndpoint then intercepted endpoints should be shutdown when Camel shutdown.
Date Wed, 01 Jul 2015 09:17:04 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.15.x 97c6a8605 -> 5846204b2
  refs/heads/master b811261b0 -> 46d5e4d8d


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/46d5e4d8
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/46d5e4d8
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/46d5e4d8

Branch: refs/heads/master
Commit: 46d5e4d8da2b5e64422404e9f56ae8aa975c438c
Parents: b811261
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Wed Jul 1 11:22:44 2015 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Wed Jul 1 11:22:44 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/46d5e4d8/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();
     }


Mime
View raw message