public class UT2004CommunicationModule<PARAMS extends UT2004AgentParameters> extends GuiceRemoteAgentModule<PARAMS>
RemoteGuiceAgentModule for the purpose of UT2004 communication specification.
Newly binded classes:
| Mapped class | Target | Description | |
|---|---|---|---|
IWorldConnection | -> | SocketConnection | Agent bus synchronizing starting/stopping/etc. events. |
SocketConnection dependencies |
-> | connectionDependenciesProvider | |
SocketConnection address | -> | UT2004BotModule#getAddressProvider() | |
| {@link IWorldMessageParser} | -> | {@link UT2004Parser} | Wrapper for the yylex parser of the messages coming from GameBots2004. |
| {@link IYylex} | -> | {@link IUT2004Yylex} | Specifying yylex further. |
| {@link IUT2004Yylex} | -> | {@link Yylex} | Specifying yylex further. |
| {@link IYylexObserver} | -> | {@link IYylexObserver.LogObserver} | Yylex observer reporting errors. |
| {@link IUT2004Yylex} | -> | {@link Yylex} | Concrete Yylex implementations that parses the messages coming from GameBots2004. |
| {@link ItemTranslator} | -> | {@link ItemTranslator} | Object handling translation of INV messages. |
| {@link UT2004AgentParameters} | -> | {@link UT2004CommunicationModule#getAgentParamsProvider()} | Agent parameters passed by the factory, contains additional runtime dependencies. |
| Mapped class | Description |
|---|---|
| {@link IWorldView} | Binds world view as vision world view. |
| {@link IWorldMessageTranslator} | Protocol-validating translator of {@link InfoMessage}s of GameBots2004. |
| {@link IAgent} |
... don't forget to call super.configureModules() in the subclasses ;-)
GuiceRemoteAgentModule,
GuiceAgentModule| Modifier and Type | Field and Description |
|---|---|
protected AdaptableProvider<ComponentDependencies> |
connectionDependenciesProvider |
| Constructor and Description |
|---|
UT2004CommunicationModule() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configureModules() |
void |
prepareNewAgent(PARAMS agentParameters)
Binds runtime dependencies to the module/
Injector. |
getAddressProvideraddModule, configure, createAgentScope, createAgentTeamScope, getAgentIdProvider, getAgentParamsProvider, getAgentScope, getAgentTeamScopeaddError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBindingprotected AdaptableProvider<ComponentDependencies> connectionDependenciesProvider
public void prepareNewAgent(PARAMS agentParameters)
Injector.
Must be called before the new agent is instantiated with Injector.
prepareNewAgent in class GuiceRemoteAgentModule<PARAMS extends UT2004AgentParameters>agentId - address - protected void configureModules()
configureModules in class GuiceRemoteAgentModule<PARAMS extends UT2004AgentParameters>Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.