O'Reilly logo

Core Java® Volume II—Advanced Features, Ninth Edition by Gary Cornell, Cay S. Horstmann

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

11.3.1. Interfaces and Implementations

The capabilities of remote objects are expressed in interfaces that are shared between the client and server. For example, the interface in Listing 11.1 describes the service provided by a remote warehouse object.

Listing 11.1. warehouse1/Warehouse.java

 1  import java.rmi.*;  2  3  /**  4     The remote interface for a simple warehouse.  5     @version 1.0 2007-10-09  6     @author Cay Horstmann  7  */  8  public interface Warehouse extends Remote  9  { 10     double getPrice(String description) throws RemoteException; 11  }

Image Note

In this chapter, we do not use packages. As ...

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