Calling a Remote Object's Methods
This section steps through a basic RMI application. First, you will go through the steps required to build and execute a simple RMI application.
Create a Remote Interface: Code Example
First, you need to create a remote interface, with this basic format:
public interface someInterface extends Remote
This interface must extend the java.rmi.Remote interface, which contains no methods but marks your interface as appropriate for RMI. In this interface, you define all the methods you want your remote object to have that will be visible to a remote client. Because you are going across address spaces, it is not sufficient to make the methods public. You need to do this additional work so that RMI can provide the mechanism ...
Get PURE Java™ 2 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.