0% found this document useful (0 votes)
46 views

RMI (Remote Method Invocation)

RMI allows Java objects to invoke methods on other Java objects running in separate JVMs, enabling distributed applications. It uses stubs on the client side and skeletons on the server side to proxy method calls and results between remote objects. Stubs route outgoing requests and parameters to remote JVMs and return results, while skeletons route incoming requests to remote objects, invoke methods, and return results to callers.

Uploaded by

Firaol Bonsa
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

RMI (Remote Method Invocation)

RMI allows Java objects to invoke methods on other Java objects running in separate JVMs, enabling distributed applications. It uses stubs on the client side and skeletons on the server side to proxy method calls and results between remote objects. Stubs route outgoing requests and parameters to remote JVMs and return results, while skeletons route incoming requests to remote objects, invoke methods, and return results to callers.

Uploaded by

Firaol Bonsa
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 5

RMI (Remote Method Invocation)


It is an API that provides a mechanism to
create distributed application in Java.

The RMI allows an object to invoke methods
on an object running in another JVM.

It provides remote communication between
the applications using two objects stub and
skeleton.
stub


The stub is an object, acts as a gateway for
the client side.

All the outgoing requests are routed through
it.

It resides at the client side and represents
the remote object.
Cont.

When the caller invokes method on the stub object, it
does the following tasks:

It initiates a connection with remote Virtual Machine
(JVM),

It writes and transmits (marshals) the parameters to the
remote Virtual Machine (JVM),

It waits for the result

It reads (un-marshals) the return value or exception,
and
skeleton

The skeleton is an object, acts as a gateway for the
server side object.

All the incoming requests are routed through it.

When the skeleton receives the incoming request, it
does the following tasks:

It reads the parameter for the remote method

It invokes the method on the actual remote object

It writes and transmits (marshals) the result to the
caller.
Cont.

You might also like