cz.cuni.amis.pogamut.ut2004.server.impl
Class UT2004Server
java.lang.Object
cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent
cz.cuni.amis.pogamut.base.agent.impl.AbstractObservingAgent<WORLD_VIEW>
cz.cuni.amis.pogamut.base.agent.impl.AbstractGhostAgent<WORLD_VIEW,ACT>
cz.cuni.amis.pogamut.base.server.AbstractWorldServer<WORLD_VIEW,ACT,IUT2004Bot>
cz.cuni.amis.pogamut.ut2004.server.impl.AbstractUT2004Server<UT2004WorldView,IAct>
cz.cuni.amis.pogamut.ut2004.server.impl.UT2004Server
- All Implemented Interfaces:
- IAgent, IGhostAgent, IObservingAgent, IComponent, IComponentAware, IControllable, IWorldAgentsObserver<IUT2004Bot>, IWorldServer<IUT2004Bot>, IUnrealServer<IUT2004Bot>, IUT2004Server
- Direct Known Subclasses:
- UT2004Analyzer
public class UT2004Server
- extends AbstractUT2004Server<UT2004WorldView,IAct>
- implements IUT2004Server
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, killAgent, readyCommandRequested, resetAgent, setAddress, setPassword, stopAgent |
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 interface cz.cuni.amis.pogamut.base.agent.IAgent |
getComponentId, getIntrospection, getLogger, getName, getState, kill, pause, resume, start, startPaused, stop |
MAX_CHANGING_MAP_ATTEMPTS
public static final int MAX_CHANGING_MAP_ATTEMPTS
- How many times we're going to try to connect to the GB2004
before declaring that the change-map has failed.
- See Also:
- Constant Field Values
MAP_CHANGE_CONNECT_INTERVAL_MILLIS
public static final int MAP_CHANGE_CONNECT_INTERVAL_MILLIS
- See Also:
- Constant Field Values
playerJoinsListener
protected IWorldEventListener<PlayerJoinsGame> playerJoinsListener
mapListListener
protected IWorldEventListener<MapListObtained> mapListListener
changingMapMutex
protected Object changingMapMutex
changingMap
protected boolean changingMap
changingMapAttempt
protected int changingMapAttempt
targetMap
protected String targetMap
mapChangeFuture
protected UT2004Server.MapChangeFuture mapChangeFuture
UT2004Server
@Inject
public UT2004Server(UT2004AgentParameters params,
IAgentLogger agentLogger,
IComponentBus bus,
SocketConnection connection,
UT2004WorldView worldView,
IAct act)
getParams
public UT2004AgentParameters getParams()
- Returns parameters that were passed into the agent during the construction.
This is a great place to parametrize your agent. Note that you may pass arbitrary subclass of UT2004AgentParameters
to the constructor/factory/runner and pick them up here.
- Returns:
- parameters
startAgent
protected void startAgent()
- Overrides:
startAgent
in class AbstractUT2004Server<UT2004WorldView,IAct>
startPausedAgent
protected void startPausedAgent()
- Overrides:
startPausedAgent
in class AbstractUT2004Server<UT2004WorldView,IAct>
init
protected void init()
- Hook for users (descendants of this class) to fill-in initialization code, any listeners hooked here should be removed inside
reset()
.
reset
protected void reset()
- Description copied from class:
AbstractUT2004Server
- Called during stop/kill/reset events.
- Overrides:
reset
in class AbstractUT2004Server<UT2004WorldView,IAct>
setGameMap
public Future<Boolean> setGameMap(String map)
throws MapChangeException
- Description copied from interface:
IUT2004Server
- Method that initiates map-change. It returns future that describes the result.
Note that the object must restart itself in order to reconnect to the new server.
- Specified by:
setGameMap
in interface IUnrealServer<IUT2004Bot>
- Specified by:
setGameMap
in interface IUT2004Server
- Throws:
MapChangeException
connectNativeBot
public void connectNativeBot(String botName,
String botType)
- Specified by:
connectNativeBot
in interface IUnrealServer<IUT2004Bot>
Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.