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.


Constructor Index

 o CNetwork_Api()

Method Index

 o addObjectToAgent(IMulticastAgent, Object)
Implementation of addObjectToAgent().
 o clientStartup()
Implementation of clientStartup().
 o connectAgents(IMulticastAgent, IMulticastAgent)
Implementation of connectAgents().
 o disconnectAgents(IMulticastAgent, IMulticastAgent)
Implementation of disconnectAgents().
 o disconnectMachine()
Implementation of disconnectMachine().
 o getNewMulticastAgent()
Implementation of getNewMulticastAgent().
 o getNewMulticastAgent(MulticastAgent[])
Implementation of getNewMulticastAgent().
 o getNewRemoteMulticastAgent(String)
Implementation of getNewRemoteMulticastAgent().
 o getNumObjects()
Get number of objects being returned by current request.
 o getPercent()
Get current percentage of transfer that's completed.
 o killDownload()
Implementation of killDownload().
 o multicastMessage(IMulticastAgent, String, Object[], String)
Implementation of multicastMessage().
 o publishEvent(IMulticastAgent, EventObject, Topic)
Implementation of publishEvent().
 o remoteQuery(DataObject, String[])
Implementation of remoteQuery().
 o removeObjectFromAgent(IMulticastAgent, Object)
Implementation of removeObjectFromAgent().
 o serverStartup(String)
Implementation of serverStartup().
 o waitForDone()
Waits until current download is complete.
 o waitForNum(int)
Block until specified number of objects have been received
 o waitForPct(int)
Block until specified percentage of transfer is comlete.

Constructors

 o CNetwork_Api
 public CNetwork_Api()

Methods

 o clientStartup
 public void clientStartup()
Implementation of clientStartup(). Ignores startup exceptions because usually they indicate that voyager's _already_ started.

 o serverStartup
 public void serverStartup(String url) throws VoyagerStartupPaidNetworkException
Implementation of serverStartup().

Throws: VoyagerStartupPaidNetworkException
Throws exception if voyager fails to startup.
 o disconnectMachine
 public void disconnectMachine()
Implementation of disconnectMachine().

 o 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.
 o waitForDone
 public void waitForDone()
Waits until current download is complete.

 o 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.
 o getPercent
 public int getPercent()
Get current percentage of transfer that's completed.

Returns:
Percent of transfer complete.
 o waitForPct
 public void waitForPct(int pct)
Block until specified percentage of transfer is comlete.

 o waitForNum
 public void waitForNum(int num)
Block until specified number of objects have been received

 o killDownload
 public void killDownload()
Implementation of killDownload().

 o getNewMulticastAgent
 public MulticastAgent getNewMulticastAgent()
Implementation of getNewMulticastAgent().

 o getNewMulticastAgent
 public MulticastAgent getNewMulticastAgent(MulticastAgent neighborList[])
Implementation of getNewMulticastAgent().

 o getNewRemoteMulticastAgent
 public IMulticastAgent getNewRemoteMulticastAgent(String url) throws Exception
Implementation of getNewRemoteMulticastAgent().

Throws: Exception
Throws java.lang.Exception if there's an error.
 o 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.
 o 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.

 o addObjectToAgent
 public void addObjectToAgent(IMulticastAgent agent,
                              Object object)
Implementation of addObjectToAgent().

 o removeObjectFromAgent
 public void removeObjectFromAgent(IMulticastAgent agent,
                                   Object object)
Implementation of removeObjectFromAgent().

 o multicastMessage
 public void multicastMessage(IMulticastAgent initialAgent,
                              String methodSig,
                              Object args[],
                              String className)
Implementation of multicastMessage().

 o publishEvent
 public void publishEvent(IMulticastAgent initialAgent,
                          EventObject event,
                          Topic topic)
Implementation of publishEvent().


All Packages  Class Hierarchy  This Package  Previous  Next  Index