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
-
CreateRMIWrappers()
-
-
createRMIinterface()
- Creates the RMI interface class code.
-
createRMIserver()
- Creates the RMI server class code.
-
getLocalClassName()
- Returns the name of the target class without the package prefix.
-
main(String[])
- Command line invocation routine.
-
setClass(String)
- Sets the target class.
CreateRMIWrappers
public CreateRMIWrappers()
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.
getLocalClassName
public String getLocalClassName()
- Returns the name of the target class without the package prefix.
createRMIserver
public String[] createRMIserver()
- Creates the RMI server class code.
- Returns:
- a String array, each element being a line of the class code.
createRMIinterface
public String[] createRMIinterface()
- Creates the RMI interface class code.
- Returns:
- a String array, each element being a line of the class code.
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).