Remote Method Invocation RMI

suggest change

Versions

[{“Name”:“Java SE 5”,“GroupName”:null},{“Name”:“Java SE 6”,“GroupName”:null},{“Name”:“Java SE 7”,“GroupName”:null},{“Name”:“Java SE 8”,“GroupName”:null},{“Name”:“Java SE 9 (Early Access)”,“GroupName”:null}]

Remarks

RMI requires 3 components: client, server and a shared remote interface. The shared remote interface defines the client-server contract by specifying the methods a server must implement. The interface must be visible to the server so that it can implement the methods; the interface must be visible to the client so that it knows which methods (“services”) the server provides.

Any object implementing a remote interface is destined to take the role of a server. As such, a client-server relationship in which the server can also invoke methods in the client is in fact a server-server relationship. This is termed callback since the server can call back the “client”. With this in mind, it is acceptable to use the designation client for the servers that function as such.

The shared remote interface is any interface extending Remote. An object that functions as a server undergoes the following:

  1. Implements the shared remote interface, either explicitly or implicitly by extending UnicastRemoteObject which implements Remote.
  2. Exported, either implicitly if it extends UnicastRemoteObject, or explicitly by being passed to UnicastRemoteObject#exportObject.
  3. Binded in a registry, either directly through Registry or indirectly through Naming. This is only necessary for establishing initial communication since further stubs can be passed directly through RMI.

In the project setup, the client and server projects are completely unrelated, but each specifies a shared project in its build path. The shared project contains the remote interfaces.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Remote Method Invocation (RMI):
* Remote Method Invocation RMI

Table Of Contents
8 Arrays
10 Maps
11 Strings
25 JAXB
29 Enums
32 Audio
37 Remote Method Invocation (RMI)
41 Scanner
63 Logging
75 Lists
78 Sets
89 JAX-WS
96 XJC
98 Process
106 Modules
114 Applets
122 JNDI
139 JavaBean
141 Literals
144 Packages
150 JMX
153 JShell
159 Sockets
167 Enum Map
175 Hashtable
177 SortedMap