All Packages Class Hierarchy This Package Previous Next Index
Class edu.cmu.paid.network.CNetwork_Api
java.lang.Object
|
+----edu.cmu.paid.network.CNetwork_Api
- public class CNetwork_Api
- extends Object
- implements INetwork_Api
This is the Network Subsystem API.
Currently incomplete.
-
CNetwork_Api()
-
-
addObjectToAgent(IMulticastAgent, Object)
- Implementation of addObjectToAgent().
-
clientStartup()
- Implementation of clientStartup().
-
connectAgents(IMulticastAgent, IMulticastAgent)
- Implementation of connectAgents().
-
disconnectAgents(IMulticastAgent, IMulticastAgent)
- Implementation of disconnectAgents().
-
disconnectMachine()
- Implementation of disconnectMachine().
-
getNewMulticastAgent()
- Implementation of getNewMulticastAgent().
-
getNewMulticastAgent(MulticastAgent[])
- Implementation of getNewMulticastAgent().
-
getNewRemoteMulticastAgent(String)
- Implementation of getNewRemoteMulticastAgent().
-
getNumObjects()
- Get number of objects being returned by current request.
-
getPercent()
- Get current percentage of transfer that's completed.
-
killDownload()
- Implementation of killDownload().
-
multicastMessage(IMulticastAgent, String, Object[], String)
- Implementation of multicastMessage().
-
publishEvent(IMulticastAgent, EventObject, Topic)
- Implementation of publishEvent().
-
remoteQuery(DataObject, String[])
- Implementation of remoteQuery().
-
removeObjectFromAgent(IMulticastAgent, Object)
- Implementation of removeObjectFromAgent().
-
serverStartup(String)
- Implementation of serverStartup().
-
waitForDone()
- Waits until current download is complete.
-
waitForNum(int)
- Block until specified number of objects have been received
-
waitForPct(int)
- Block until specified percentage of transfer is comlete.
CNetwork_Api
public CNetwork_Api()
clientStartup
public void clientStartup()
- Implementation of clientStartup().
Ignores startup exceptions because usually they indicate
that voyager's _already_ started.
serverStartup
public void serverStartup(String url) throws VoyagerStartupPaidNetworkException
- Implementation of serverStartup().
- Throws: VoyagerStartupPaidNetworkException
- Throws exception if voyager fails to startup.
disconnectMachine
public void disconnectMachine()
- Implementation of disconnectMachine().
remoteQuery
public Vector remoteQuery(DataObject request,
String serverList[])
- Implementation of remoteQuery().
- Parameters:
- request - DataObject containing request.
- serverList - Array of urls to possible servers.
- Returns:
- A vector of DataObjects satisfying request.
waitForDone
public void waitForDone()
- Waits until current download is complete.
getNumObjects
public int getNumObjects()
- Get number of objects being returned by current request.
- Returns:
- Number of objects being returned by current request; 0 if no request is being made.
getPercent
public int getPercent()
- Get current percentage of transfer that's completed.
- Returns:
- Percent of transfer complete.
waitForPct
public void waitForPct(int pct)
- Block until specified percentage of transfer is comlete.
waitForNum
public void waitForNum(int num)
- Block until specified number of objects have been received
killDownload
public void killDownload()
- Implementation of killDownload().
getNewMulticastAgent
public MulticastAgent getNewMulticastAgent()
- Implementation of getNewMulticastAgent().
getNewMulticastAgent
public MulticastAgent getNewMulticastAgent(MulticastAgent neighborList[])
- Implementation of getNewMulticastAgent().
getNewRemoteMulticastAgent
public IMulticastAgent getNewRemoteMulticastAgent(String url) throws Exception
- Implementation of getNewRemoteMulticastAgent().
- Throws: Exception
- Throws java.lang.Exception if there's an error.
connectAgents
public void connectAgents(IMulticastAgent agent1,
IMulticastAgent agent2) throws Exception
- Implementation of connectAgents().
- Throws: Exception
- result.readBoolean() can throw an exception if the
function call invokeSync() throws an exception or the result is not boolean.
disconnectAgents
public void disconnectAgents(IMulticastAgent agent1,
IMulticastAgent agent2)
- Implementation of disconnectAgents().
NOTICE: When disconnecting agents, you must disconnect
them in the same order as you connected them. This
is due to a voyager bug.
addObjectToAgent
public void addObjectToAgent(IMulticastAgent agent,
Object object)
- Implementation of addObjectToAgent().
removeObjectFromAgent
public void removeObjectFromAgent(IMulticastAgent agent,
Object object)
- Implementation of removeObjectFromAgent().
multicastMessage
public void multicastMessage(IMulticastAgent initialAgent,
String methodSig,
Object args[],
String className)
- Implementation of multicastMessage().
publishEvent
public void publishEvent(IMulticastAgent initialAgent,
EventObject event,
Topic topic)
- Implementation of publishEvent().
All Packages Class Hierarchy This Package Previous Next Index