From ca0b2e970e3350a112b9ef7d403724eb4d64d173 Mon Sep 17 00:00:00 2001
From: Nelson Tavares de Sousa <ntd@informatik.uni-kiel.de>
Date: Fri, 30 Jan 2015 14:08:11 +0100
Subject: [PATCH] renamed the default listener

---
 src/main/java/teetime/framework/Analysis.java               | 6 +++---
 .../{DefaultListener.java => IgnoringStageListener.java}    | 4 ++--
 .../framework/exceptionHandling/StageExceptionListener.java | 2 ++
 .../MethodCallThroughputAnalysis9.java                      | 4 ++--
 .../experiment11/MethodCallThroughputAnalysis11.java        | 4 ++--
 .../experiment15/MethodCallThroughputAnalysis15.java        | 6 +++---
 6 files changed, 14 insertions(+), 12 deletions(-)
 rename src/main/java/teetime/framework/exceptionHandling/{DefaultListener.java => IgnoringStageListener.java} (70%)

diff --git a/src/main/java/teetime/framework/Analysis.java b/src/main/java/teetime/framework/Analysis.java
index 873e2fc1..450c8f75 100644
--- a/src/main/java/teetime/framework/Analysis.java
+++ b/src/main/java/teetime/framework/Analysis.java
@@ -9,7 +9,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import teetime.framework.exceptionHandling.DefaultListener;
+import teetime.framework.exceptionHandling.IgnoringStageListener;
 import teetime.framework.exceptionHandling.StageExceptionListener;
 import teetime.framework.signal.ValidatingSignal;
 import teetime.framework.validation.AnalysisNotValidException;
@@ -43,11 +43,11 @@ public class Analysis implements UncaughtExceptionHandler {
 	 *            to be used for the analysis
 	 */
 	public Analysis(final AnalysisConfiguration configuration) {
-		this(configuration, false, new DefaultListener());
+		this(configuration, false, new IgnoringStageListener());
 	}
 
 	public Analysis(final AnalysisConfiguration configuration, final boolean validationEnabled) {
-		this(configuration, validationEnabled, new DefaultListener());
+		this(configuration, validationEnabled, new IgnoringStageListener());
 	}
 
 	public Analysis(final AnalysisConfiguration configuration, final StageExceptionListener listener) {
diff --git a/src/main/java/teetime/framework/exceptionHandling/DefaultListener.java b/src/main/java/teetime/framework/exceptionHandling/IgnoringStageListener.java
similarity index 70%
rename from src/main/java/teetime/framework/exceptionHandling/DefaultListener.java
rename to src/main/java/teetime/framework/exceptionHandling/IgnoringStageListener.java
index 1db8e36c..c8541006 100644
--- a/src/main/java/teetime/framework/exceptionHandling/DefaultListener.java
+++ b/src/main/java/teetime/framework/exceptionHandling/IgnoringStageListener.java
@@ -2,9 +2,9 @@ package teetime.framework.exceptionHandling;
 
 import teetime.framework.Stage;
 
-public class DefaultListener extends StageExceptionListener {
+public class IgnoringStageListener extends StageExceptionListener {
 
-	public DefaultListener() {
+	public IgnoringStageListener() {
 		super();
 		// TODO Auto-generated constructor stub
 	}
diff --git a/src/main/java/teetime/framework/exceptionHandling/StageExceptionListener.java b/src/main/java/teetime/framework/exceptionHandling/StageExceptionListener.java
index 1ebe184b..81e0fd78 100644
--- a/src/main/java/teetime/framework/exceptionHandling/StageExceptionListener.java
+++ b/src/main/java/teetime/framework/exceptionHandling/StageExceptionListener.java
@@ -27,6 +27,8 @@ public abstract class StageExceptionListener {
 	 *            thrown exception
 	 * @param throwingStage
 	 *            the stage, which has thrown the exception.
+	 * @return
+	 *         true, if the thread can continue with execution or false, if thread should be terminated
 	 */
 	public abstract boolean onStageException(Exception e, Stage throwingStage);
 
diff --git a/src/performancetest/java/teetime/examples/experiment09pipeimpls/MethodCallThroughputAnalysis9.java b/src/performancetest/java/teetime/examples/experiment09pipeimpls/MethodCallThroughputAnalysis9.java
index dd3388ba..de61a8ad 100644
--- a/src/performancetest/java/teetime/examples/experiment09pipeimpls/MethodCallThroughputAnalysis9.java
+++ b/src/performancetest/java/teetime/examples/experiment09pipeimpls/MethodCallThroughputAnalysis9.java
@@ -20,7 +20,7 @@ import java.util.List;
 import teetime.framework.OldHeadPipeline;
 import teetime.framework.RunnableProducerStage;
 import teetime.framework.Stage;
-import teetime.framework.exceptionHandling.DefaultListener;
+import teetime.framework.exceptionHandling.IgnoringStageListener;
 import teetime.framework.pipe.IPipeFactory;
 import teetime.stage.CollectorSink;
 import teetime.stage.NoopFilter;
@@ -45,7 +45,7 @@ public class MethodCallThroughputAnalysis9 {
 
 	public void init(final IPipeFactory pipeFactory) {
 		Stage pipeline = this.buildPipeline(pipeFactory);
-		this.runnable = new RunnableProducerStage(pipeline, new DefaultListener());
+		this.runnable = new RunnableProducerStage(pipeline, new IgnoringStageListener());
 	}
 
 	/**
diff --git a/src/performancetest/java/teetime/examples/experiment11/MethodCallThroughputAnalysis11.java b/src/performancetest/java/teetime/examples/experiment11/MethodCallThroughputAnalysis11.java
index 80b9e282..690d2a3e 100644
--- a/src/performancetest/java/teetime/examples/experiment11/MethodCallThroughputAnalysis11.java
+++ b/src/performancetest/java/teetime/examples/experiment11/MethodCallThroughputAnalysis11.java
@@ -20,7 +20,7 @@ import java.util.List;
 import teetime.framework.OldHeadPipeline;
 import teetime.framework.RunnableProducerStage;
 import teetime.framework.Stage;
-import teetime.framework.exceptionHandling.DefaultListener;
+import teetime.framework.exceptionHandling.IgnoringStageListener;
 import teetime.framework.pipe.UnorderedGrowablePipe;
 import teetime.stage.CollectorSink;
 import teetime.stage.NoopFilter;
@@ -45,7 +45,7 @@ public class MethodCallThroughputAnalysis11 {
 
 	public void init() {
 		Stage pipeline = this.buildPipeline(this.numInputObjects, this.inputObjectCreator);
-		this.runnable = new RunnableProducerStage(pipeline, new DefaultListener());
+		this.runnable = new RunnableProducerStage(pipeline, new IgnoringStageListener());
 	}
 
 	private OldHeadPipeline<ObjectProducer<TimestampObject>, CollectorSink<TimestampObject>> buildPipeline(final long numInputObjects,
diff --git a/src/performancetest/java/teetime/examples/experiment15/MethodCallThroughputAnalysis15.java b/src/performancetest/java/teetime/examples/experiment15/MethodCallThroughputAnalysis15.java
index 71033ec2..d2db72f0 100644
--- a/src/performancetest/java/teetime/examples/experiment15/MethodCallThroughputAnalysis15.java
+++ b/src/performancetest/java/teetime/examples/experiment15/MethodCallThroughputAnalysis15.java
@@ -21,7 +21,7 @@ import teetime.framework.AnalysisConfiguration;
 import teetime.framework.OldHeadPipeline;
 import teetime.framework.RunnableProducerStage;
 import teetime.framework.Stage;
-import teetime.framework.exceptionHandling.DefaultListener;
+import teetime.framework.exceptionHandling.IgnoringStageListener;
 import teetime.framework.pipe.IPipeFactory;
 import teetime.framework.pipe.OrderedGrowableArrayPipe;
 import teetime.framework.pipe.PipeFactoryRegistry.PipeOrdering;
@@ -65,10 +65,10 @@ public class MethodCallThroughputAnalysis15 extends AnalysisConfiguration {
 
 	public void init() {
 		OldHeadPipeline<Clock, Sink<Long>> clockPipeline = this.buildClockPipeline();
-		this.clockRunnable = new RunnableProducerStage(clockPipeline, new DefaultListener());
+		this.clockRunnable = new RunnableProducerStage(clockPipeline, new IgnoringStageListener());
 
 		Stage pipeline = this.buildPipeline(this.clock);
-		this.runnable = new RunnableProducerStage(pipeline, new DefaultListener());
+		this.runnable = new RunnableProducerStage(pipeline, new IgnoringStageListener());
 	}
 
 	private OldHeadPipeline<Clock, Sink<Long>> buildClockPipeline() {
-- 
GitLab