This topic describes how to make a HSF call.
In one HSF call, the HSF consumer initiates a request to the HSF provider over the network, and returns the result returned by the HSF provider over the network to the user. This process involves multi-thread interaction, and different domain objects in HSF.
The following figure shows the HSF call process.
|1||In the client thread, the user request parameters that are request objects are serialized
and then stored in the request communication object.
Note The request communication object uses the HSF protocol and contains multiple items, such as the request ID, that are irrelevant to the request object.
|2||The system submits the request communication object to the I/O thread and encodes the object in the I/O thread.|
|3||After the encoding is complete, the system delivers the content to the I/O thread of the HSF provider. The client thread waits for the results.|
|4||The I/O thread of the HSF provider receives the binary content, decodes the binary content into the request communication object, and submits the object to the HSF server thread.|
|5||The HSF server thread deserializes the request communication object and restores it to the request object.|
|6||The HSF server thread initiates a reflection call and obtains the result that is the response object.|
|7||The HSF server thread serializes the response object and stores the result in the communication response object.|
|8||The HSF server thread submits the response communication object to the I/O thread and encodes the object in the I/O thread.|
|9||After the HSF provider encodes the object in the I/O thread, the HSF provider returns the object to the HSF consumer.|
|10||The HSF consumer receives the binary content, decodes the binary content into the response communication object in the I/O thread, and wakes up the client thread.|
|11||The client thread deserializes the response communication object. When the user receives the response object, a remote call ends.|