|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.inject.AbstractModule cz.cuni.amis.pogamut.base.factory.guice.GuiceAgentModule<PARAMS> cz.cuni.amis.pogamut.base.factory.guice.GuiceCommunicationModule<PARAMS> cz.cuni.amis.pogamut.base.factory.guice.GuiceRemoteAgentModule<PARAMS> cz.cuni.amis.pogamut.ut2004.factory.guice.remoteagent.UT2004CommunicationModule<PARAMS> cz.cuni.amis.pogamut.ut2004.factory.guice.remoteagent.UT2004ServerModule<PARAMS>
public class UT2004ServerModule<PARAMS extends UT2004AgentParameters>
Module extending UT2004CommunicationModule
for the purpose of UT2004Server
instantiation.
Introduces worldViewDependenciesProvider
.
Newly binded classes:
Mapped class | Target | Description | |
---|---|---|---|
IWorldMessageTranslator | -> | ServerFSM | Protocol-validating translator of InfoMessage s 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
Field Summary | |
---|---|
protected AdaptableProvider<ComponentDependencies> |
worldViewDependenciesProvider
Dependency provider for the world view, so the world view know when to start. |
Fields inherited from class cz.cuni.amis.pogamut.ut2004.factory.guice.remoteagent.UT2004CommunicationModule |
---|
connectionDependenciesProvider |
Constructor Summary | |
---|---|
UT2004ServerModule()
|
Method Summary | |
---|---|
protected void |
configureModules()
Override to create new module with your own bindings adding it into GuiceAgentModule.modules using GuiceCommunicationModule#addModule(Module) . |
void |
prepareNewAgent(PARAMS agentParameters)
Binds runtime dependencies to the module/ Injector . |
Methods inherited from class cz.cuni.amis.pogamut.base.factory.guice.GuiceRemoteAgentModule |
---|
getAddressProvider |
Methods inherited from class cz.cuni.amis.pogamut.base.factory.guice.GuiceAgentModule |
---|
addModule, configure, createAgentScope, getAgentIdProvider, getAgentParamsProvider, getAgentScope |
Methods inherited from class com.google.inject.AbstractModule |
---|
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected AdaptableProvider<ComponentDependencies> worldViewDependenciesProvider
Constructor Detail |
---|
public UT2004ServerModule()
Method Detail |
---|
public void prepareNewAgent(PARAMS agentParameters)
UT2004CommunicationModule
Injector
.
Must be called before the new agent is instantiated with Injector
.
prepareNewAgent
in class UT2004CommunicationModule<PARAMS extends UT2004AgentParameters>
protected void configureModules()
GuiceCommunicationModule
GuiceAgentModule.modules
using GuiceCommunicationModule#addModule(Module)
.
See GuiceCommunicationModule.configureModules()
source code for the example (utilizes anonymous class, instantiating AbstractModule
).
configureModules
in class UT2004CommunicationModule<PARAMS extends UT2004AgentParameters>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |