public interface LifecycleServiceListener extends EventListener
Modifier and Type | Interface and Description |
---|---|
static class |
LifecycleServiceListener.LifecycleServiceAdapter
Event adapter on events related to the life-cycle of an agent.
|
Modifier and Type | Method and Description |
---|---|
void |
agentDestroyed(agent : Agent,
outerContexts : ConcurrentCollection<ContextReference>,
terminationCause : Object)
Invoked when the agent is destroyed.
|
void |
agentKillFailure(killingAgent : UUID,
innerContext : ContextReference,
cause : Object)
Invoked when the agent killing has failed.
|
void |
agentSpawned(spawningAgent : UUID,
parent : Context,
agentType : Class<? extends Agent>,
spawnedAgent : Agent,
initializationParameters : Object[])
Invoked when the agent is spawned.
|
void |
agentSpawnFailure(spawningAgent : UUID,
parent : Context,
agentType : Class<? extends Agent>,
cause : Object)
Invoked when the agent spawning has failed.
|
def
agentSpawned(spawningAgent : UUID,
parent : Context,
agentType : Class<? extends Agent>,
spawnedAgent : Agent,
initializationParameters : Object[]) : void
LifecycleServiceListener
spawningAgent
- the identifier of the agent which spawns the given agent, if null
, the root agent (Janus kernel) is assumed.parent
- the context in which the agent was created.agentType
- the type of the spawned agents.spawnedAgent
- the spawned agent.initializationParameters
- list of parameters that were passed to the agent.def
agentDestroyed(agent : Agent,
outerContexts : ConcurrentCollection<ContextReference>,
terminationCause : Object) : void
LifecycleServiceListener
agent
- the destroyed agent.outerContexts
- the contexts from which the given agent were removed after its destruction.terminationCause
- the cause of the termination of the agent.
If it is null
, the agent was destroyed without providing a reason.def
agentSpawnFailure(spawningAgent : UUID,
parent : Context,
agentType : Class<? extends Agent>,
cause : Object) : void
LifecycleServiceListener
spawningAgent
- the identifier of the agent which spawns the given agent.parent
- the context in which the agent was created.agentType
- the type of the spawned agents.cause
- the cause of the failure.def
agentKillFailure(killingAgent : UUID,
innerContext : ContextReference,
cause : Object) : void
LifecycleServiceListener
killingAgent
- the identifier of the agent tried to be killed.innerContext
- the inner context of the agent.cause
- the cause of the failureCopyright © 2021 the original authors or authors.