Class ScenarioHandler
- java.lang.Object
-
- java.lang.Thread
-
- org.opendaylight.openflowjava.protocol.impl.clients.ScenarioHandler
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
-
Field Summary
-
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description ScenarioHandler(Deque<ClientEvent> scenario)
Constructor.ScenarioHandler(Deque<ClientEvent> scenario, int freeze, long sleepBetweenTries)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addOfMsg(byte[] message)
Adds a message.Deque<ClientEvent>
getScenario()
Returns the scenario.boolean
isEmpty()
Returns true if scenario is done / empty.boolean
isFinishedOK()
boolean
isScenarioFinished()
Returns true is scenario is finished.void
run()
void
setCtx(io.netty.channel.ChannelHandlerContext ctx)
Sets the ChannelHandlerContext.void
setScenario(Deque<ClientEvent> scenario)
Sets the scenario.-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Constructor Detail
-
ScenarioHandler
public ScenarioHandler(Deque<ClientEvent> scenario)
Constructor.- Parameters:
scenario
-Deque
-
ScenarioHandler
public ScenarioHandler(Deque<ClientEvent> scenario, int freeze, long sleepBetweenTries)
-
-
Method Detail
-
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()
-
-