O'Reilly logo

J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software by Art Taylor

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

The Hello World RMI Example

The code shown below is the remote interface definition for our first RMI example. As we explained previously, this interface must declare the remote methods that will be exposed to client objects. This example declares a single method, the helloThere method, which takes a string argument for a name (which will be used in the response). The method returns a string value and must be declared to throw a RemoteException. The arguments to and the return values from any method declared in this interface can be Java primitive data types or objects that are serializable (implementing java.io.Serializable), and must conform to the restrictions of serializable objects. The interface itself must extend the java.rmi.Remote interface, ...

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