rl.server.game
Class GameServer
java.lang.Object
rl.server.game.GameServer
- All Implemented Interfaces:
- CommandProcessorListener, GameListener, GameLogger
- Direct Known Subclasses:
- CenturionGameServer, InterceptorGameServer, LeviathanGameServer, PrefectGameServer
public abstract class GameServer
- extends java.lang.Object
- implements CommandProcessorListener, GameListener, GameLogger
|
Constructor Summary |
GameServer(java.lang.String name,
java.lang.String type)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_AdminConnection
protected Connection m_AdminConnection
m_Game
protected Game m_Game
GameServer
public GameServer(java.lang.String name,
java.lang.String type)
setGame
protected void setGame(Game game)
setName
public void setName(java.lang.String Name)
setType
public void setType(java.lang.String Type)
getName
public java.lang.String getName()
getType
public java.lang.String getType()
getCurrentTurn
public int getCurrentTurn()
hasBeenAbandoned
public boolean hasBeenAbandoned()
addListener
public void addListener(GameServerListener gsl)
removeListener
public void removeListener(GameServerListener gsl)
notifyServerStatusChanged
public void notifyServerStatusChanged()
getStatus
public GameStatus getStatus()
addConnection
public void addConnection(Connection c)
isReadyForConnection
public boolean isReadyForConnection()
canConnect
protected abstract boolean canConnect()
removeConnection
public void removeConnection(Connection c)
isConnected
public boolean isConnected(long connectionID)
postCommand
protected void postCommand(long ConnectionID,
Command c)
broadcastCommand
protected void broadcastCommand(Command c)
addObserverToGame
public void addObserverToGame(Observer o)
removePlayerFromGame
public void removePlayerFromGame(Player p)
removeObserverFromGame
public void removeObserverFromGame(Observer o)
getGameTypeName
public abstract java.lang.String getGameTypeName()
disconnected
public void disconnected(Connection c)
- Specified by:
disconnected in interface CommandProcessorListener
playerAdded
public void playerAdded(Player p)
playerRemoved
public void playerRemoved(Player p)
sendGameSides
public void sendGameSides(long ConnectionID)
sendCurrentParticipants
public void sendCurrentParticipants(long ConnectionID)
observersAllowed
public void observersAllowed(Command c)
raceSelectionAllowed
public void raceSelectionAllowed(Command c)
sendParticipationSelection
public void sendParticipationSelection(Command c)
gamePhase
public void gamePhase(GamePhase phase)
- Specified by:
gamePhase in interface GameListener
elementVisible
public void elementVisible(Player p,
Location l,
Affiliation aff)
- Specified by:
elementVisible in interface GameListener
elementNoLongerVisible
public void elementNoLongerVisible(Player p,
Location l,
Affiliation aff)
- Specified by:
elementNoLongerVisible in interface GameListener
elementRemoved
public void elementRemoved(Player p,
GameElementIdentifier ge)
- Specified by:
elementRemoved in interface GameListener
elementPlacementComplete
public void elementPlacementComplete(Player p)
- Specified by:
elementPlacementComplete in interface GameListener
gameDrawn
public void gameDrawn()
- Specified by:
gameDrawn in interface GameListener
gameWon
public void gameWon(GameSide side)
- Specified by:
gameWon in interface GameListener
gameLost
public void gameLost(GameSide side)
- Specified by:
gameLost in interface GameListener
log
public void log(java.lang.String message)
- Specified by:
log in interface GameLogger
registerHandler
public void registerHandler(int command,
CommandHandler ch)