Reactive Scripts ``external statements'' are used to interact with the external system (for data management, graphic interactions, etc.). To implement this in Java, we build a mechanism that allows Java objects to register themselves as external objects on which reactive scripts can invoke methods through external calls. Please remark that we donot take advantage of the new features of Java 1.1 such asintrospection, to be able to use our package on Java 1.0 Virtual Machines.
External statements are enclosed between braces and use a reduced Java-like syntax, as in the following examples:
Invocation of a method on a registered object return one of the three basic type results: an integer, a string or a boolean. The following examples show how external statements are used:
The external evaluation return an integer which is the number of loop iterations.
The external evaluation returns a string which isthe name of the event to await.
The external evaluation returns a boolean for the test.