java.lang.Object
java.lang.Thread
org.opendaylight.openflowjava.protocol.impl.clients.ScenarioHandler
All Implemented Interfaces:
Runnable

public class ScenarioHandler extends Thread
Scenario handler thread.
Author:
michal.polkorab
  • Constructor Details

    • ScenarioHandler

      public ScenarioHandler(Deque<ClientEvent> scenario)
      Constructor.
      Parameters:
      scenario - Deque
    • ScenarioHandler

      public ScenarioHandler(Deque<ClientEvent> scenario, int freeze, long sleepBetweenTries)
  • Method Details

    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • isEmpty

      public boolean isEmpty()
      Returns true if scenario is done / empty.
    • getScenario

      public Deque<ClientEvent> getScenario()
      Returns the scenario.
    • setScenario

      public void setScenario(Deque<ClientEvent> scenario)
      Sets the scenario.
      Parameters:
      scenario - scenario filled with desired events
    • setCtx

      public void setCtx(io.netty.channel.ChannelHandlerContext ctx)
      Sets the ChannelHandlerContext.
      Parameters:
      ctx - context which will be used for sending messages (SendEvents)
    • addOfMsg

      public void addOfMsg(byte[] message)
      Adds a message.
      Parameters:
      message - received message that is compared to expected message
    • isScenarioFinished

      public boolean isScenarioFinished()
      Returns true is scenario is finished.
    • isFinishedOK

      public boolean isFinishedOK()