cz.cuni.amis.pogamut.ut2004.server
Interface IUT2004Server

Package class diagram package IUT2004Server
All Superinterfaces:
IAgent, IComponent, IComponentAware, IControllable, IGhostAgent, IObservingAgent, IUnrealServer<IUT2004Bot>, IWorldAgentsObserver<IUT2004Bot>, IWorldServer<IUT2004Bot>
All Known Subinterfaces:
IUT2004Analyzer
All Known Implementing Classes:
AbstractUT2004Server, UT2004Analyzer, UT2004Server

public interface IUT2004Server
extends IUnrealServer<IUT2004Bot>


Method Summary
 void connectNativeBot(String botName, String botType, int team)
          Connects a UT native bot to the current map.
 Collection<MapList> getAvailableMaps()
           
 cz.cuni.amis.utils.flag.Flag<Double> getGameSpeedFlag()
          The flag raises events even when the game speed was changed by another UTServer instance or directly in game.
 UT2004Map getMap()
          Get current map from the server
 String getMapName()
           
 List<Mutator> getMutators()
          Reeturns list of all mutators available on the server.
 cz.cuni.amis.utils.collections.ObservableCollection<? extends NativeUnrealBotAdapter> getNativeAgents()
          Returns list of all non pogamut players connected to the game server.
 cz.cuni.amis.utils.collections.ObservableCollection<Player> getPlayers()
          Returns list of all players connected to the game server.
 void setAddress(String host, int port)
          Sets the address of the server to different location - does not automatically reconnect, use IAgent.stop() and IAgent.start().
 Future<Boolean> setGameMap(String map)
          Method that initiates map-change.
 
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
 

Method Detail

setAddress

void setAddress(String host,
                int port)
Sets the address of the server to different location - does not automatically reconnect, use IAgent.stop() and IAgent.start().

Specified by:
setAddress in interface IUnrealServer<IUT2004Bot>
Parameters:
address -

getAvailableMaps

Collection<MapList> getAvailableMaps()
Specified by:
getAvailableMaps in interface IUnrealServer<IUT2004Bot>
Returns:
List of all maps available on the UT server

getGameSpeedFlag

cz.cuni.amis.utils.flag.Flag<Double> getGameSpeedFlag()
The flag raises events even when the game speed was changed by another UTServer instance or directly in game.

Specified by:
getGameSpeedFlag in interface IUnrealServer<IUT2004Bot>
Returns:
Speed of the game.

getMapName

String getMapName()
Specified by:
getMapName in interface IUnrealServer<IUT2004Bot>
Returns:
Name of the current map.

setGameMap

Future<Boolean> setGameMap(String map)
                           throws MapChangeException
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>
Parameters:
map -
Throws:
MapChangeException

getPlayers

cz.cuni.amis.utils.collections.ObservableCollection<Player> getPlayers()
Returns list of all players connected to the game server. The difference compared to the getAgents() method is that this method can return even the native bots, human players etc.

Custom-bots (created by Pogamut platform) can be recognized. They have non-null+non-empty Player.getJmx() field.

Specified by:
getPlayers in interface IUnrealServer<IUT2004Bot>
Returns:
List of all players on the server.

getNativeAgents

cz.cuni.amis.utils.collections.ObservableCollection<? extends NativeUnrealBotAdapter> getNativeAgents()
Returns list of all non pogamut players connected to the game server. Collection contains NativeBotAdapter classes, this means that you can deal with the players like with Pogamut agents.

Specified by:
getNativeAgents in interface IUnrealServer<IUT2004Bot>
Returns:
List of all players on the server.

getMutators

List<Mutator> getMutators()
Reeturns list of all mutators available on the server. Mutators can be used to modify the game (eg. disable weapons, change game speed).

Specified by:
getMutators in interface IUnrealServer<IUT2004Bot>
Returns:
List of all mutators available on the server.

connectNativeBot

void connectNativeBot(String botName,
                      String botType,
                      int team)
Connects a UT native bot to the current map.

Parameters:
botName -

getMap

UT2004Map getMap()
Get current map from the server

Specified by:
getMap in interface IUnrealServer<IUT2004Bot>
Returns:
Map of current level.


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