public interface RaceRunnable
extends java.lang.Runnable
Modifier and Type | Method and Description |
---|---|
void |
setRaceListener(RaceListener raceListener)
|
void |
stop()
This method will be called by the
Runner to stop the execution of
this RaceRunnable . |
void stop()
Runner
to stop the execution of
this RaceRunnable
.
In the implementation of this method, you can set a flag
(e.g. stopped = true) that will break the loop running in
your run() method.void setRaceListener(RaceListener raceListener)
Runner
to inject a
RaceListener
in this RaceRunnable
.
In the implementation of this method, just retain a reference to the RaceListener
being passed as a parameter; read the documentation of RaceListener
to learn
how to use it.raceListener
- the RaceListener