public class UT2004Analyzer extends UT2004Server implements IUT2004Analyzer
It creates and launches IUT2004AnalyzerObserver that is constructed according to the UT2004AnalyzerParameters.getObserverModule().
UT2004Server.MapChangeFuturechangingMap, changingMapAttempt, changingMapMutex, MAP_CHANGE_CONNECT_INTERVAL_MILLIS, mapChangeFuture, mapListListener, MAX_CHANGING_MAP_ATTEMPTS, playerJoinsListener, targetMapworldAddressevents, INTROSPECTION_ROOT_NAME, log, LOG_CATEGORY_NAME| Constructor and Description |
|---|
UT2004Analyzer(UT2004AnalyzerParameters params,
IAgentLogger agentLogger,
IComponentBus bus,
SocketConnection connection,
UT2004WorldView worldView,
IAct act) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(IAnalyzerObserverListener listener)
Hooks a listener that watches for creation/deletion of observers.
|
protected void |
cleanUp()
Called from
stopAgent() and killAgent() to clean up stuff (stops observers). |
Map<UnrealId,IUT2004AnalyzerObserver> |
getObservers()
Returns all observers currently owned by the analyzer.
|
UT2004AnalyzerParameters |
getParams()
Returns parameters that were passed into the agent during the construction.
|
boolean |
isListening(IAnalyzerObserverListener listener)
Tests a listener whether it watches for creation/deletion of observers.
|
protected void |
killAgent() |
static void |
main(String[] args) |
void |
removeListener(IAnalyzerObserverListener listener)
Removes a listener that watches for creation/deletion of observers.
|
protected void |
stopAgent() |
connectNativeBot, reset, setGameMap, startAgent, startPausedAgentconnectNativeBot, createPasswordReply, getAgents, getAvailableMaps, getGameInfo, getGameSpeedFlag, getMap, getMapName, getMutators, getNativeAgents, getPasswordReply, getPlayers, getWorldView, readyCommandRequested, resetAgent, setAddress, setPasswordgetWorldAddressgetActaddDependency, 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, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitconnectNativeBot, getAvailableMaps, getGameSpeedFlag, getMap, getMapName, getMutators, getNativeAgents, getPlayers, setAddress, setGameMapconnectNativeBotgetWorldAddressgetAgentsgetActgetWorldViewgetComponentId, getIntrospection, getLogger, getName, getState, kill, pause, resume, start, startPaused, stopgetEventBus@Inject public UT2004Analyzer(UT2004AnalyzerParameters params, IAgentLogger agentLogger, IComponentBus bus, SocketConnection connection, UT2004WorldView worldView, IAct act)
public UT2004AnalyzerParameters getParams()
UT2004Server
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.
getParams in class UT2004Serverpublic Map<UnrealId,IUT2004AnalyzerObserver> getObservers()
IUT2004Analyzer
The id can be obtained for instance from Player.getId() or Self.getId()
or new one can be obtained from String via UnrealId.get(String).
NOTE: returns unmodifiable map that is a copy of the inner map inside the analyzer.
getObservers in interface IUT2004Analyzerprotected void stopAgent()
stopAgent in class AbstractUT2004Server<UT2004WorldView,IAct>protected void killAgent()
killAgent in class AbstractUT2004Server<UT2004WorldView,IAct>protected void cleanUp()
stopAgent() and killAgent() to clean up stuff (stops observers).public static void main(String[] args)
public void addListener(IAnalyzerObserverListener listener)
IUT2004AnalyzerWeakReference is used to store the listener reference!)addListener in interface IUT2004Analyzerpublic boolean isListening(IAnalyzerObserverListener listener)
IUT2004AnalyzerisListening in interface IUT2004Analyzerpublic void removeListener(IAnalyzerObserverListener listener)
IUT2004AnalyzerremoveListener in interface IUT2004AnalyzerCopyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.