camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1226433 - in /camel/branches/camel-2.8.x: ./ camel-core/src/main/java/org/apache/camel/component/browse/ camel-core/src/main/java/org/apache/camel/component/dataset/ camel-core/src/main/java/org/apache/camel/component/timer/ camel-core/src...
Date Mon, 02 Jan 2012 14:28:50 GMT
Author: davsclaus
Date: Mon Jan  2 14:28:49 2012
New Revision: 1226433

URL: http://svn.apache.org/viewvc?rev=1226433&view=rev
Log:
CAMEL-4792: Use doStart/doStop over start/stop if extending ServiceSupport, which ensures
ServiceSupport can keep track of the state.

Modified:
    camel/branches/camel-2.8.x/   (props changed)
    camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/browse/BrowseEndpoint.java
    camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetEndpoint.java
    camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java
    camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/impl/LimitedPollingConsumerPollStrategy.java
    camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/Tracer.java

Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jan  2 14:28:49 2012
@@ -1 +1 @@
-/camel/trunk:1212504,1215477,1221565,1224674,1225077-1225078,1225766,1226081,1226387
+/camel/trunk:1212504,1215477,1221565,1224674,1225077-1225078,1225766,1226081,1226387,1226430

Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/browse/BrowseEndpoint.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/browse/BrowseEndpoint.java?rev=1226433&r1=1226432&r2=1226433&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/browse/BrowseEndpoint.java
(original)
+++ camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/browse/BrowseEndpoint.java
Mon Jan  2 14:28:49 2012
@@ -98,14 +98,18 @@ public class BrowseEndpoint extends Defa
         loadBalancer.process(exchange);
     }
 
-    public void start() throws Exception {
+    @Override
+    protected void doStart() throws Exception {
         exchanges = createExchangeList();
+        super.doStart();
     }
 
-    public void stop() throws Exception {
+    @Override
+    protected void doStop() throws Exception {
         if (exchanges != null) {
             exchanges.clear();
             exchanges = null;
         }
+        super.doStop();
     }
 }

Modified: camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetEndpoint.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetEndpoint.java?rev=1226433&r1=1226432&r2=1226433&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetEndpoint.java
(original)
+++ camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetEndpoint.java
Mon Jan  2 14:28:49 2012
@@ -218,17 +218,16 @@ public class DataSetEndpoint extends Moc
         return answer;
     }
 
-    public void start() throws Exception {
+    @Override
+    protected void doStart() throws Exception {
+        super.doStart();
+
         long size = getDataSet().getSize();
         expectedMessageCount((int) size);
         if (reporter == null) {
             reporter = createReporter();
         }
-        log.info("Start: " + this + " expecting " + size + " messages");
-    }
-
-    public void stop() throws Exception {
-        log.info("Stop: " + this);
+        log.info(this + " expecting " + size + " messages");
     }
 
 }

Modified: camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java?rev=1226433&r1=1226432&r2=1226433&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java
(original)
+++ camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java
Mon Jan  2 14:28:49 2012
@@ -69,12 +69,16 @@ public class TimerEndpoint extends Defau
         return new TimerConsumer(this, processor);
     }
 
-    public void start() throws Exception {
+    @Override
+    protected void doStart() throws Exception {
+        super.doStart();
         // do nothing, the timer will be set when the first consumer will request it
     }
 
-    public void stop() throws Exception {
+    @Override
+    protected void doStop() throws Exception {
         setTimer(null);
+        super.doStop();
     }
 
     @ManagedAttribute(description = "Timer Name")

Modified: camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/impl/LimitedPollingConsumerPollStrategy.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/impl/LimitedPollingConsumerPollStrategy.java?rev=1226433&r1=1226432&r2=1226433&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/impl/LimitedPollingConsumerPollStrategy.java
(original)
+++ camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/impl/LimitedPollingConsumerPollStrategy.java
Mon Jan  2 14:28:49 2012
@@ -112,6 +112,7 @@ public class LimitedPollingConsumerPollS
     }
 
     public void start() throws Exception {
+        // noop
     }
 
     public void stop() throws Exception {

Modified: camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/Tracer.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/Tracer.java?rev=1226433&r1=1226432&r2=1226433&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/Tracer.java
(original)
+++ camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/Tracer.java
Mon Jan  2 14:28:49 2012
@@ -324,14 +324,16 @@ public class Tracer implements Intercept
         this.traceBodySize = traceBodySize;
     }
 
-    @Override
-    public String toString() {
-        return "Tracer";
-    }
-
     public void start() throws Exception {
+        // noop
     }
 
     public void stop() throws Exception {
+        // noop
+    }
+
+    @Override
+    public String toString() {
+        return "Tracer";
     }
 }



Mime
View raw message