cz.cuni.amis.pogamut.ut2004.server
Interface 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(java.lang.String botName, java.lang.String botType)
          Connects a UT native bot to the current map.
 java.util.Collection<MapList> 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.
 UT2004Map getMap()
          Get current map from the server
 java.lang.String getMapName()
           
 java.util.List<Mutator> getMutators()
          Reeturns list of all mutators available on the server.
 ObservableCollection<? extends NativeUnrealBotAdapter> getNativeAgents()
          Returns list of all non pogamut players connected to the game server.
 ObservableCollection<Player> 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 IAgent.stop() and IAgent.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 IAgent.stop() and IAgent.start().

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

getAvailableMaps

java.util.Collection<MapList> getAvailableMaps()
Specified by:
getAvailableMaps in interface IUnrealServer<IUT2004Bot>
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.

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

getMapName

java.lang.String getMapName()
Specified by:
getMapName in interface IUnrealServer<IUT2004Bot>
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.

Specified by:
setGameMap in interface IUnrealServer<IUT2004Bot>
Parameters:
map -
Throws:
MapChangeException

getPlayers

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

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

java.util.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(java.lang.String botName,
                      java.lang.String botType)
Connects a UT native bot to the current map.

Specified by:
connectNativeBot in interface IUnrealServer<IUT2004Bot>
Parameters:
botName -

getMap

UT2004Map getMap()
Get current map from the server

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