Class games.Battle.server.EuropaCore.PlayerFile
All Packages Class Hierarchy This Package Previous Next Index
Class games.Battle.server.EuropaCore.PlayerFile
java.lang.Object
|
+----games.Battle.server.EuropaCore.PlayerFile
- public class PlayerFile
- extends Object
- implements Runnable
PlayerFile is a thread that manages reading the player file, authorizing
players, modifying players, and periodically saving the player file.
-
checkpointInterval
-
checkpointInterval is the delay between writes of the player file.
-
PlayerFile(Logger, String)
- construct and start the player file thread.
-
authorizePlayer(PlayerInfo)
- validate a particular login attempt
-
getPlayerInfo(PlayerInfo)
- get the player info matching a given id
-
newPlayer(PlayerInfo)
- create a new player based on id.
-
run()
- Loop forever, sleeping and checkpointing periodically
-
start()
- start the checkpointing thread
-
stop()
- stop the checkpoint thread
checkpointInterval
public int checkpointInterval
- checkpointInterval is the delay between writes of the player file.
PlayerFile
public PlayerFile(Logger l,
String filename) throws IOException
- construct and start the player file thread.
- Parameters:
- l - the log file
- filename - the path to the player file
run
public void run()
- Loop forever, sleeping and checkpointing periodically
start
public void start()
- start the checkpointing thread
stop
public void stop()
- stop the checkpoint thread
authorizePlayer
public boolean authorizePlayer(PlayerInfo id)
- validate a particular login attempt
getPlayerInfo
public PlayerInfo getPlayerInfo(PlayerInfo id)
- get the player info matching a given id
newPlayer
public boolean newPlayer(PlayerInfo id)
- create a new player based on id.
- Parameters:
- id - the id to create
All Packages Class Hierarchy This Package Previous Next Index