public interface TeamJoinListener
A listener to stay informed about agents joining the team. Furthermore, it is also possible to object that an agent joins the team. This may, for instance, be useful if the agent is known to be malicious.
The handler is not informed about the properties of the agents because agents should not be objected based on their properties (at least not here). Instead, this should be handled by the respective matcher. This matcher already checks the properties of the participants in the matching phase. If there was a match in that phase, the agent should usually be allowed to join the team (unless the team properties did change in the meanwhile).
ListenableTeamManagerDatabase
,
TeamLeaveListener
Modifier and Type | Method and Description |
---|---|
void |
handleTeamJoin(AgentIdentifier name)
Informs about agents that are about to join the team.
|
void |
handleTeamJoined(AgentIdentifier name)
Informs about agents that successfully joined the team.
|
void handleTeamJoin(AgentIdentifier name) throws JoiningNotPermittedException
Informs about agents that are about to join the team. If there are any objections, the listener can throw an exception in order to signalise that the agent may not join the team. In that case, the agent is not added to the team member database and informed about the failure.
There may be multiple listeners with possible objections. Therefore, it should not be assumed that an agent has actually joined the team even if one listener does not have any objections. In order to stay informed about agents successfully joining the team use the other method.
name
- the agent that is about to join the teamJoiningNotPermittedException
- if the agent is not allowed to join the teamvoid handleTeamJoined(AgentIdentifier name)
Informs about agents that successfully joined the team. These agents are already added to the team member database.
At this point, objections against joining the team are no longer possible. If there are potential objections, the other method should be used.
name
- the agent that joined the teamCopyright © Aimpulse Intelligent Systems GmbH
All rights reserved.