public class UT2004ServerModule<PARAMS extends UT2004AgentParameters> extends UT2004CommunicationModule<PARAMS>
UT2004CommunicationModule for the purpose of UT2004Server instantiation.
Introduces worldViewDependenciesProvider.
Newly binded classes:
| Mapped class | Target | Description | |
|---|---|---|---|
IWorldMessageTranslator | -> | ServerFSM | Protocol-validating translator of InfoMessages of GameBots2004. |
IWorldView | -> | IVisionWorldView | Binds world view as vision world view. |
IVisionWorldView | -> | ILockableVisionWorldView | Binds vision world view as lockable one. |
ILockableWorldView | -> | ILockableVisionWorldView | Binds lockable world view as vision world view. |
ILockableVisionWorldView | -> | UT2004LockableWorldView | Binds world view with concrete implementation. |
UT2004LockableWorldView dependencies |
-> | worldViewDependenciesProvider | |
IAgent | -> | IWorldServer | |
IWorldServer | -> | IUT2004Server | |
IUT2004Server | -> | UT2004Server | Binds concrete implementation of the agent. |
| Mapped class | Description |
|---|---|
| nothing |
... don't forget to call super.configureModules() in the subclasses ;-)
UT2004CommunicationModule,
GuiceRemoteAgentModule,
GuiceAgentModule| Modifier and Type | Field and Description |
|---|---|
protected AdaptableProvider<ComponentDependencies> |
worldViewDependenciesProvider
Dependency provider for the world view, so the world view know when to start.
|
connectionDependenciesProvider| Constructor and Description |
|---|
UT2004ServerModule() |
| 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> worldViewDependenciesProvider
public void prepareNewAgent(PARAMS agentParameters)
UT2004CommunicationModuleInjector.
Must be called before the new agent is instantiated with Injector.
prepareNewAgent in class UT2004CommunicationModule<PARAMS extends UT2004AgentParameters>protected void configureModules()
configureModules in class UT2004CommunicationModule<PARAMS extends UT2004AgentParameters>Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.