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

Constructor Index

 o CClient(String, IServer)
Creates a local client object.

Method Index

 o endXmit()
Called by our Session when it's done sending objects.
 o getName()
Returns the name of the object.
 o getNumObjects()
Returns total number of objects being sent.
 o getPercent()
Returns percentage of objects received.
 o killDownload()
Tell our Session to stop sending and die.
 o receiveObject(DataObject)
Receive next object in series from Session.
 o request(DataObject)
Make a request to the Server object to start sending data.
 o startXmit(int)
Called by our Session when it wants to start sending.
 o waitForDone()
Waits until all packets have been received.
 o waitForNum(int)
Waits until a specified number of objects have been transmitted.
 o waitForPct(int)
Waits until a specified percent of the objects have been transmitted.

Constructors

 o 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.

Methods

 o 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.
 o 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.
 o getNumObjects
 public int getNumObjects()
Returns total number of objects being sent.

Returns:
number of objects being sent.
 o getPercent
 public int getPercent()
Returns percentage of objects received.

Returns:
Percent of objects received.
 o killDownload
 public synchronized void killDownload()
Tell our Session to stop sending and die.

 o receiveObject
 public synchronized void receiveObject(DataObject object)
Receive next object in series from Session.

Parameters:
object - The next object.
 o endXmit
 public synchronized void endXmit()
Called by our Session when it's done sending objects.

 o waitForPct
 public synchronized void waitForPct(int wait_percent) throws PaidNetworkRuntimeException
Waits until a specified percent of the objects have been transmitted.

 o waitForNum
 public synchronized void waitForNum(int wait_num) throws PaidNetworkRuntimeException
Waits until a specified number of objects have been transmitted.

 o waitForDone
 public synchronized void waitForDone()
Waits until all packets have been received. Wakes up when notify() is called from endXmit.

 o 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)