Package net.sf.freecol.server.control
Class FreeColServerHolder
- java.lang.Object
-
- net.sf.freecol.server.control.FreeColServerHolder
-
- Direct Known Subclasses:
AIInGameInputHandler
,Controller
,ServerInputHandler
,UserConnectionHandler
public class FreeColServerHolder extends java.lang.Object
This base class provides thread-safe access to aFreeColServer
for several subclasses.
-
-
Field Summary
Fields Modifier and Type Field Description private FreeColServer
freeColServer
The main server object.
-
Constructor Summary
Constructors Modifier Constructor Description protected
FreeColServerHolder(FreeColServer server)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FreeColServer
getFreeColServer()
Returns the main server object.protected ServerGame
getGame()
Get the game the server is operating.
-
-
-
Field Detail
-
freeColServer
private final FreeColServer freeColServer
The main server object.
-
-
Constructor Detail
-
FreeColServerHolder
protected FreeColServerHolder(FreeColServer server)
Constructor.- Parameters:
server
- The initial value for the server.
-
-
Method Detail
-
getFreeColServer
protected FreeColServer getFreeColServer()
Returns the main server object.- Returns:
- The main server object.
-
getGame
protected ServerGame getGame()
Get the game the server is operating.- Returns:
- The current
ServerGame
.
-
-