public class AgentScope extends Object implements IAgentScope
AgentScoped)
as singletons.
After instantiation of the agent, Pogamut calls clearScope() to release all references to instantiated objects that allows to reuse the injector again to get another instance of the agent.
We need this, because we're usually have one connection object that must be injected into two different classes thus must be treated "as a singleton for one instantiation of the agent". (This is not the only example...)
Every pogamut.base class is AgentScoped.
| Modifier and Type | Class and Description |
|---|---|
static class |
AgentScope.SingletonProvider<T> |
| Constructor and Description |
|---|
AgentScope() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearScope()
Release all
AgentScoped objects that the scope is holding. |
<T> com.google.inject.Provider |
scope(com.google.inject.Key<T> key,
com.google.inject.Provider<T> creator) |
public <T> com.google.inject.Provider scope(com.google.inject.Key<T> key,
com.google.inject.Provider<T> creator)
scope in interface com.google.inject.Scopepublic void clearScope()
IAgentScopeAgentScoped objects that the scope is holding.clearScope in interface IAgentScopeCopyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.