All Packages Class Hierarchy This Package Previous Next Index
Class edu.cmu.paid.network.CClient
java.lang.Object
|
+----edu.cmu.paid.network.CClient
- public class CClient
- extends Object
- implements IClient
Object residing on client machine.
Takes requests for data and talks to the server to
complete requests.
- Author:
- Will Ross
-
CClient(String, IServer)
- Creates a local client object.
-
endXmit()
- Called by our Session when it's done sending objects.
-
getName()
- Returns the name of the object.
-
getNumObjects()
- Returns total number of objects being sent.
-
getPercent()
- Returns percentage of objects received.
-
killDownload()
- Tell our Session to stop sending and die.
-
receiveObject(DataObject)
- Receive next object in series from Session.
-
request(DataObject)
- Make a request to the Server object to start sending data.
-
startXmit(int)
- Called by our Session when it wants to start sending.
-
waitForDone()
- Waits until all packets have been received.
-
waitForNum(int)
- Waits until a specified number of objects have
been transmitted.
-
waitForPct(int)
- Waits until a specified percent of the objects have
been transmitted.
CClient
public CClient(String s,
IServer server)
- Creates a local client object.
- Parameters:
- s - Naming Service name of this object.
- server - Proxy to Server object residing on server machine.
request
public synchronized Vector request(DataObject req) throws PaidNetworkRuntimeException
- Make a request to the Server object to start sending data.
- Parameters:
- req - DataObject containing request.
- Returns:
- A Vector that will contain returned DataObjects.
startXmit
public synchronized void startXmit(int len)
- Called by our Session when it wants to start sending.
- Parameters:
- len - Number of objects that will be sent.
getNumObjects
public int getNumObjects()
- Returns total number of objects being sent.
- Returns:
- number of objects being sent.
getPercent
public int getPercent()
- Returns percentage of objects received.
- Returns:
- Percent of objects received.
killDownload
public synchronized void killDownload()
- Tell our Session to stop sending and die.
receiveObject
public synchronized void receiveObject(DataObject object)
- Receive next object in series from Session.
- Parameters:
- object - The next object.
endXmit
public synchronized void endXmit()
- Called by our Session when it's done sending objects.
waitForPct
public synchronized void waitForPct(int wait_percent) throws PaidNetworkRuntimeException
- Waits until a specified percent of the objects have
been transmitted.
waitForNum
public synchronized void waitForNum(int wait_num) throws PaidNetworkRuntimeException
- Waits until a specified number of objects have
been transmitted.
waitForDone
public synchronized void waitForDone()
- Waits until all packets have been received.
Wakes up when notify() is called from endXmit.
getName
public String getName()
- Returns the name of the object. Used in unbinding.
- Returns:
- Name this object is (should be) bound to.
All Packages Class Hierarchy This Package Previous Next Index
This page is hosted by the Chair for Applied Software Engineering of the Technische Universität München.
Imprint (Impressum)