agentland.resource.connect
Class ConnectionMakerAgent
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--metaglue.AgentAgent
|
+--agentland.util.GoodAgent
|
+--agentland.resource.connect.ConnectionMakerAgent
- public class ConnectionMakerAgent
- extends GoodAgent
- implements ConnectionMaker
Connect things together -- lots stolen from the old drug
Pipeline agent.
- See Also:
- Serialized Form
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". |
protected boolean |
connect(String in,
String agtIDstr,
String out)
Call given agent and tell it to connect in and out. |
boolean |
connectable(AgentID start,
AgentID stop)
tells you whether there exists a connection between a pair of drugs |
protected void |
connectPath(Path p)
Given a path, this method calls all intermediate agents and sets
their inputs and outputs in such a way that the path is connected |
void |
disconnect(int id)
kills (resets to 0 cost) the connection with a given id. |
Methods inherited from class agentland.util.GoodAgent |
addSpy,
addSpy,
alert,
alertString,
beep,
error,
getAlert,
getHistory,
getHistoryElement,
getPersistentMap,
log,
notify,
removeSpy,
removeSpy,
resetHistory,
safeRely,
safeRely,
safeRely,
setNiceLogName,
tell |
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,
obtainMetaglueAgent,
obtainMetaglueAgent,
obtainMetaglueAgentByName,
reliesOn,
reliesOn,
reliesOn,
reliesOnSynch,
removeFrozen,
replaceExceptionHandler,
setFreezeName,
setLogLevel,
setLogName,
shutdown,
startAgent,
startAgentOn,
startAgentOn,
startup,
status,
tiedTo,
tiedTo,
tiedTo,
tiedTo,
tieToDesignation,
whereAreYou |
graph
protected SQLGraph graph
ConnectionMakerAgent
public ConnectionMakerAgent()
throws RemoteException
connect
public int connect(AgentID from,
AgentID to)
- Connect "from" to "to".
Will look for cheapest path.
- Specified by:
- connect in interface ConnectionMaker
- Returns:
- id for connection so it can be released. Use this id on
any further calls. If connection cannot be made, returns -1.
connect
protected boolean connect(String in,
String agtIDstr,
String out)
- Call given agent and tell it to connect in and out.
connectPath
protected void connectPath(Path p)
- Given a path, this method calls all intermediate agents and sets
their inputs and outputs in such a way that the path is connected
disconnect
public void disconnect(int id)
throws RemoteException
- kills (resets to 0 cost) the connection with a given id.
- Specified by:
- disconnect in interface ConnectionMaker
connectable
public boolean connectable(AgentID start,
AgentID stop)
throws RemoteException
- tells you whether there exists a connection between a pair of drugs
- Specified by:
- connectable in interface ConnectionMaker
addEdge
public void addEdge(String from,
String outPort,
String to,
String inPort)
- Specified by:
- addEdge in interface ConnectionMaker
addEdge
public void addEdge(AgentID from,
String outPort,
AgentID to,
String inPort)
- Specified by:
- addEdge in interface ConnectionMaker