cz.cuni.amis.pogamut.ut2004.analyzer
Class UT2004Analyzer
java.lang.Object
cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent
cz.cuni.amis.pogamut.base.agent.impl.AbstractObservingAgent<WORLD_VIEW>
cz.cuni.amis.pogamut.base.agent.impl.AbstractGhostAgent<WORLD_VIEW,ACT>
cz.cuni.amis.pogamut.base.server.AbstractWorldServer<WORLD_VIEW,ACT,IUT2004Bot>
cz.cuni.amis.pogamut.ut2004.server.impl.AbstractUT2004Server<UT2004WorldView,IAct>
cz.cuni.amis.pogamut.ut2004.server.impl.UT2004Server
cz.cuni.amis.pogamut.ut2004.analyzer.UT2004Analyzer
- All Implemented Interfaces:
- IAgent, IGhostAgent, IObservingAgent, IComponent, IComponentAware, IControllable, IWorldAgentsObserver<IUT2004Bot>, IWorldServer<IUT2004Bot>, IUnrealServer<IUT2004Bot>, IUT2004Analyzer, IUT2004Server
public class UT2004Analyzer
- extends UT2004Server
- implements IUT2004Analyzer
UT2004Analyzer can be used to automatically observe all bots/players in the game sniff their messages.
It creates and launches IUT2004AnalyzerObserver
that is constructed according to the UT2004AnalyzerParameters.getObserverModule()
.
- Author:
- Jimmy
Methods inherited from class cz.cuni.amis.pogamut.ut2004.server.impl.AbstractUT2004Server |
connectNativeBot, createPasswordReply, getAgents, getAvailableMaps, getGameInfo, getGameSpeedFlag, getMap, getMapName, getMutators, getNativeAgents, getPasswordReply, getPlayers, getWorldView, readyCommandRequested, resetAgent, setAddress, setPassword |
Methods inherited from class cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent |
addDependency, 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, toString |
Methods inherited from interface cz.cuni.amis.pogamut.base.agent.IAgent |
getComponentId, getIntrospection, getLogger, getName, getState, kill, pause, resume, start, startPaused, stop |
UT2004Analyzer
@Inject
public UT2004Analyzer(UT2004AnalyzerParameters params,
IAgentLogger agentLogger,
IComponentBus bus,
SocketConnection connection,
UT2004WorldView worldView,
IAct act)
getParams
public UT2004AnalyzerParameters getParams()
- Description copied from class:
UT2004Server
- Returns parameters that were passed into the agent during the construction.
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.
- Overrides:
getParams
in class UT2004Server
- Returns:
- parameters
getObservers
public Map<UnrealId,IUT2004AnalyzerObserver> getObservers()
- Description copied from interface:
IUT2004Analyzer
- Returns all observers currently owned by the analyzer.
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.
- Specified by:
getObservers
in interface IUT2004Analyzer
- Returns:
startAgent
protected void startAgent()
- Overrides:
startAgent
in class UT2004Server
startPausedAgent
protected void startPausedAgent()
- Overrides:
startPausedAgent
in class UT2004Server
stopAgent
protected void stopAgent()
- Overrides:
stopAgent
in class AbstractUT2004Server<UT2004WorldView,IAct>
killAgent
protected void killAgent()
- Overrides:
killAgent
in class AbstractUT2004Server<UT2004WorldView,IAct>
init
protected void init()
- Description copied from class:
UT2004Server
- Hook for users (descendants of this class) to fill-in initialization code, any listeners hooked here should be removed inside
UT2004Server.reset()
.
- Overrides:
init
in class UT2004Server
cleanUp
protected void cleanUp()
- Called from
stopAgent()
and killAgent()
to clean up stuff (stops observers).
addListener
public void addListener(IAnalyzerObserverListener listener)
- Description copied from interface:
IUT2004Analyzer
- Hooks a listener that watches for creation/deletion of observers. (
WeakReference
is used to store the listener reference!)
- Specified by:
addListener
in interface IUT2004Analyzer
isListening
public boolean isListening(IAnalyzerObserverListener listener)
- Description copied from interface:
IUT2004Analyzer
- Tests a listener whether it watches for creation/deletion of observers.
- Specified by:
isListening
in interface IUT2004Analyzer
- Returns:
removeListener
public void removeListener(IAnalyzerObserverListener listener)
- Description copied from interface:
IUT2004Analyzer
- Removes a listener that watches for creation/deletion of observers.
- Specified by:
removeListener
in interface IUT2004Analyzer
main
public static void main(String[] args)
Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.