fr.dyade.aaa.agent
Class RoleMultiple

java.lang.Object
  extended byfr.dyade.aaa.agent.RoleMultiple
All Implemented Interfaces:
java.io.Serializable

public class RoleMultiple
extends java.lang.Object
implements java.io.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.

See Also:
Serialized Form

Constructor Summary
RoleMultiple()
           
RoleMultiple(java.lang.String name)
          Creates a new RoleMultiple with a specified name.
 
Method Summary
 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.
 java.util.Enumeration getListeners()
          Gets the listeners list as an Enumeration of AgentId objects.
 java.lang.String getName()
          Returns the role name.
 void removeListener(AgentId target)
          Removes an agent from the listeners list.
 void setName(java.lang.String name)
          Sets the role name.
 java.lang.String toString()
          Provides a string image for this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RoleMultiple

public RoleMultiple()

RoleMultiple

public RoleMultiple(java.lang.String name)
Creates a new RoleMultiple with a specified name.

Parameters:
name - the role name.
Method Detail

addListener

public void addListener(AgentId target)
Adds an agent in the listeners list.


removeListener

public void removeListener(AgentId target)
Removes an agent from the listeners list.


getListeners

public java.util.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 java.lang.String getName()
Returns the role name.


setName

public void setName(java.lang.String name)
Sets the role name.

Parameters:
name - the role name.

contains

public boolean contains(AgentId id)
Tests if the specified agent id belongs to role multiple.

Parameters:
id - the specified agent id.
Returns:
true if the specified id belongs to the role; false otherwise.

toString

public java.lang.String toString()
Provides a string image for this object.



Copyright ? 2004 Scalagent - All rights reserved