agentland.gui
Class GuiManagerDaemonAgent

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--metaglue.AgentAgent
                          |
                          +--agentland.gui.GuiManagerDaemonAgent
All Implemented Interfaces:
Agent, GuiManagerDaemon, MetagluePrimitives, Remote, Serializable, Spy

public class GuiManagerDaemonAgent
extends AgentAgent
implements GuiManagerDaemon

The job of this agent is to make sure that there is a GuiManager running on every machine where metaglue for this society is running

See Also:
AgentAgent, GuiManagerDaemon, Serialized Form

Inner classes inherited from class metaglue.AgentAgent
AgentAgent.Attribute
 
Field Summary
protected  Hashtable guiManagerAgents
           
protected  Hashtable guiManagers
          key = machine name; value = agent id of a gui manager on that machine
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Constructor Summary
GuiManagerDaemonAgent()
           
 
Method Summary
protected  void ensureGuiManager(AgentID aid)
          Make sure that there is a gui manager on the machine where the agent with the given agent id lives.
protected  void ensureGuiManager(String machine)
          Make sure that there exists a gui manager on the machine
protected  GuiManager getGuiManager(AgentID aid)
           
protected  void registerGuiManager(AgentID gmid)
           
 int showGui(GuiMaker maker)
          Attempts to show the gui at all available computers
protected  void startupCheck()
           
 void tell(Secret s)
          This is called if the Agent is to receive a particular secret.
 
Methods inherited from class metaglue.AgentAgent
addMonitor, alive, defrost, defrostAll, defrostBoolean, defrostInt, defrostString, fixAttribute, fixAttribute, freeze, freeze, freeze, freezeAll, freezeVar, getAgentID, getAttribute, getCatalog, getCatalogID, getDesignation, getFrozenVariables, getLogLevel, getMetaglueAgent, getMetaglueAgentID, getOccupation, getProperties, getSociety, log, log, log, lookupClass, obtainMetaglueAgent, obtainMetaglueAgent, obtainMetaglueAgentByName, reliesOn, reliesOn, reliesOn, reliesOnSynch, removeFrozen, replaceExceptionHandler, setFreezeName, setLogLevel, setLogName, shutdown, startAgent, startAgentOn, startAgentOn, startup, status, tiedTo, tiedTo, tiedTo, tiedTo, tieToDesignation, whereAreYou
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface metaglue.Agent
addMonitor, alive, getAgentID, getMetaglueAgentID, shutdown, startup, whereAreYou
 

Field Detail

guiManagers

protected Hashtable guiManagers
key = machine name; value = agent id of a gui manager on that machine

guiManagerAgents

protected Hashtable guiManagerAgents
Constructor Detail

GuiManagerDaemonAgent

public GuiManagerDaemonAgent()
                      throws RemoteException
Method Detail

tell

public void tell(Secret s)
          throws RemoteException
Description copied from interface: Spy
This is called if the Agent is to receive a particular secret.
Specified by:
tell in interface Spy
Following copied from interface: agentland.util.Spy
Parameters:
secret - a Secret value
Throws:
RemoteException - if an error occurs

showGui

public int showGui(GuiMaker maker)
            throws RemoteException
Attempts to show the gui at all available computers
Specified by:
showGui in interface GuiManagerDaemon
Returns:
The number of different gui managers the gui was sent to

getGuiManager

protected GuiManager getGuiManager(AgentID aid)
                            throws RemoteException

startupCheck

protected void startupCheck()
                     throws RemoteException

ensureGuiManager

protected void ensureGuiManager(AgentID aid)
                         throws RemoteException
Make sure that there is a gui manager on the machine where the agent with the given agent id lives.

ensureGuiManager

protected void ensureGuiManager(String machine)
                         throws RemoteException
Make sure that there exists a gui manager on the machine

registerGuiManager

protected void registerGuiManager(AgentID gmid)
                           throws RemoteException