dualroids
Class ShipStatePump
java.lang.Object
|
+--dualroids.ShipStatePump
- All Implemented Interfaces:
- Runnable
- public final class ShipStatePump
- extends Object
- implements Runnable
Pumps the ship state to the server.
Field Summary |
private boolean |
doLoop
A boolean indicating whether the pumping should be
continued. |
private SpaceShip |
ship
The SpaceShip whose state this
ShipStatePump pumps. |
Constructor Summary |
ShipStatePump()
Contructs a new ShipStatePump . |
Method Summary |
void |
registerShip(SpaceShip ship)
Registers the ship whose state is to be pumped. |
void |
run()
Starts the pump. |
void |
stop()
Tells the pump to stop. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
ship
private SpaceShip ship
- The
SpaceShip
whose state this
ShipStatePump
pumps.
doLoop
private boolean doLoop
- A
boolean
indicating whether the pumping should be
continued.
ShipStatePump
public ShipStatePump()
- Contructs a new
ShipStatePump
.
registerShip
public void registerShip(SpaceShip ship)
- Registers the ship whose state is to be pumped.
- Parameters:
ship
- the ship whose state is to be pumped
stop
public void stop()
- Tells the pump to stop.
run
public void run()
- Starts the pump.
- Specified by:
run
in interface Runnable
Dualroids was written by Oskar Ojala, Yrjö Kari-Koskinen and Henri Sivonen