agentland.resource.connect
Interface ConnectionMonitor

All Superinterfaces:
Agent, Good, Managed, Remote, Spy
All Known Implementing Classes:
ConnectionMonitorAgent

public interface ConnectionMonitor
extends Managed

Watch all connections and keep a list of what is currently connected to what. Currently it just uses ConnectionMaker's tracking stuff. Eventually it should be smarter. It also can save the current worldview, and then load it up later on.


Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Method Summary
 Vector getConnections()
          Return list of all current connections.
 boolean isConnected(String from, String to)
          Is the given agent from connected to the agent to at this time.
 void loadState(String name)
          Load the state of the word as listed under name.
 void saveState(String name)
          Save the state of the world under the passed name.
 
Methods inherited from interface agentland.resource.Managed
getNeed, replace, replace, resources, yank, yank
 
Methods inherited from interface agentland.util.Good
getHistory, getHistoryElement, resetHistory
 
Methods inherited from interface metaglue.Agent
addMonitor, alive, getAgentID, getMetaglueAgentID, getOldLogs, shutdown, startup, whereAreYou
 
Methods inherited from interface agentland.util.Spy
tell
 

Method Detail

isConnected

public boolean isConnected(String from,
                           String to)
                    throws RemoteException
Is the given agent from connected to the agent to at this time.

getConnections

public Vector getConnections()
                      throws RemoteException
Return list of all current connections.

saveState

public void saveState(String name)
               throws RemoteException
Save the state of the world under the passed name.

loadState

public void loadState(String name)
               throws RemoteException
Load the state of the word as listed under name. Overwrite as needed the current state of the world.