Class wb.ReadClient
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class wb.ReadClient

java.lang.Object
   |
   +----wb.ReadClient

public class ReadClient
extends Object
implements Runnable, GTypes
ReadClient is spawned thread from the server (Listen) which handles all the reading associated with a specific participant for the user. It handles all the message/GraphUnit unpack'g and processes them appropriately. Based on the MESSAGE ID, and the information packed in the message, the remote user is verified before being accepted.

Constructor Index

 o ReadClient(Socket, WBCanvas)
Creates a ReadClient instance.
 o ReadClient(Socket, WBCanvas, Participants)
Creates a ReadClient instance.

Method Index

 o join()
Joins this thread.
 o run()
Runs this thread.
 o setParticipants(Participants)
sets the Participants reference.
 o start()
Starts this thread.
 o stop()
Stops this thread.

Constructors

 o ReadClient
  public ReadClient(Socket passed,
                    WBCanvas arg)
Creates a ReadClient instance. A thread that either lasts for the whole conference or receives the message and and disconnected.
Parameters:
passed - Socket associated with this user.
arg - WBCanvas onto which the GraphUnits are rendered.
 o ReadClient
  public ReadClient(Socket passed,
                    WBCanvas arg,
                    Participants party)
Creates a ReadClient instance. A thread that either lasts for the whole conference or receives the message and and disconnected.
Parameters:
passed - Socket associated with this user.
arg - WBCanvas onto which the GraphUnits are rendered.
party - Participants instance reference of this Session

Methods

 o setParticipants
  public void setParticipants(Participants party)
sets the Participants reference. Must be called before the thread is started.
Parameters:
party - the Participants
 o start
  public void start()
Starts this thread. Reads the message on this socket and verifies the user, and appropriately terminates or continues this thread.
 o stop
  public void stop()
Stops this thread. It sets the state of the user to disconnected and closes the socket and the data stream associated
 o join
  public final void join() throws InterruptedException
Joins this thread.
Throws: InterruptedException
when join fails
 o run
  public void run()
Runs this thread. return from this would mean an end of this thread.

All Packages  Class Hierarchy  This Package  Previous  Next  Index