zeus.agents
Class BasicAgent

java.lang.Object
  extended byzeus.agents.BasicAgent
Direct Known Subclasses:
ACCAgent, ANServer, DbProxy, Facilitator, Visualiser, ZeusAgent

public class BasicAgent
extends java.lang.Object

This class implements the shared agent functionality common to every agent created with the Zeus toolkit.


Field Summary
protected  AgentContext context
           
static int CREATE
           
static int DEATH
           
private  HSet[] eventMonitor
           
static int RESUME
           
static int SUSPEND
           
 
Constructor Summary
BasicAgent()
           
BasicAgent(java.lang.String type, java.lang.String name, java.util.Vector nameservers)
           
BasicAgent(java.lang.String type, java.lang.String name, java.util.Vector nameservers, Clock clock)
           
 
Method Summary
 void addAgentMonitor(AgentMonitor monitor, long event_type)
          Add an AgentMonitor if your code needs to react to Agent-level changes in state
 void addMessageMonitor(MessageMonitor monitor, long event_type)
          Shortcut to add a MessageMonitor, used if your code needs to react to changes in the state of the mailbox
 AgentContext getAgentContext()
           
 void notifyMonitors(int type)
           
 void removeAgentMonitor(AgentMonitor monitor, long event_type)
           
 void removeMessageMonitor(MessageMonitor monitor, long event_type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eventMonitor

private HSet[] eventMonitor

CREATE

public static final int CREATE
See Also:
Constant Field Values

DEATH

public static final int DEATH
See Also:
Constant Field Values

SUSPEND

public static final int SUSPEND
See Also:
Constant Field Values

RESUME

public static final int RESUME
See Also:
Constant Field Values

context

protected AgentContext context
Constructor Detail

BasicAgent

public BasicAgent()

BasicAgent

public BasicAgent(java.lang.String type,
                  java.lang.String name,
                  java.util.Vector nameservers)

BasicAgent

public BasicAgent(java.lang.String type,
                  java.lang.String name,
                  java.util.Vector nameservers,
                  Clock clock)
Method Detail

getAgentContext

public AgentContext getAgentContext()

addMessageMonitor

public void addMessageMonitor(MessageMonitor monitor,
                              long event_type)
Shortcut to add a MessageMonitor, used if your code needs to react to changes in the state of the mailbox


removeMessageMonitor

public void removeMessageMonitor(MessageMonitor monitor,
                                 long event_type)

addAgentMonitor

public void addAgentMonitor(AgentMonitor monitor,
                            long event_type)
Add an AgentMonitor if your code needs to react to Agent-level changes in state


removeAgentMonitor

public void removeAgentMonitor(AgentMonitor monitor,
                               long event_type)

notifyMonitors

public void notifyMonitors(int type)


Copyright © 2000-2003 BT Exact Technologies. All Rights Reserved.