Bug 2245 - Fixed critical issues
[openflowjava.git] / simple-client / src / main / java / org / opendaylight / openflowjava / protocol / impl / clients / ScenarioHandler.java
index 71f7be9022b743b3011badf9115325466d677f63..61333f87272b3902b34550cb973990a138e8903b 100644 (file)
@@ -30,6 +30,7 @@ public class ScenarioHandler extends Thread {
     private BlockingQueue<byte[]> ofMsg;
     private ChannelHandlerContext ctx;
     private int eventNumber;
+    private boolean scenarioFinished = false;
 
     /**
      * 
@@ -79,6 +80,7 @@ public class ScenarioHandler extends Thread {
         }
         LOGGER.debug("Scenario finished");
         synchronized (this) {
+            scenarioFinished = true;
             this.notify();
         }
     }
@@ -117,4 +119,11 @@ public class ScenarioHandler extends Thread {
     public void addOfMsg(byte[] message) {
         ofMsg.add(message);
     }
+
+    /**
+     * @return true is scenario is finished
+     */
+    public boolean isScenarioFinished() {
+        return scenarioFinished;
+    }
 }