org.apache.bsf.engines.rexx
Class Java4Rexx

java.lang.Object
  |
  +--org.apache.bsf.engines.rexx.Java4Rexx

class Java4Rexx
extends java.lang.Object

Java class to allow Rexx to invoke BSF4Rexx via JNI, after the JVM was created.

"BSF4Rexx.BsfLoadJava()" will create a JVM, load this class and then invoke the static method createInterface4Rexx(). This method creates an instance of BSFManager and uses it to load an instance of the Rexx engine, which allows to initialize the "BSF4Rexx" link library.

To make sure that upon return from the static method createInterface4Rexx() the reference to the Rexx engine object received via RexxEngine.getRexxInterface(), a global reference is created via JNI while executing the method RexxAndJava.jniInitialize4Rexx(), which calls into the BSF4Rexx-DLL.

Since:
2003-01-21 by Rony G. Flatscher
Version:
2.0.1, 2003-05-30
Author:
Rony G. Flatscher, 2003-01-26

Field Summary
private static org.apache.bsf.BSFManager bsfMgr
          BSF-manager to be used to get (instantiate) the Rexx engine.
private static org.apache.bsf.BSFEngine rxEngine
          The Rexx engine loaded via bsfMgr.
 
Constructor Summary
(package private) Java4Rexx()
           
 
Method Summary
private static void createInterface4Rexx()
          This method allows Rexx to load Java, then initialize the BSF4Rexx infrastructure from the Java side, and thereafter use all of the infrastructure from Rexx.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bsfMgr

private static org.apache.bsf.BSFManager bsfMgr
BSF-manager to be used to get (instantiate) the Rexx engine.


rxEngine

private static org.apache.bsf.BSFEngine rxEngine
The Rexx engine loaded via bsfMgr.

Constructor Detail

Java4Rexx

Java4Rexx()
Method Detail

createInterface4Rexx

private static void createInterface4Rexx()
                                  throws java.io.IOException
This method allows Rexx to load Java, then initialize the BSF4Rexx infrastructure from the Java side, and thereafter use all of the infrastructure from Rexx.

Hint: JNI is able to get to private/protected members of a class! This way this method can only be invoked by JNI.

java.io.IOException