public abstract class GuiceTeamRemoteAgentModule<PARAMS extends ITeamRemoteAgentParameters> extends GuiceRemoteAgentModule<PARAMS>
GuiceRemoteAgentModule
for the purpose of remote agents (those communicating with the world using
IWorldConnection
) that is using ISharedWorldView
to synchronize information within the agent's team.
See GuiceRemoteAgentModule
for more information.
This module introduces getSharedWorldViewProvider()
that is correctly filled during prepareNewAgent(ITeamRemoteAgentParameters)
and so it can be used during agent construction.
GuiceAgentModule
Constructor and Description |
---|
GuiceTeamRemoteAgentModule() |
Modifier and Type | Method and Description |
---|---|
AdaptableProvider<ISharedWorldView> |
getSharedWorldViewProvider() |
void |
prepareNewAgent(PARAMS agentParameters)
Must be called before another agent instance can be created.
|
configureModules, getAddressProvider
addModule, configure, createAgentScope, createAgentTeamScope, getAgentIdProvider, getAgentParamsProvider, getAgentScope, getAgentTeamScope
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
public AdaptableProvider<ISharedWorldView> getSharedWorldViewProvider()
public void prepareNewAgent(PARAMS agentParameters)
GuiceAgentModule
GuiceAgentModule.agentScope
and binds IAgentParameters.getAgentId()
to the GuiceAgentModule.agentIdProvider
.
Whenever you create your own IAgentParameters
you may need to override this method to utilize your new
run-time dependencies. In such case, always call super.prepareNewAgent(agentParameters) as a first command.
prepareNewAgent
in class GuiceRemoteAgentModule<PARAMS extends ITeamRemoteAgentParameters>
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.