Package pygar.communication
Class MessageAgent
java.lang.Object
pygar.communication.MessageAgent
- All Implemented Interfaces:
java.lang.Runnable
- Direct Known Subclasses:
BAN
,TeamMember
public class MessageAgent
extends java.lang.Object
implements java.lang.Runnable
The MessageAgent class is the super class for all the active participants in the system: BAN and TeamMember. The participants
inherit from this class an ability to run on a thread and watch for new messages delivered by the
message system. The subclasses override this classes run method with a procedure that does something useful
with the messages.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description MessageAgent(Profile p, java.lang.String me)
-
Method Summary
Modifier and Type Method Description void
run()
The default version of the run procedure will exit when all the queues are empty.
-
Field Details
-
Constructor Details
-
MessageAgent
public MessageAgent(Profile p, java.lang.String me) throws MessageSystemException, ConfigurationError
-
-
Method Details
-
run
public void run()The default version of the run procedure will exit when all the queues are empty. This version is useful for testing only. When messages arrive from the outside world, the queues may fill up again at any time.- Specified by:
run
in interfacejava.lang.Runnable
-