public class ListenableTeamManagerDatabase extends Object implements TeamDatabase
Constructor and Description |
---|
ListenableTeamManagerDatabase(TeamDatabase database)
Instantiates this decorator that extends a team manager database with
listening functionality.
|
Modifier and Type | Method and Description |
---|---|
void |
addTeamJoinListener(TeamJoinListener listener)
Adds a team-join listener.
|
void |
addTeamLeaveListener(TeamLeaveListener listener)
Adds a team-leave listener.
|
void |
handleJoin(TeamDescription participant)
Handles a participant that is about to join the team.
|
void |
handleLeave(TeamDescription participant)
Handles a participant that is about to leave the team.
|
public ListenableTeamManagerDatabase(TeamDatabase database)
database
- the team manager database to be decoratedNullPointerException
- if the database is null
public void addTeamJoinListener(TeamJoinListener listener)
listener
- the listener to be addedNullPointerException
- if the listener is null
public void addTeamLeaveListener(TeamLeaveListener listener)
listener
- the listener to be addedNullPointerException
- if the listener is null
public void handleJoin(TeamDescription participant) throws FailureException
TeamDatabase
handleJoin
in interface TeamDatabase
participant
- the participant to join the teamFailureException
- if the participant is already member of this teampublic void handleLeave(TeamDescription participant) throws FailureException
TeamDatabase
handleLeave
in interface TeamDatabase
participant
- the participant to leave the teamFailureException
- if the agent is not a member of this teamCopyright © Aimpulse Intelligent Systems GmbH
All rights reserved.