O'Reilly logo

PURE Java™ 2 by Kenneth Litwak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required