|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PARAMS
- MODULE
- public interface IAgentDescriptor<PARAMS extends IAgentParameters,MODULE extends GuiceAgentModule>
This interface describes everything that is needed to instantiate and start of the agent.
It describes three things:
getAgentModule()
)getCount()
)getAgentParameters()
)
Used by implementors of IMultipleAgentRunner
. It allows you to start different agents (of different classes)
at once.
Note that the getCount()
does not need to match the getAgentParameters()
.length.
There are three scenarios (according to the relation between those two numbers) and the number of agents the IMultipleAgentRunner
will instantiate:
getCount()
> getAgentParameters()
.length - in this case, the IMultipleAgentRunner
will instantiate specified number of agents with default parametersgetCount()
== getAgentParameters()
.length - in this case, the IMultipleAgentRunner
will instantiate the same number of agents as there are parametersgetCount()
< getAgentParameters()
.length - the IMultipleAgentRunner
will instantiate 'count' of agents and first 'number of parameters' will have custom params as specified, rest will have defaults
Method Summary | |
---|---|
MODULE |
getAgentModule()
Agent module that contains bindings for the classes, used by GuiceAgentFactory (or concretely by the Guice)
to instantiate the agent. |
PARAMS[] |
getAgentParameters()
Respective parameters of the agents. |
int |
getCount()
How many instances this object describes, i.e., how many agents should be instantiated using getAgentModule() . |
Method Detail |
---|
MODULE getAgentModule()
GuiceAgentFactory
(or concretely by the Guice)
to instantiate the agent.
int getCount()
getAgentModule()
.
PARAMS[] getAgentParameters()
getCount()
, i.e.,
there must be a separate parameter instance for every agent).
Note that some parameters may be null as IMultipleAgentRunner
implementation can provide
default parameters for agents (usually).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |