JAVA object requesting and responding methods, devices and systems and terminal
A technology for object and request data, applied in device, JAVA object request and response method, system and terminal fields, can solve the problems that the protobuf message protocol cannot be generalized and componentized, RMI cannot meet high throughput, etc.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0082] figure 1 It is the flow chart of the first preferred embodiment of the request method of the JAVA object of the present invention, and the method includes steps:
[0083] S101, creating a request data structure, a response data structure and a request method structure;
[0084] Simultaneously generate corresponding java class by described request data structure, response data structure and request method structure;
[0085] The request data structure includes service name className, service method method and service parameter paramsDescription in string format; the response data structure includes response return code resultCode and response result string object resultDescription; the request method structure includes remote call method and Return the response data structure object;
[0086] For ease of understanding, an example is given to illustrate the process of defining a proto file describing a general business call and generating the corresponding java class as...
Embodiment 2
[0109] figure 2 It is the flow chart of the second preferred embodiment of the request method of the JAVA object of the present invention, and the method includes steps:
[0110] S201, creating a request data structure, a response data structure and a request method structure;
[0111] S202, generating a corresponding java class from the request data structure, response data structure and request method structure;
[0112] S203, loading the JAVA class, service interface, protobuf and protobuf-rpc related jar packages;
[0113] S204, calling a service and a service method corresponding to the service through the service interface;
[0114] S205. Obtain the service method in the request data structure and the service parameters invoked by the service method through the Protobuf JAVA call processor, convert the service parameters into JSON format parameters, and convert the JSON format parameters into strings parameter;
[0115] The Protobuf JAVA call processor is mainly use...
Embodiment 3
[0123] image 3 It is the flow chart of the first preferred embodiment of the response method of the JAVA object of the present invention, and the method includes steps:
[0124] S301, creating a response data structure and a request method structure;
[0125] Further, it is also necessary to create a request data structure, and generate corresponding java classes from the request data structure, response data structure and request method structure;
[0126] The server loads protobuf and protobuf-rpc related jar packages, and establishes a connection with the client through protobuf-rpc;
[0127] In addition, the server publishes the service provided to the client and the service implementation corresponding to the service through the API, JAVA annotations, and Spring configuration files, and stores the service name and service implementation of the service in the service registry;
[0128] Described service realization refers to common java class, and this class only provid...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com