Method Invocation Syntax
This topic describes what is needed to define the methods of Java components for RDMI. You can use the Method Lookup wizard to retrieve the method definitions from Java classes.
An imported Off the Shelf component can be used as an example of how the RDMI tables are populated. Choose Define, RDMI, J2EE from the Definer menu bar and in the resulting window you can see the syntax that physical method entries use to define the mapping for the methods of components. For calls to J2EE, this syntax is a very limited subset of the Java syntax itself:
<class | object>.<physical method name>
All RDMI parameters are passed to the actual call without explicitly specifying them in the physical method (classic RDMI style). The mapping of argument types is:
<class | object><physical method name>( [:n [, :m]]... )
parses a string in argument :0 into an integer.
<class | object>.<physical method name>([(<cast specifier)]<argument>, ...)
creates a hexadecimal representation of the integer in :0.
Here the Integer is casted to a Java native integer. Without the cast, the native method would be called with a Java Integer Object as its argument. Java would return an invalid method call
See "Typecasts" for more information on the use of typecasts in method invocation.
Possible type casts are specified in the typecast appendix.
Literal arguments are understood.
The myfile object can be used during the lifetime of the RDMI object, so that, for example, another RDMI call can make the call:
argv is mapped onto a Java Array of String objects (String)
This syntax makes it easy to define generic components that inspect their arguments before processing them. This includes the possibility of using a variable number of arguments. For example, EAI table components can implement their QueryExe method by a physical method:
The somejavacomponent component, for example, processes its arguments by looping over the argument vector as in:
for (int i=0; I < argv.length; I++) process(argv[i]);