Home  >  Article  >  Java  >  What is the working process of java RMI

What is the working process of java RMI

王林
王林forward
2023-05-04 18:16:06611browse

Workflow

1. On the Client side, there is something called Stub, which sometimes becomes a stub and is the proxy object of RMIClient.

2. The main function of Stub is to construct an information block when requesting a remote method, and the RMI protocol sends the information block to the server.

The information block consists of

Remote object identifier.

Description of the method called.

Group parameter values ​​(object serialization is used in the RMI protocol).

Function of information block

Parse the calling object identifier and method description in the information block, and call the specific object method on the server side.

Get the return value or exception value of the call.

Group the return value and return it to the client Stub.

What are the advantages of Java

1. Simple, just understand the basic concepts, you can write applications suitable for various situations;

2. Object-oriented ;

3. Distribution, Java is a network-oriented language;

4. Robustness, Java provides automatic garbage collection for memory management, preventing programmers from easily generating errors when managing memory. Error;

5. Security, Java used in network and distributed environments must prevent virus intrusion.

6. Architecture neutral, as long as the Java runtime system is installed, it can run on any processor.

7. Portability, Java can be easily transplanted to different machines on the network.

8. Interpretation and execution, the Java interpreter directly interprets and executes the Java bytecode.

The above is the detailed content of What is the working process of java RMI. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete