cz.cuni.amis.pogamut.multi.factory.guice
Class GuiceTeamRemoteAgentModule<PARAMS extends ITeamRemoteAgentParameters>

Package class diagram package GuiceTeamRemoteAgentModule
java.lang.Object
  extended by com.google.inject.AbstractModule
      extended by cz.cuni.amis.pogamut.base.factory.guice.GuiceAgentModule<PARAMS>
          extended by cz.cuni.amis.pogamut.base.factory.guice.GuiceCommunicationModule<PARAMS>
              extended by cz.cuni.amis.pogamut.base.factory.guice.GuiceRemoteAgentModule<PARAMS>
                  extended by cz.cuni.amis.pogamut.multi.factory.guice.GuiceTeamRemoteAgentModule<PARAMS>
All Implemented Interfaces:
com.google.inject.Module

public abstract class GuiceTeamRemoteAgentModule<PARAMS extends ITeamRemoteAgentParameters>
extends GuiceRemoteAgentModule<PARAMS>

Module extending 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.

Author:
Jimmy
See Also:
GuiceAgentModule

Constructor Summary
GuiceTeamRemoteAgentModule()
           
 
Method Summary
 AdaptableProvider<ISharedWorldView> getSharedWorldViewProvider()
           
 void prepareNewAgent(PARAMS agentParameters)
          Must be called before another agent instance can be created.
 
Methods inherited from class cz.cuni.amis.pogamut.base.factory.guice.GuiceRemoteAgentModule
configureModules, getAddressProvider
 
Methods inherited from class cz.cuni.amis.pogamut.base.factory.guice.GuiceAgentModule
addModule, configure, createAgentScope, createAgentTeamScope, getAgentIdProvider, getAgentParamsProvider, getAgentScope, getAgentTeamScope
 
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
 

Constructor Detail

GuiceTeamRemoteAgentModule

public GuiceTeamRemoteAgentModule()
Method Detail

getSharedWorldViewProvider

public AdaptableProvider<ISharedWorldView> getSharedWorldViewProvider()

prepareNewAgent

public void prepareNewAgent(PARAMS agentParameters)
Description copied from class: GuiceAgentModule
Must be called before another agent instance can be created. It clears the 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.

Overrides:
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.