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.
-
bRun
- The run method for this thread runs until this bool turns false, as
it will when the exit menu item is picked.
-
f
- The Frame window, used by FileDialog.
-
ch9_fig1()
- Constructor creates a frame window (the window the user
sees) adds a menubar and loadtest menuitems to it.
-
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.
-
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.
-
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.
-
main(String[])
- The main method for this standalone application.
-
quit()
- Cause the main thread to exit by setting static variable bRun to
false.
-
run()
- The main loop for the AgentServer.
-
show(String)
- Add a String to our debugging list box.
f
public static ServerFrame f
- The Frame window, used by FileDialog.
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.
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
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
quit
public static void quit()
- Cause the main thread to exit by setting static variable bRun to
false.
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.
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
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
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
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