Class Client

java.lang.Object
  |
  +--Client

public class Client
extends java.lang.Object

Common Main or Client Program for the sequential/distributed Programs.

See Also:
Program, sd.net.Pool

Field Summary
static boolean distributed
          Variable indicating whether the program should be run in distributed fashion or not.
static Pool pool
          The pool of tasks associated with the client for distributed programs.
 
Constructor Summary
Client()
          create an instance of a client
Client(int port, int lumpSize, boolean dist_type, boolean restart, java.lang.String prgm, OutputObserver[] obs)
          create an instance of a client
 
Method Summary
 void initProgram()
          Depending on whether the program needs to be run distributed or not, appropriate program classes are instantiated.
 void initProgram(OutputObserver[] obs)
          Depending on whether the program needs to be run distributed or not, appropriate program classes are instantiated with the appropriate observers.
 boolean isRunnable()
          Returns if the program to be run is well configured.
static void main(java.lang.String[] args)
           
 Program Program()
          returns the current program class.
 void run()
          Starts the current program.
 void setProgram(java.lang.String program_name)
          initializes the program classes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

distributed

public static boolean distributed
Variable indicating whether the program should be run in distributed fashion or not.

pool

public static Pool pool
The pool of tasks associated with the client for distributed programs.
Constructor Detail

Client

public Client()
create an instance of a client

Client

public Client(int port,
              int lumpSize,
              boolean dist_type,
              boolean restart,
              java.lang.String prgm,
              OutputObserver[] obs)
create an instance of a client
Method Detail

Program

public Program Program()
returns the current program class.

run

public void run()
Starts the current program.

setProgram

public void setProgram(java.lang.String program_name)
initializes the program classes.

initProgram

public void initProgram(OutputObserver[] obs)
Depending on whether the program needs to be run distributed or not, appropriate program classes are instantiated with the appropriate observers.

initProgram

public void initProgram()
Depending on whether the program needs to be run distributed or not, appropriate program classes are instantiated.

isRunnable

public boolean isRunnable()
Returns if the program to be run is well configured.

main

public static void main(java.lang.String[] args)