agentland.resource.connect
Interface ConnectionMaker
- All Superinterfaces:
- Agent, Good, Remote, Spy
- All Known Implementing Classes:
- ConnectionMakerAgent
- public interface ConnectionMaker
- extends Good
Methods inherited from interface agentland.util.Spy |
tell |
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
connected
public boolean connected(AgentID from,
AgentID to)
throws RemoteException
- Returns whether in the current graph the two are connected
getConnections
public Vector getConnections()
throws RemoteException
- Return list of all current connections.
getSources
public Vector getSources()
throws RemoteException
- Returns all agentID's of agents that are sources (i.e. have no
edges going into them)
getSinks
public Vector getSinks()
throws RemoteException
- Returns all agentID's of agents that are sinks (i.e. have no
edges going out of them)