All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.beans.script.comps.java.SCRJavaRTComponent

java.lang.Object
   |
   +----com.ibm.beans.script.SCRRTComponent
           |
           +----com.ibm.beans.script.comps.java.SCRJavaRTComponent

public class SCRJavaRTComponent
extends SCRRTComponent
This is the Java run-time component class. It extends the SCRRTComponent class.

See Also:
SCRRTComponent

Variable Index

 o eventTable
Indicates the table of event listeners for the script class.
 o javaClass
Indicates the generated java class.
 o script
Indicates the instance of the script class.
 o scriptClassName
Indicates the fully-qualified name of the script class.

Constructor Index

 o SCRJavaRTComponent(String, SCREventProcessor, Hashtable)
Constructor for SCRJavaRTComponent.

Method Index

 o cleanUp()
Cleans up the run-time Java component before being dereferenced.
 o handleEventFired(Object[], String[], String, String, Object[])
Generates the event handle method name and invokes the event handle in the script.
 o handleInitialize()
Implements the abstract method defined in the SCRRTComponent class.
 o handleRunScript(boolean, SCRRTClient)
Creates and starts the script and sets the event processor to run mode.
 o handleTerminateScript()
Stops the Java script and sets the event processor to run mode.
 o loadJavaClass(SCRJavaResources)
Loads the Java class for the generated script from a class file.
 o needAddListener(Object, String)
Checks a particular event listener need to be addedto the scriptable bean.
 o startDebugger()
Starts the debugger.

Variables

 o scriptClassName
 protected String scriptClassName
Indicates the fully-qualified name of the script class.

 o eventTable
 protected Hashtable eventTable
Indicates the table of event listeners for the script class.

 o script
 protected transient SCRJavaComponentScript script
Indicates the instance of the script class.

 o javaClass
 protected transient Class javaClass
Indicates the generated java class.

Constructors

 o SCRJavaRTComponent
 public SCRJavaRTComponent(String clsName,
                           SCREventProcessor event_proc,
                           Hashtable evt_tbl)
Constructor for SCRJavaRTComponent. Creates the Java run-time component.

Parameters:
registeredClasses - The registered classes used by the class loader.
clsName - The name of the generated script class.
event_proc - The run-time event processor.
evt_tbl - The event listener table.
See Also:
SCRRTComponent

Methods

 o loadJavaClass
 protected Class loadJavaClass(SCRJavaResources res)
Loads the Java class for the generated script from a class file.

Parameters:
res - The resource bundle used for issuing error message.
Returns:
The loaded Java class.
 o handleInitialize
 protected boolean handleInitialize()
Implements the abstract method defined in the SCRRTComponent class.

Returns:
true, if successful; false, if failed.
Overrides:
handleInitialize in class SCRRTComponent
 o handleEventFired
 public Throwable handleEventFired(Object args[],
                                   String arg_class_names[],
                                   String java_method_name,
                                   String src_obj_name,
                                   Object return_val[])
Generates the event handle method name and invokes the event handle in the script.

Parameters:
args - The array of the arguments of the event method.
arg_class_names - The array of the argument class names .
java_method_name - The event method name.
src_obj_name - Name of the Java object which fires the event.
return_val - The event method return value container.
Returns:
The exception thrown by the invoked target.
Overrides:
handleEventFired in class SCRRTComponent
 o handleRunScript
 public boolean handleRunScript(boolean withDebug,
                                SCRRTClient scr_client)
Creates and starts the script and sets the event processor to run mode. This method is the runScript() command handler.

Parameters:
withDebug - Indicates whether the script runs with the debugger. true, run with debugger; false, run without debugger.
scr_client - The scripting client object.
Returns:
true, if successful; false, otherwise.
Overrides:
handleRunScript in class SCRRTComponent
See Also:
runScript
 o handleTerminateScript
 public boolean handleTerminateScript()
Stops the Java script and sets the event processor to run mode. This method is the TerminateScript() command handler.

Returns:
true, if successful; false, otherwise.
Overrides:
handleTerminateScript in class SCRRTComponent
See Also:
terminateScript
 o cleanUp
 public void cleanUp()
Cleans up the run-time Java component before being dereferenced.

Overrides:
cleanUp in class SCRRTComponent
See Also:
SCRRTComponent
 o needAddListener
 public boolean needAddListener(Object java_obj,
                                String listener_type_name)
Checks a particular event listener need to be addedto the scriptable bean. This method is called by the event processor.

Parameters:
java_obj - The Java object to whcih the event listener will be added.
listener_type_name - The name of the listener type class.
Returns:
true, if event listener needs to be added; false, if event listener does not need to be added.
Overrides:
needAddListener in class SCRRTComponent
 o startDebugger
 protected void startDebugger()
Starts the debugger. Reports an error if debugger is started with a non-debugging component.


All Packages  Class Hierarchy  This Package  Previous  Next  Index