Generating Server-side Files

You can generate server-side files by using either of the following tools:

To generate server-side files with the RMI Wizard:

  1. Decide what kind of implementation you want to create.
  2. From the main window, choose Tools  RMI Wizard to open the first page of the RMI Wizard.
  3. On the first page, specify the package in which the wizard should place the files it generates.
  4. On the second page, specify the remote interface you are creating for your server program. This can be either a new remote interface, an extension of an existing remote interface, or a copy of a remote interface that has been made into a template, as follows:
  5. On the third page of the wizard, define your remote interface:
  6. On the fourth page of the wizard, choose values that describe the kind of implementation class that you want the wizard to create:

To generate server-side files with the RMI templates:

  1. Decide what kind of implementation you want to create. There are RMI templates for each of the RMI base class types (UnicastRemoteObject, Activatable, RMIIIOP) and for implementation classes that do not extend one of the base classes (ClearObject
  2. If you are creating an implementation of an existing remote interface, copy that interface to the package in which you are creating the implementation.
  3. From the main window, choose File  New to open the Template Chooser.
  4. To create an implementation of an existing remote interface, select one of these templates:
  5. To create a new remote interface and an implementation for it, select one of these templates:
  6. Use the fields on the right side of the Template Chooser to specify a name for your server file and the package in which it should be generated. If you are using one of the _Impl templates to implement an existing remote interface, use a name that matches the interface name. For example, if you are implementing an interface named Hello, name your implementation class HelloImpl. The RMI module will declare your class as an implementation of the interface and generate method bodies for methods declared in the remote interface.
  7. Click the Finish button.
  8. The RMI module creates an RMI server source file called Name_You_Specified.java.
For more information, see:
 The RMI Registry Browser

Completing Generated Files


Legal Notices