fr.dyade.aaa.agent
Class RoleMultiple
java.lang.Object
fr.dyade.aaa.agent.RoleMultiple
- Serializable
public class RoleMultiple
extends java.lang.Object
implements Serializable
This structure provides code for managing target agents registering
in a role. A notification may be sent to a role using the sendTo
function of the sending agent.
The class does not handle duplicates in the list.
void | addListener(AgentId target) - Adds an agent in the listeners list.
|
boolean | contains(AgentId id) - Tests if the specified agent id belongs to
role multiple.
|
Enumeration | getListeners() - Gets the listeners list as an
Enumeration of AgentId objects.
|
String | getName() - Returns the role name.
|
void | removeListener(AgentId target) - Removes an agent from the listeners list.
|
void | setName(String name) - Sets the role name.
|
String | toString() - Provides a string image for this object.
|
RoleMultiple
public RoleMultiple()
RoleMultiple
public RoleMultiple(String name)
Creates a new RoleMultiple with a specified name.
name
- the role name.
addListener
public void addListener(AgentId target)
Adds an agent in the listeners list.
contains
public boolean contains(AgentId id)
Tests if the specified agent id belongs to
role multiple.
id
- the specified agent id.
- true if the specified id belongs to the role;
false otherwise.
getListeners
public Enumeration getListeners()
Gets the listeners list as an Enumeration
of AgentId
objects.
There is no synchronization as we assume this object is manipulated
from the enclosing agent reaction.
getName
public String getName()
Returns the role name.
removeListener
public void removeListener(AgentId target)
Removes an agent from the listeners list.
setName
public void setName(String name)
Sets the role name.
name
- the role name.
toString
public String toString()
Provides a string image for this object.
Copyright B) 2004 Scalagent - All rights reserved