remote method invocation (rmi)

Post on 21-Jun-2015

116 Views

Category:

Technology

3 Downloads

Preview:

Click to see full reader

TRANSCRIPT

AbdolNaser Dorgalaleh

RMIRemote method Invocation

How is Java RMI :

• I have an object residing in one machine that want to access to an object that residing on another machine to invoke the methods

Explain :

• Client : invoke methods across the network residing on the Server

•Rmiregistry : at first we most start rmiregistry

the rmiregistry is the element that helps the

server to advertise there availability and clients

use rmiregistry to find refrences to remote

object that they want to invoke.

Implementation:

• Define the interfaces

• Implement the server

• Implement the client

Running:

• Run rmiregistry

• Run the server

• Run the client.Clients will connect to rmiregistry to invoke remote method.

The Archotecture

Stub : Proxy for the remote object as we said the object is residing on a remote machineAfter making call the call come from the client to the stub and the stub passes the request to the RRL(Remote Refrence layer) and rrl identify the type of the server that is unicast or multicast Rmi supports unicast Server.Unicast: you can not replicate the object

top related