agentland.resource.connect
Interface ConnectionMaker

All Known Implementing Classes:
ConnectionMakerAgent

public interface ConnectionMaker
extends Good


Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Method Summary
 void addEdge(AgentID from, String outPort, AgentID to, String inPort)
           
 void addEdge(String from, String outPort, String to, String inPort)
           
 int connect(AgentID from, AgentID to)
          Connect "from" to "to".
 boolean connectable(AgentID start, AgentID stop)
          tells you whether there exists a connection between a pair of drugs
 void disconnect(int id)
          kills (resets to 0 cost) the connection with a given id.
 
Methods inherited from interface agentland.util.Good
getHistory, getHistoryElement, resetHistory
 
Methods inherited from interface agentland.util.Spy
tell
 

Method Detail

connect

public int connect(AgentID from,
                   AgentID to)
            throws RemoteException
Connect "from" to "to". Will look for cheapest path.
Returns:
id for connection so it can be released. Use this id on any further calls.

disconnect

public void disconnect(int id)
                throws RemoteException
kills (resets to 0 cost) the connection with a given id.

connectable

public boolean connectable(AgentID start,
                           AgentID stop)
                    throws RemoteException
tells you whether there exists a connection between a pair of drugs

addEdge

public void addEdge(AgentID from,
                    String outPort,
                    AgentID to,
                    String inPort)
             throws RemoteException

addEdge

public void addEdge(String from,
                    String outPort,
                    String to,
                    String inPort)
             throws RemoteException