Capacity.ContextAwareCapacityWrapper<C extends Capacity>| Modifier and Type | Method and Description |
|---|---|
void |
killMe([terminationCause : Object])
Kills this agent.
|
void |
spawn(agentType : Class<? extends Agent>,
params : Object*)
Spawns a new Agent inside the default context of this agent.
|
void |
spawn(nbAgents : int,
agentType : Class<? extends Agent>,
params : Object*)
Spawns a group of agents inside the default context of this agent.
|
void |
spawnInContext(agentClass : Class<? extends Agent>,
context : AgentContext,
params : Object*)
Spawns a new member agent in the parent's context (parentID).
|
void |
spawnInContext(nbAgents : int,
agentClass : Class<? extends Agent>,
context : AgentContext,
params : Object*)
Spawns a group of agents in the parent's context (parentID).
|
void |
spawnInContextWithID(agentClass : Class<? extends Agent>,
agentID : UUID,
context : AgentContext,
params : Object*)
Spawns a new member agent in the given context.
|
void |
spawnWithID(agentClass : Class<? extends Agent>,
agentID : UUID,
params : Object*)
Spawns a new member agent in the parent's context (parentID).
|
def spawn(agentType : Class<? extends Agent>,
params : Object*) : void
LifecycleCaution: when this function returns, there is no warranty that the spawned agent is initialized at the time of the return. Indeed, agent spawning is done in parallel to the calling thread. This parallel task for spawning is not considered as an agent task, i.e. it cannot be stopped or cancelled by the spawning agent, or if this agent is killed.
This function does nothing if one of the following conditions evaluates to true:
agentType - the type of the agent to spawn.params - the arguments to pass in the initialization event to the spawned agent.def spawn(nbAgents : int,
agentType : Class<? extends Agent>,
params : Object*) : void
LifecycleCaution: when this function returns, there is no warranty that the spawned agents are initialized at the time of the return. Indeed, agent spawning is done in parallel to the calling thread. This parallel task for spawning is not considered as an agent task, i.e. it cannot be stopped or cancelled by the spawning agent, or if this agent is killed.
This function does nothing if one of the following conditions evaluates to true:
nbAgents - the number of agents to spawn.agentType - the type of the agents to spawn.params - the arguments to pass in the initialization event to the spawned agents. All the agents
will receive the same initialization parameters.def spawnInContext(agentClass : Class<? extends Agent>,
context : AgentContext,
params : Object*) : void
LifecycleCaution: when this function returns, there is no warranty that the spawned agent is initialized at the time of the return. Indeed, agent spawning is done in parallel to the calling thread. This parallel task for spawning is not considered as an agent task, i.e. it cannot be stopped or cancelled by the spawning agent, or if this agent is killed.
This function does nothing if one of the following conditions evaluates to true:
agentClass - the type of the agent to spawn.context - the context in which the agent must be spawned.params - the arguments to pass to the initialization event that will be sent to the spawned agent.def spawnInContext(nbAgents : int,
agentClass : Class<? extends Agent>,
context : AgentContext,
params : Object*) : void
LifecycleCaution: when this function returns, there is no warranty that the spawned agents are initialized at the time of the return. Indeed, agent spawning is done in parallel to the calling thread. This parallel task for spawning is not considered as an agent task, i.e. it cannot be stopped or cancelled by the spawning agent, or if this agent is killed.
This function does nothing if one of the following conditions evaluates to true:
nbAgents - the number of agents to spawn.agentClass - the type of the agents to spawn.context - the context in which the agents must be spawned.params - the arguments to pass to the initialization event that will be sent to the spawned agents. All the agents
will receive the same initialization parameters.def spawnInContextWithID(agentClass : Class<? extends Agent>,
agentID : UUID,
context : AgentContext,
params : Object*) : void
LifecycleCaution: when this function returns, there is no warranty that the spawned agent is initialized at the time of the return. Indeed, agent spawning is done in parallel to the calling thread. This parallel task for spawning is not considered as an agent task, i.e. it cannot be stopped or cancelled by the spawning agent, or if this agent is killed.
This function does nothing if one of the following conditions evaluates to true:
agentClass - the type of the agent to spawn.agentID - the identifier of the spawned agent.context - the context in which the agent must be spawned.params - the arguments to pass to the initialization event that will be sent to the spawned agent.def spawnWithID(agentClass : Class<? extends Agent>,
agentID : UUID,
params : Object*) : void
LifecycleCaution: when this function returns, there is no warranty that the spawned agent is initialized at the time of the return. Indeed, agent spawning is done in parallel to the calling thread. This parallel task for spawning is not considered as an agent task, i.e. it cannot be stopped or cancelled by the spawning agent, or if this agent is killed.
This function does nothing if one of the following conditions evaluates to true:
agentClass - the type of the agent to spawn.agentID - the identifier of the spawned agent.params - the arguments to pass to the initialization event that will be sent to the spawned agent.def killMe([terminationCause : Object]) : void
LifecycleThis action must automatically unregister this agent from the default context and therefore all its spaces including the DefaultSpace. If this is a composable agent, it must not have any members before calling this action. Otherwise a RuntimeException will be thrown.
This function does nothing if one of the following conditions evaluates to true:
terminationCause - indicates the cause of the termination of the agent.
If this argument is null, the agent terminates without specific cause.Copyright © 2021 the original authors or authors.