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

Class wb.Listen

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

public class Listen
extends Object
implements Runnable, GTypes
Listen does the work of listening to the master socket and then starts off a new thread "ProcessClient" to process the response

Constructor Index

 o Listen(WBCanvas, Participants)
Creates an instance of the server thread at the default port (WBPORT) tries to create a server socket.
 o Listen(WBCanvas, Participants, int)
Creates an instance of the server thread at the specifed port

Method Index

 o destroy()
does the clean up before destroy'g the current thread
 o join()
provided to support the thread interface.
 o run()
Infinitely waits on the accept call of the server socket and spawns a new thread to handle the connection.
 o start()
Creates a Thread with max priority.
 o stop()
Stops the current thread and cleans up the sockets

Constructors

 o Listen
  public Listen(WBCanvas canvas,
                Participants party) throws IOException
Creates an instance of the server thread at the default port (WBPORT) tries to create a server socket. This is the best time to verify if the user can continue. Hence, failure in socket creation would throw an exception for the user to respond appropriately
Parameters:
canvas - the WBCanvas on to which the read data is rendered
party - the Participants in the current session
Throws: IOException
if the server socket is already bound
 o Listen
  public Listen(WBCanvas canvas,
                Participants party,
                int port) throws IOException
Creates an instance of the server thread at the specifed port
Parameters:
canvas - the WBCanvas on to which the read data is rendered
party - the Participants in the current session
port - int to identify the port number
Throws: IOException
if the server socket is already bound

Methods

 o destroy
  public void destroy()
does the clean up before destroy'g the current thread
 o start
  public void start()
Creates a Thread with max priority. may be a normal priority would do
 o stop
  public void stop()
Stops the current thread and cleans up the sockets
 o join
  public final void join() throws InterruptedException
provided to support the thread interface. Actually does nothing but to clean up the current thread.
 o run
  public void run()
Infinitely waits on the accept call of the server socket and spawns a new thread to handle the connection.

All Packages  Class Hierarchy  This Package  Previous  Next  Index