Class RmiExamples

java.lang.Object
net.jrodolfo.java_evolution.java01.rmi.RmiExamples

public class RmiExamples extends Object
Demonstrates Remote Method Invocation, introduced in Java 1.1.

Early RMI examples commonly used generated stubs. Modern JDKs use dynamic stubs, so this example keeps the historically important API shape without requiring obsolete rmic generated source.

  • Constructor Details

    • RmiExamples

      public RmiExamples()
  • Method Details

    • startGreetingService

      public RmiExamples.RmiGreetingEndpoint startGreetingService() throws IOException
      Starts a local RMI registry, constructs an exported remote object, and binds the service.
      Returns:
      local RMI endpoint that must be closed after use
      Throws:
      IOException - when local socket binding or object export fails