Class chap9.ch9_fig1
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class chap9.ch9_fig1

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----chap9.ch9_fig1

public class ch9_fig1
extends Thread
A standalone application for testing class loading functions.

Variable Index

 o bRun
The run method for this thread runs until this bool turns false, as it will when the exit menu item is picked.
 o f
The Frame window, used by FileDialog.

Constructor Index

 o ch9_fig1()
Constructor creates a frame window (the window the user sees) adds a menubar and loadtest menuitems to it.

Method Index

 o LoadTest1()
Test the loading of classes at this site by allowing the user to choose a class file to load, then creating/parsing a Class from that class file.
 o LoadTest2()
Test the loading of classes at this site by allowing the user to choose a class file to load, then creating an object from that class file.
 o LoadTest3()
Test the loading of classes at this site by allowing the user to choose a class file to load, then creating an object from it.
 o main(String[])
The main method for this standalone application.
 o quit()
Cause the main thread to exit by setting static variable bRun to false.
 o run()
The main loop for the AgentServer.
 o show(String)
Add a String to our debugging list box.

Variables

 o f
  public static ServerFrame f
The Frame window, used by FileDialog.
 o bRun
  public static boolean bRun
The run method for this thread runs until this bool turns false, as it will when the exit menu item is picked.

Constructors

 o ch9_fig1
  public ch9_fig1()
Constructor creates a frame window (the window the user sees) adds a menubar and loadtest menuitems to it.
See Also:
ServerFrame, List, Frame, Panel, MenuBar, MenuItem

Methods

 o main
  public static void main(String argv[])
The main method for this standalone application. Creates one of our ch9_fig1 class, then sets it running via Thread.start.
See Also:
Thread
 o quit
  public static void quit()
Cause the main thread to exit by setting static variable bRun to false.
 o show
  public static void show(String str)
Add a String to our debugging list box.
Parameters:
str - The string we want to appear in the list box.
 o run
  public void run()
The main loop for the AgentServer. Sits in a loop, sleeping for 1 second, then waking up to check whether the user interface has been terminated.
Overrides:
run in class Thread
See Also:
sleep
 o LoadTest1
  public static void LoadTest1()
Test the loading of classes at this site by allowing the user to choose a class file to load, then creating/parsing a Class from that class file. DEBUGGING method.
See Also:
ch9_fig1_FileLoader, FileDialog
 o LoadTest2
  public static void LoadTest2()
Test the loading of classes at this site by allowing the user to choose a class file to load, then creating an object from that class file. If the new object is an instance of either Runnable or Thread, we start it running in its own thread.
See Also:
ch9_fig1_FileLoader, FileDialog
 o LoadTest3
  public static void LoadTest3()
Test the loading of classes at this site by allowing the user to choose a class file to load, then creating an object from it. If the new object is an instance of either Runnable or Thread we set it running in its own thread.
See Also:
ch9_fig3_FileLoader, FileDialog

All Packages  Class Hierarchy  This Package  Previous  Next  Index