Class cam.codegen.CreateRMIWrappers

java.lang.Object
   |
   +----cam.codegen.CreateRMIWrappers

public class CreateRMIWrappers
extends Object
A class for creating an RMI interface and RMI server wrapper classes. See NetApp Wrappers for documentation about how to construct distributed applications using these wrapper classes.
#   Input  <-- className
#    
#   Output --> classNameRI (an RMI interface)
#          --> classNameRS (an RMI server class)
The creation of the wrapper classes must be re-done every time the method interface to the input class changes.

The JDK utility rmic must be applied to the RMI server class after its construction. The result of that operation will yield the classes classNameRS_Skel.class and classNameRI_Stub.class

Target and derived class locations for use with RMI ...

Local                                  |       Remote
-------                                |      --------
Client Application (using classNameRI) |     className.class
classNameRI.class                      |     className.class
classNameRS_stub.class                 |     className_skel.class

Version:
9/22/98
Author:
Chris Anderson (C) UCLA 1998

Constructor Index

 o CreateRMIWrappers()

Method Index

 o createRMIinterface()
Creates the RMI interface class code.
 o createRMIserver()
Creates the RMI server class code.
 o getLocalClassName()
Returns the name of the target class without the package prefix.
 o main(String[])
Command line invocation routine.
 o setClass(String)
Sets the target class.

Constructors

 o CreateRMIWrappers
 public CreateRMIWrappers()

Methods

 o setClass
 public void setClass(String cName) throws ClassNotFoundException
Sets the target class.

Parameters:
cName - Target class name (full classname - e.g. with package prefix if any).
Throws: ClassNotFoundException
if target class is not found.
 o getLocalClassName
 public String getLocalClassName()
Returns the name of the target class without the package prefix.

 o createRMIserver
 public String[] createRMIserver()
Creates the RMI server class code.

Returns:
a String array, each element being a line of the class code.
 o createRMIinterface
 public String[] createRMIinterface()
Creates the RMI interface class code.

Returns:
a String array, each element being a line of the class code.
 o main
 public static void main(String args[])
Command line invocation routine. Creates the the interface and server classes. Compiles the interface and server classes.

Parameters:
args[] - Target class; specified with a full classname (e.g. including a package prefix if any).