cz.cuni.amis.pogamut.udk.server
Interface IUDKServer

Package class diagram package IUDKServer
All Superinterfaces:
IAgent, IComponent, IComponentAware, IControllable, IGhostAgent, IObservingAgent, cz.cuni.amis.pogamut.unreal.server.IUnrealServer<IUDKBot>, IWorldAgentsObserver<IUDKBot>, IWorldServer<IUDKBot>
All Known Implementing Classes:
AbstractUDKServer, UDKServer

public interface IUDKServer
extends cz.cuni.amis.pogamut.unreal.server.IUnrealServer<IUDKBot>


Method Summary
 void connectNativeBot(String botName, String botType)
          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.
 UDKMap 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 NativeUDKBotAdapter> 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.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 cz.cuni.amis.pogamut.unreal.server.IUnrealServer<IUDKBot>
Parameters:
address -

getAvailableMaps

Collection<MapList> getAvailableMaps()
Specified by:
getAvailableMaps in interface cz.cuni.amis.pogamut.unreal.server.IUnrealServer<IUDKBot>
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 cz.cuni.amis.pogamut.unreal.server.IUnrealServer<IUDKBot>
Returns:
Speed of the game.

getMapName

String getMapName()
Specified by:
getMapName in interface cz.cuni.amis.pogamut.unreal.server.IUnrealServer<IUDKBot>
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 cz.cuni.amis.pogamut.unreal.server.IUnrealServer<IUDKBot>
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.

Specified by:
getPlayers in interface cz.cuni.amis.pogamut.unreal.server.IUnrealServer<IUDKBot>
Returns:
List of all players on the server.

getNativeAgents

cz.cuni.amis.utils.collections.ObservableCollection<? extends NativeUDKBotAdapter> 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 cz.cuni.amis.pogamut.unreal.server.IUnrealServer<IUDKBot>
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 cz.cuni.amis.pogamut.unreal.server.IUnrealServer<IUDKBot>
Returns:
List of all mutators available on the server.

connectNativeBot

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

Specified by:
connectNativeBot in interface cz.cuni.amis.pogamut.unreal.server.IUnrealServer<IUDKBot>
Parameters:
botName -

getMap

UDKMap getMap()
Get current map from the server

Specified by:
getMap in interface cz.cuni.amis.pogamut.unreal.server.IUnrealServer<IUDKBot>
Returns:
Map of current level.


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