cz.cuni.amis.pogamut.unreal.server
Interface IUnrealServer<BOT extends IUnrealBot>

All Superinterfaces:
IAgent, IComponent, IComponentAware, IControllable, IGhostAgent, IObservingAgent, IWorldAgentsObserver<BOT>, IWorldServer<BOT>
All Known Subinterfaces:
IUT2004Analyzer, IUT2004Server
All Known Implementing Classes:
AbstractUT2004Server, UT2004Analyzer, UT2004Server

public interface IUnrealServer<BOT extends IUnrealBot>
extends IWorldServer<BOT>, IGhostAgent


Method Summary
 void connectNativeBot(java.lang.String botName, java.lang.String botType)
          Connects a UT native bot to the current map.
 java.util.Collection<? extends IMapList> getAvailableMaps()
           
 Flag<java.lang.Double> getGameSpeedFlag()
          The flag raises events even when the game speed was changed by another UTServer instance or directly in game.
 IUnrealMap getMap()
          Get current map from the server
 java.lang.String getMapName()
           
 java.util.List<? extends IMutator> getMutators()
          Reeturns list of all mutators available on the server.
 ObservableCollection<? extends IUnrealBot> getNativeAgents()
          Returns list of all non pogamut players connected to the game server.
 ObservableCollection<? extends IPlayer> getPlayers()
          Returns list of all players connected to the game server.
 void setAddress(java.lang.String host, int port)
          Sets the address of the server to different location - does not automatically reconnect, use IUT2004Server#stop() and IUT2004Server#start().
 java.util.concurrent.Future<java.lang.Boolean> setGameMap(java.lang.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(java.lang.String host,
                int port)
Sets the address of the server to different location - does not automatically reconnect, use IUT2004Server#stop() and IUT2004Server#start().

Parameters:
address -

getAvailableMaps

java.util.Collection<? extends IMapList> getAvailableMaps()
Returns:
List of all maps available on the UT server

getGameSpeedFlag

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

Returns:
Speed of the game.

getMapName

java.lang.String getMapName()
Returns:
Name of the current map.

setGameMap

java.util.concurrent.Future<java.lang.Boolean> setGameMap(java.lang.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.

Parameters:
map -
Throws:
MapChangeException

getPlayers

ObservableCollection<? extends IPlayer> 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.

Returns:
List of all players on the server.

getNativeAgents

ObservableCollection<? extends IUnrealBot> 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.

Returns:
List of all players on the server.

getMutators

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

Returns:
List of all mutators available on the server.

connectNativeBot

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

Parameters:
botName -

getMap

IUnrealMap getMap()
Get current map from the server

Returns:
Map of current level.