cz.cuni.amis.pogamut.ut2004.hideandseek.server
Class UT2004HSServer

Package class diagram package UT2004HSServer
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent
      extended by cz.cuni.amis.pogamut.base.agent.impl.AbstractObservingAgent<WORLD_VIEW>
          extended by cz.cuni.amis.pogamut.base.agent.impl.AbstractGhostAgent<WORLD_VIEW,ACT>
              extended by cz.cuni.amis.pogamut.base.server.AbstractWorldServer<WORLD_VIEW,ACT,IUT2004Bot>
                  extended by cz.cuni.amis.pogamut.ut2004.server.impl.AbstractUT2004Server<UT2004WorldView,cz.cuni.amis.pogamut.base.communication.command.IAct>
                      extended by cz.cuni.amis.pogamut.ut2004.server.impl.UT2004Server
                          extended by cz.cuni.amis.pogamut.ut2004.hideandseek.server.UT2004HSServer
All Implemented Interfaces:
cz.cuni.amis.pogamut.base.agent.IAgent, cz.cuni.amis.pogamut.base.agent.IGhostAgent, cz.cuni.amis.pogamut.base.agent.IObservingAgent, cz.cuni.amis.pogamut.base.component.IComponent, cz.cuni.amis.pogamut.base.component.IComponentAware, cz.cuni.amis.pogamut.base.component.IControllable, cz.cuni.amis.pogamut.base.server.IWorldAgentsObserver<IUT2004Bot>, cz.cuni.amis.pogamut.base.server.IWorldServer<IUT2004Bot>, cz.cuni.amis.pogamut.unreal.server.IUnrealServer<IUT2004Bot>, IUT2004Server

public class UT2004HSServer
extends UT2004Server
implements IUT2004Server

Author:
Jimmy

Nested Class Summary
 
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.server.impl.UT2004Server
UT2004Server.MapChangeFuture
 
Field Summary
static long ROUND_STATE_BROADCAST_PERIOD_SECS
           
static cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId SERVER_UNREAL_ID
           
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.server.impl.UT2004Server
changingMap, changingMapAttempt, changingMapMutex, MAP_CHANGE_CONNECT_INTERVAL_MILLIS, mapChangeFuture, mapListListener, MAX_CHANGING_MAP_ATTEMPTS, playerJoinsListener, targetMap
 
Fields inherited from class cz.cuni.amis.pogamut.base.server.AbstractWorldServer
worldAddress
 
Fields inherited from class cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent
events, INTROSPECTION_ROOT_NAME, log, LOG_CATEGORY_NAME
 
Constructor Summary
UT2004HSServer(UT2004AgentParameters params, cz.cuni.amis.pogamut.base.utils.logging.IAgentLogger agentLogger, cz.cuni.amis.pogamut.base.component.bus.IComponentBus bus, cz.cuni.amis.pogamut.base.communication.connection.impl.socket.SocketConnection connection, UT2004WorldView worldView, cz.cuni.amis.pogamut.base.communication.command.IAct act)
           
 
Method Summary
protected  void cleanUp()
           
 void endGame()
           
protected  void failure(String reason)
           
 Map<cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId,HSBotRecord<PlayerMessage>> getBotRecords()
           
 cz.cuni.amis.utils.flag.Flag<Boolean> getGameFailed()
           
 cz.cuni.amis.utils.flag.Flag<HSGameState> getGameState()
           
protected  void init()
           
 cz.cuni.amis.utils.flag.Flag<Boolean> isGameRunning()
           
 boolean isRoundRunning()
           
protected  void killAgent()
           
 void observerFailedToStart(HSBotRecord botToObserve, Exception e)
           
protected  void reset()
           
 void startGame(HSGameConfig config)
           
protected  void stopAgent()
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.server.impl.UT2004Server
connectNativeBot, getParams, setGameMap, startAgent, startPausedAgent
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.server.impl.AbstractUT2004Server
connectNativeBot, createPasswordReply, getAgents, getAvailableMaps, getGameInfo, getGameSpeedFlag, getMap, getMapName, getMutators, getNativeAgents, getPasswordReply, getPlayers, getWorldView, readyCommandRequested, resetAgent, setAddress, setPassword
 
Methods inherited from class cz.cuni.amis.pogamut.base.server.AbstractWorldServer
getWorldAddress
 
Methods inherited from class cz.cuni.amis.pogamut.base.agent.impl.AbstractGhostAgent
getAct
 
Methods inherited from class cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent
addDependency, addDependency, addDependency, addJMXComponents, awaitState, awaitState, componentFatalError, componentStarted, componentStarted, componentStopped, componentStopping, createAgentJMX, createIntrospection, equals, getComponentId, getEventBus, getIntrospection, getJMX, getLog, getLogger, getName, getState, hashCode, inState, kill, notInState, pause, pauseAgent, preKillAgent, preStopAgent, resetEvent, resume, resumeAgent, setState, start, startPaused, stop, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface cz.cuni.amis.pogamut.ut2004.server.IUT2004Server
connectNativeBot, getAvailableMaps, getGameSpeedFlag, getMap, getMapName, getMutators, getNativeAgents, getPlayers, setAddress, setGameMap
 
Methods inherited from interface cz.cuni.amis.pogamut.unreal.server.IUnrealServer
connectNativeBot
 
Methods inherited from interface cz.cuni.amis.pogamut.base.server.IWorldServer
getWorldAddress
 
Methods inherited from interface cz.cuni.amis.pogamut.base.server.IWorldAgentsObserver
getAgents
 
Methods inherited from interface cz.cuni.amis.pogamut.base.agent.IGhostAgent
getAct
 
Methods inherited from interface cz.cuni.amis.pogamut.base.agent.IObservingAgent
getWorldView
 
Methods inherited from interface cz.cuni.amis.pogamut.base.agent.IAgent
getComponentId, getIntrospection, getLogger, getName, getState, kill, pause, resume, start, startPaused, stop
 
Methods inherited from interface cz.cuni.amis.pogamut.base.component.IComponentAware
getEventBus
 

Field Detail

SERVER_UNREAL_ID

public static final cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId SERVER_UNREAL_ID

ROUND_STATE_BROADCAST_PERIOD_SECS

public static final long ROUND_STATE_BROADCAST_PERIOD_SECS
See Also:
Constant Field Values
Constructor Detail

UT2004HSServer

@Inject
public UT2004HSServer(UT2004AgentParameters params,
                             cz.cuni.amis.pogamut.base.utils.logging.IAgentLogger agentLogger,
                             cz.cuni.amis.pogamut.base.component.bus.IComponentBus bus,
                             cz.cuni.amis.pogamut.base.communication.connection.impl.socket.SocketConnection connection,
                             UT2004WorldView worldView,
                             cz.cuni.amis.pogamut.base.communication.command.IAct act)
Method Detail

init

protected void init()
Overrides:
init in class UT2004Server

reset

protected void reset()
Overrides:
reset in class UT2004Server

failure

protected void failure(String reason)

startGame

public void startGame(HSGameConfig config)

endGame

public void endGame()

isGameRunning

public cz.cuni.amis.utils.flag.Flag<Boolean> isGameRunning()

isRoundRunning

public boolean isRoundRunning()

getGameState

public cz.cuni.amis.utils.flag.Flag<HSGameState> getGameState()

getGameFailed

public cz.cuni.amis.utils.flag.Flag<Boolean> getGameFailed()

getBotRecords

public Map<cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId,HSBotRecord<PlayerMessage>> getBotRecords()

stopAgent

protected void stopAgent()
Overrides:
stopAgent in class AbstractUT2004Server<UT2004WorldView,cz.cuni.amis.pogamut.base.communication.command.IAct>

killAgent

protected void killAgent()
Overrides:
killAgent in class AbstractUT2004Server<UT2004WorldView,cz.cuni.amis.pogamut.base.communication.command.IAct>

cleanUp

protected void cleanUp()

observerFailedToStart

public void observerFailedToStart(HSBotRecord botToObserve,
                                  Exception e)


Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.