CN104639539A - Method and device for interface calling - Google Patents
Method and device for interface calling Download PDFInfo
- Publication number
- CN104639539A CN104639539A CN201510040709.9A CN201510040709A CN104639539A CN 104639539 A CN104639539 A CN 104639539A CN 201510040709 A CN201510040709 A CN 201510040709A CN 104639539 A CN104639539 A CN 104639539A
- Authority
- CN
- China
- Prior art keywords
- interface
- message
- class
- server
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a method and a device for interface calling. The method comprises the following steps of enabling a server to obtain request information of a client end through a preset connector, and converting the request information into a message, a method name and a message type according to preset formats; according to the message type, searching for the corresponding data converter from a plurality of preset data converters, and converting the message into interface parameters; according to the method name, searching for corresponding interface information from a preset data list; according to the interface parameters and the interface information, calling a corresponding interface, and waiting for a corresponding returned object; converting the returned object into a message through the data converter, and sending the message to the client end through the connector. The method has the advantage that the effect of remote interface calling is the same as the effect of a local object calling method; the reliance on a container is avoided, the running on any processor is realized, and any communication technique can be combined, so a research and development person does not need to consider whether the interface is suitable or not, and the research and development efficiency of the research and development person is improved.
Description
Technical field
The present invention relates to interface interchange field, particularly relate to a kind of method and apparatus of interface interchange.
Background technology
The Session Border Control of EJB3.0 and EJB client call technology are a set of standard of Java about RMI.Target is the work simplifying developer, and allow exploitation staff concentration in the exploitation of business application, instead of energy is put on much loaded down with trivial details regular works, some regular works can be given Container and come.EJB, by injecting the resource of specifying oneself to need, need not write those troublesome methods again, outside is extracted in the establishment of object and acquisition, be provided the assembly of needs by external container.Like this, developer is only used in the resource defining needs at first, after just can directly use the resource of specifying, exploitation can be simplified greatly like this, because how developer only uses this object and business affairs method with care, and does not worry other ins and outs.
But EJB3.0, according to being disinclined to specific container, being exactly a set of standard of EJB3.0, only having and supporting that the application server of this container could run.Its server great majority of current support are charges, and as the Websphere of the WebLogic of Oracle, IBM, and Tomcat with the most use does not support in the industry.
The message of the transmission of EJB must be the object of Java.The interface that it provides can only be that Java calls and meets EJB specification, and its interface requirement is high, and the scope of application is few.
The server running EJB is all that requirement is higher at Install and configure.Client and service end exploitation all will meet its specification, client exploitation trouble relatively.
Summary of the invention
Main purpose of the present invention is for providing a kind of method and apparatus of the interface interchange that can run on any server of specifying.
In order to realize foregoing invention object, the invention provides a kind of method of interface interchange, comprising:
Server obtains the solicited message of client by the connector preset, and by solicited message according to transferring message, method name and type of message to by predetermined format;
From multiple default data converter, search corresponding data converter according to described type of message, and message is converted to the parameter of interface;
From the data list preset, search corresponding interface message according to described method name, call corresponding interface according to the parameter of described interface and interface message, and wait for corresponding returning an object value.
Further, described server obtains the solicited message of client by connector, and by solicited message according to before the step transferring message, method name and type of message by predetermined format to, comprising:
Server initiation, from the multiple connectors preset, searches the connector mated with type of server.
Further, the acquisition methods of described the presets list, comprising:
Server scanning initialization interface data, obtain all class files in system environments, and travel through, loading classes file;
Obtained all method of described class file by class object, travel through all method of described class and be kept in data list.
Further, described server scanning initialization interface data, obtain all class files in system environments, and travel through, before the step of loading classes file, comprising:
Server scanning initialization interface data, obtain all Jar files in system environments, and Jar file decompress(ion) are obtained the class file of decompress(ion).
Further, the described all method being obtained described class file by class object, is traveled through all method of described class and the step be kept in data list, comprising:
If described method comprises the annotation of interface, the parameter type of described method is kept in data group in order, and class object, method name and parameter type array are preserved in an object forms interface message; Using class name and method name and together with as Key, interface message, as Value, is kept in described data list.
The present invention also provides a kind of device of interface interchange, comprising:
Linkage unit, obtains the solicited message of client for the connector by presetting, and by solicited message according to transferring message, method name and type of message to by predetermined format;
Date Conversion Unit, for searching corresponding data converter from multiple default data converter according to described type of message, and converts the parameter of interface to by message;
Calling interface unit, for searching corresponding interface message according to described method name from the data list preset, calling corresponding interface according to the parameter of described interface and interface message, and waiting for corresponding returning an object value.
Further, the device of described interface interchange also comprises:
Matching unit, for server initiation, from the multiple connectors preset, searches the connector mated with type of server.
Further, the device of described interface interchange also comprises:
Scanning element, for scanning initialization interface data, obtains all class files in system environments, and travel through, loading classes file; Obtained all method of described class file by class object, travel through all method of described class and be kept in data list.
Further, described scanning element comprises:
Decompression module, for obtaining all Jar files in system environments, and obtains the class file of decompress(ion) by Jar file decompress(ion).
Further, described scanning element comprises:
Preserve module, if comprise the annotation of interface for described method, the parameter type of described method is kept in data group in order, and class object, method name and parameter type array are preserved in an object form interface message; Using class name and method name and together with as Key, interface message, as Value, is kept in described data list.
The method and apparatus of interface interchange of the present invention, preset the connector mated with type of server and carry out conversion request information, default data converter is searched according to type of message, make the message that different data converter process is different, the different host-host protocol of different connector process is connected with server, so the access that can process various given client end is called; And interface messages whole in data list predetermined system environment, when needs calling interface, directly from the presets list, search corresponding interface message, then call corresponding interface according to the parameter of interface and interface message, only need input line code during interface interchange and can complete interface interchange, without the need to doing any configuration, remote interface is called the same with the effect calling native object method, both not increasing workload, and also do not have technical requirement, is a set of technology of lightweight; Method and apparatus of the present invention does not rely on container, can run in the corresponding server being preset with corresponding connectors and data converter, the mechanics of communication can specified with any one combines, research staff is made to be absorbed in the exploitation of business application, without the need to considering the problem whether interface is adaptive, improve the efficiency of research and development of research staff.
Accompanying drawing explanation
Fig. 1 is the flow chart of the method for the interface interchange of one embodiment of the invention;
Fig. 2 is the flow chart of the acquisition data tabulating method of one embodiment of the invention;
Fig. 3 is the structural representation of the device of the interface interchange of one embodiment of the invention;
Fig. 4 is the structural representation of the scanning element of one embodiment of the invention;
Fig. 5 is the structural representation of the calling interface unit of one embodiment of the invention;
Fig. 6 is the using state schematic diagram of the device of the interface interchange of one embodiment of the invention.
The realization of the object of the invention, functional characteristics and advantage will in conjunction with the embodiments, are described further with reference to accompanying drawing.
Embodiment
Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
With reference to Fig. 1, a kind of method of interface interchange is provided in the embodiment of the present invention, comprises step:
S1, server 1 obtain the solicited message of client by the connector preset, and by solicited message according to transferring message, method name and type of message to by predetermined format;
S2, from multiple default data converter, search corresponding data converter according to described type of message, and message is converted to the parameter of interface;
S3, from the data list preset, search corresponding interface message according to method name, call corresponding interface according to the parameter of described interface and interface message, and wait for corresponding returning an object value client.
As described in above-mentioned steps S1, above-mentioned default connector refers to the connector with server 1 type matching, be preset with the connector mated with server 1, conveniently carry out conversion request information, can be message, method name and type of message by solicited message according to predetermined format conversion easily, easy-to-look-up interface message corresponding with it.
As described in above-mentioned steps S2, preset several data transducer, search corresponding data converter according to the type of message of correspondence, the conversion of data can be facilitated, without the need to carrying out the process that loaded down with trivial details data converter is arranged.
As described in above-mentioned steps S3, described default data list, refers to the data list including interface messages whole in system environments, and any one interface message can find in data list; Remote interface being called the same with the effect calling native object method, both do not increase workload, also do not have technical requirement, is a set of technology of lightweight; The interface of specifying can be called fast and accurately.If there is returning an object value, then returning an object value carried out data processing, convert message to by data converter, specify message and type of message etc. to be sent to client-server 1 being converted to by message through connector.
In one embodiment, client call client end AP I(Application Program Interface, application programming interface) (provide four parameters after 70, the URL(URL(uniform resource locator) of remote interface server 1 respectively, Uniform Resource Locator), method name---form: class name _ method name, if the parameter of method---multiple parameter, can automatically become parameter group complete), client end AP I80 selects client data transducer 70, client data transducer 70 is given the supplemental characteristic of solicited message, client data transducer 70 transfers message to supplemental characteristic, give client's side link device 60, client's side link device 60 selects HTTP(Hyper Text Transfer Protocol according to URL, HTML (Hypertext Markup Language)) server or TCP(Transmission Control Protocol, transmission control protocol) server.Server 1 obtains the solicited message of client by the connector 11 preset, and by solicited message according to transferring message, method name and type of message to by predetermined format, easy-to-look-up interface message corresponding with it; Then from multiple default data converter, search corresponding data converter 21 according to described type of message, and message is converted to the parameter of interface; Calling interface unit 30 searches corresponding interface message according to message name from the data list preset, corresponding interface is called according to the parameter of described interface and interface message, and wait for corresponding returning an object value, the data list of interface messages whole in system environments is included in the data list preset, any one interface message can find in data list, remote interface is called the same with the effect calling native object method, both workload was not increased, also not having technical requirement, is a set of technology of lightweight; Finally convert described returning an object value to message by data converter 21 and be sent to client-server 1 client through connector 11, then returning an object value is sent to client's side link device 60, client data transducer 70 by server 1, finally return the client end AP I80 of client, client end AP I80 returns to application object.
With reference to Fig. 1, in the embodiment of the present invention, before step S1, comprise step:
S1 ', server 1 initialization, from the multiple connectors preset, searches the connector with server 1 type matching.Described multiple connectors, can be whole in known connector, can be connected, also according to the type of server 1, can develop the connector obtaining specifying with the server 1 of any corresponding types.Because preset multiple connector, so without the need to carrying out too much configuration to connector, so research staff processes without the need to disperseing energy, and then improve the efficiency of research and development of research staff.
With reference to shown in Fig. 2, in the embodiment of the present invention, the acquisition methods of above-mentioned the presets list, comprising:
S21, server 1 scan initialization interface data, obtain all class files in system environments, and travel through, loading classes file, the convenient all methods obtained in class file;
S22, obtained all method of described class file by class object, travel through all method of described class and be kept in data list, all method of class is kept in data list, facilitating correspondence to search, so that dock with various request msg.
Server 1 one starts, automatic scan initialization data interface, obtains the whole class files in system environments, carries out traveling through, the process such as loading, and all method of class arranges out and is kept in described data list the most at last.Both workload was not increased, technical requirement is not had yet, do not rely on container, can run on any server 1, can combine with any one mechanics of communication, making research staff be absorbed in the exploitation of business application, without the need to considering the problem whether interface is adaptive, improving the efficiency of research and development of research staff.
In the embodiment of the present invention, above-mentioned server 1 scans initialization interface data, obtains all class files in system environments, and travels through, before the step S21 of loading classes file, comprising:
S21 ', server 1 scan initialization interface data, obtain all Jar files in system environments, and Jar file decompress(ion) is obtained the class file of decompress(ion), in system environments, class file generally can be compressed into Jar file, so need Jar file to pick out, then decompress(ion) is carried out, obtain the class file in system, and then carry out the step of S21 to 22, make interface interchange more stable and accurate.
In the embodiment of the present invention, obtain all method of described class file above by class object, travel through all method of described class and the step S22 be kept in data list, comprising:
If described method comprises the annotation of interface, the parameter type of described method is kept in data group in order, and class object, method name and parameter type array are preserved in an object forms interface message; Using class name and method name and together with as Key, interface message, as Value, is kept in described data list.Such as, the form of Key: class name _ method name, needs consistent with client.Saving interface information and Key in data list, can search accurately and call, and makes it can use on any given server 1, convenient and simple, reduces research staff's cost and complete the regular works such as pairing as possible.
In the embodiment of the present invention, call the method for corresponding interface in above-mentioned steps S3 according to the parameter of described interface and interface message, comprising:
From described interface message, obtain interface object information, and create interface object, search interface method by described method name, parameter object array is passed to interface method, calling interface.Interface method can be found accurately and rapidly.
With reference to Fig. 6, in one embodiment, for Java RMI: server 1 is when starting, automatic scan initialization interface data, all class files are obtained from system environments, then all class files are traveled through, and load this class, all methods of described class are obtained by class object, and travel through all methods of this class, if the method for described class includes the annotation of interface, the parameter type of this method is kept in data group in order, and class object, method name and parameter type array are preserved in an object, this object is called interface message, class name connection side religious name and (form: class name _ method name together, consistent with client) as Key, interface message is as Value, be kept at HashMap(Hash table) in.If system environments comprises Jar file, then obtain all Jar files in system environments, and jar file decompress(ion) is obtained the class file of decompress(ion), then these class files are traveled through, repeat class file processing procedure, after all Jar files and class file are processed, namely save whole interface messages in HashMap, scanning initialization data terminates; In initialized process, server 1 also from the multiple connectors 11 preset, can search the connector 11 with server 1 type matching.In the present embodiment, there is different connectors 11 corresponding with him for different servers 1, after server 1 receives request, IO is flowed to connector 11, connector 11 circulates IO byte arrays, message is transferred to by certain format, method name, type of message, corresponding data converter 21 is found by type of message, message is converted to the parameter of interface by data converter 21, interface message is obtained from HashMap by method name, from interface message, obtain interface parameters class array and pass to data converter 21, data converter 21 transfers parameter object array according to parameter type array to message, parameter object array and interface message are passed to calling interface unit 30, interface object information is obtained from interface message, and create object, interface method is found by method name, parameter object array is passed to interface method, calling interface, wait for interface returning an object value, if returning an object value is not empty, return and through data converter 21 to message is converted to picture, and by returning an object value type and message transmissions to connector 11, connector 11 is passed to returning an object value type and message in a fixing object, this object is transferred to message again, and message export server 1, server 1 is by the message transmissions that returns to client's side link device 60, client data transducer 70, and be finally back to the client end AP I80 of client, client end AP I80 returns to application object.
The method of interface interchange of the present invention, without the need to container, without the need to any configuration, can run on any server 1 of specifying, remote interface be called the same with the effect calling native object method, both workload was not increased, also not having technical requirement, is a set of technology of lightweight, makes research staff be absorbed in the exploitation of business application, without the need to considering the problem whether interface is adaptive, improve the efficiency of research and development of research staff.
With reference to Fig. 3 to Fig. 6, the present invention also provides a kind of device of interface interchange, comprising:
Linkage unit 10, obtains the solicited message of client for the connector by presetting, and by solicited message according to transferring message, method name and type of message to by predetermined format; The message that Date Conversion Unit 20 returns is exported to server 1;
Date Conversion Unit 20, for searching corresponding data converter from multiple default data converter according to described type of message, and converts the parameter of interface to by message; Convert the object that calling interface unit 30 returns to message;
Calling interface unit 30, for searching corresponding interface message according to method name from the data list preset, calling corresponding interface according to the parameter of described interface and interface message, and waiting for corresponding returning an object value client.
As above-mentioned linkage unit 10, the connector preset refers to the connector with server 1 type matching, be preset with the connector mated with server 1, conveniently carry out conversion request information, can be message, method name and type of message by solicited message according to predetermined format conversion easily, easy-to-look-up interface message corresponding with it.
As above-mentioned Date Conversion Unit 20, preset several data transducer, search corresponding data converter according to the type of message of correspondence, the conversion of data can be facilitated, without the need to carrying out the process that loaded down with trivial details data converter is arranged.
As above-mentioned calling interface unit 30, described default data list, refers to the data list including interface messages whole in system environments, and any one interface message can find in data list; Remote interface is called the same with the effect calling native object method, both do not increase workload, also there is no technical requirement, be a set of technology of lightweight, the interface of specifying can be called fast and accurately; If there is returning an object value, then returning an object value carried out data processing, convert message to by data converter, specify message and type of message etc. to be sent to server 1 being converted to by message through connector.
In one embodiment, (four parameters are provided after client call client end AP I80, the URL of remote interface server 1 respectively, method name---form: class name _ method name, if the parameter of method---multiple parameter, can automatically become parameter group complete), client end AP I80 selects client data transducer 70, client data transducer 70 is given the supplemental characteristic of solicited message, client data transducer 70 transfers message to supplemental characteristic, give client's side link device 60, client's side link device 60 selects http server or TCP server according to URL.The linkage unit 10 of server 1 obtains the solicited message of client by the connector 11 preset, and by solicited message according to transferring message, method name and type of message to by predetermined format, easy-to-look-up interface message corresponding with it; Then from multiple default data converter, search corresponding data converter 21 by Date Conversion Unit 20 according to described type of message, and message is converted to the parameter of interface; Calling interface unit 30 searches corresponding interface message according to message name from the data list preset, corresponding interface is called according to the parameter of described interface and interface message, and wait for corresponding returning an object value, the data list of interface messages whole in system environments is included in the data list preset, any one interface message can find in data list, remote interface is called the same with the effect calling native object method, both workload was not increased, also not having technical requirement, is a set of technology of lightweight; Finally, convert described returning an object value to message by data converter 21 and be sent to client-server 1 through connector 11, returning an object value is sent to client's side link device 60, client data transducer 70 by client then server 1, finally return the client end AP I80 of client, client end AP I80 returns to application returning an object value.
In the embodiment of the present invention, the device of above-mentioned interface interchange also comprises:
Matching unit 50, for server 1 initialization, from the multiple connectors preset, searches the connector with server 1 type matching.Described multiple connectors, can be whole in known connector, can be connected, also according to the type of server 1, can develop the connector obtaining specifying with the server 1 of any corresponding types.Because preset multiple connector, so without the need to carrying out too much configuration to connector, so research staff processes without the need to disperseing energy, and then improve the efficiency of research and development of research staff.
In the embodiment of the present invention, the device of above-mentioned interface interchange also comprises:
Scanning element 40, for scanning initialization interface data, obtains all class files in system environments, and travel through, loading classes file, the convenient all methods obtained in class file; Obtained all method of described class file by class object, travel through all method of described class and be kept in data list, all method of class is kept in data list, facilitating correspondence to search, so that dock with various request msg.
Server 1 one starts, automatic scan initialization data interface, obtains the whole class files in system environments, carries out traveling through, the process such as loading, and all method of class arranges out and is kept in described data list the most at last.Both workload was not increased, technical requirement is not had yet, do not rely on container, can run on any server 1, can combine with any one mechanics of communication, making research staff be absorbed in the exploitation of business application, without the need to considering the problem whether interface is adaptive, improving the efficiency of research and development of research staff.
In the embodiment of the present invention, above-mentioned scanning element 40 comprises: decompression module 41, for scanning initialization interface data, obtaining all Jar files in system environments, and Jar file decompress(ion) being obtained the class file of decompress(ion).In system environments, class file generally can be compressed into Jar file, so need Jar file to pick out, then carries out decompress(ion), obtains the class file in system, and then carry out the processing procedure of class file, makes interface interchange more stable and accurate.
In the embodiment of the present invention, above-mentioned scanning element 40 comprises: preserve module 42, if comprise the annotation of interface for described method, the parameter type of described method is kept in data group in order, and class object, method name and parameter type array are preserved in an object forms interface message; Using class name and method name and together with as Key, interface message, as Value, is kept in described data list.Such as, the form of Key: class name _ method name, needs consistent with client.Saving interface information and Key in data list, can search accurately and call, and makes it can use on any server 1 of specifying, convenient and simple, reduces research staff's cost and complete the regular works such as pairing as possible.
In the embodiment of the present invention, above-mentioned calling interface unit 30, comprise: calling module 31, for obtaining interface object information from described interface message, and create interface object, search interface method by described method name, parameter object array is passed to interface method, calling interface, can find interface method accurately and rapidly.
With reference to Fig. 6, in one embodiment, for Java RMI: server 1 is when starting, scanning element 40 automatic scan initialization interface data, all class files are obtained from system environments, then all class files are traveled through, and load this class, all methods of described class are obtained by class object, and travel through all methods of this class, if the method for described class includes the annotation of interface, the parameter type of this method is kept in data group in order, and class object, method name and parameter type array are preserved in an object, this object is called interface message, class name connection side religious name and (form: class name _ method name together, consistent with client) as Key, interface message is as Value, be kept in HashMap.If system environments comprises Jar file, then obtain all Jar files in system environments, and jar file decompress(ion) is obtained the class file of decompress(ion), then travel through these class files, repeat class file processing procedure.After all Jar files and class file are processed, namely save whole interface messages in HashMap, scanning initialization data terminates; In initialized process, matching unit also from the multiple connectors 11 preset, can search the connector 11 with server 1 type matching.In the present embodiment, have different connector 11 corresponding with his, after linkage unit 10 receives request, IO is flowed to connector 11 for different servers 1, connector 11 circulates IO byte arrays, transfers message to, method name, type of message by certain format, Date Conversion Unit 20 finds corresponding data converter 21 by type of message, and message is converted to the parameter of interface, calling interface unit 30 obtains interface message by method name from HashMap, from interface message, obtain interface parameters class array and pass to data converter 21, data converter 21 transfers parameter object array according to parameter type array to message, parameter object array and interface message are passed to calling interface unit 30, the class of calling interface unit 30 calling interface information interface also creates object, interface method is found by method name, parameter object array is passed to interface method, calling interface, wait for interface returning an object value, if returning an object value is not empty, return and through data converter 21 to message is converted to picture, and by returning an object value type and message transmissions to connector 11, connector 11 is passed to returning an object value type and message in a fixing object, this object is transferred to message again, and message export server 1, server 1 is by the message transmissions that returns to client's side link device 60, client data transducer 70, and be finally back to the client end AP I80 of client, client end AP I80 returns to application object.
The device of interface interchange of the present invention, without the need to container, without the need to any configuration, can run on any server 1 of specifying, remote interface be called the same with the effect calling native object method, both workload was not increased, also not having technical requirement, is a set of technology of lightweight, makes research staff be absorbed in the exploitation of business application, without the need to considering the problem whether interface is adaptive, improve the efficiency of research and development of research staff.
The foregoing is only the preferred embodiments of the present invention; not thereby the scope of the claims of the present invention is limited; every utilize specification of the present invention and accompanying drawing content to do equivalent structure or equivalent flow process conversion; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.
Claims (10)
1. a method for interface interchange, is characterized in that, comprising:
Server obtains the solicited message of client by the connector preset, and by solicited message according to transferring message, method name and type of message to by predetermined format;
From multiple default data converter, search corresponding data converter according to described type of message, and message is converted to the parameter of interface;
From the data list preset, search corresponding interface message according to described method name, call corresponding interface according to the parameter of described interface and interface message, and wait for corresponding returning an object value.
2. the method for interface interchange according to claim 1, it is characterized in that, described server obtains the solicited message of client by the connector preset, and by solicited message according to before the step transferring message, method name and type of message by predetermined format to, comprising:
Server initiation, from the multiple connectors preset, searches the connector mated with type of server.
3. the method for interface interchange according to claim 1, is characterized in that, the acquisition methods of described the presets list, comprising:
Server scanning initialization interface data, obtain all class files in system environments, and travel through, loading classes file;
Obtained all method of described class file by class object, travel through all method of described class and be kept in data list.
4. the method for interface interchange according to claim 3, is characterized in that, described server scanning initialization interface data, obtain all class files in system environments, and travels through, before the step of loading classes file, comprising:
Server scanning initialization interface data, obtain all Jar files in system environments, and Jar file decompress(ion) are obtained the class file of decompress(ion).
5. the method for interface interchange according to claim 3, is characterized in that, the described all method being obtained described class file by class object, travels through all method of described class and the step be kept in data list, comprising:
If described method comprises the annotation of interface, the parameter type of described method is kept in data group in order, and class object, method name and parameter type array are preserved in an object forms interface message; Using class name and method name and together with as Key, interface message, as Value, is kept in described data list.
6. a device for interface interchange, is characterized in that, comprising:
Linkage unit, obtains the solicited message of client for the connector by presetting, and by solicited message according to transferring message, method name and type of message to by predetermined format;
Date Conversion Unit, for searching corresponding data converter from multiple default data converter according to described type of message, and converts the parameter of interface to by message; Calling interface unit, for searching corresponding interface message according to described method name from the data list preset, calling corresponding interface according to the parameter of described interface and interface message, and waiting for corresponding returning an object value.
7. the device of interface interchange according to claim 6, is characterized in that, also comprises:
Matching unit, for server initiation, from the multiple connectors preset, searches the connector mated with type of server.
8. the device of interface interchange according to claim 6, is characterized in that, also comprises:
Scanning element, for scanning initialization interface data, obtains all class files in system environments, and travel through, loading classes file; Obtained all method of described class file by class object, travel through all method of described class and be kept in data list.
9. the device of interface interchange according to claim 8, is characterized in that, described scanning element comprises:
Decompression module, for obtaining all Jar files in system environments, and obtains the class file of decompress(ion) by Jar file decompress(ion).
10. the device of interface interchange according to claim 8, is characterized in that, described scanning element comprises:
Preserve module, if comprise the annotation of interface for described method, the parameter type of described method is kept in data group in order, and class object, method name and parameter type array are preserved in an object form interface message; Using class name and method name and together with as Key, interface message, as Value, is kept in described data list.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510040709.9A CN104639539B (en) | 2015-01-27 | 2015-01-27 | The method and apparatus that interface calls |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510040709.9A CN104639539B (en) | 2015-01-27 | 2015-01-27 | The method and apparatus that interface calls |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104639539A true CN104639539A (en) | 2015-05-20 |
CN104639539B CN104639539B (en) | 2018-05-18 |
Family
ID=53217853
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510040709.9A Expired - Fee Related CN104639539B (en) | 2015-01-27 | 2015-01-27 | The method and apparatus that interface calls |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104639539B (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105824926A (en) * | 2016-03-17 | 2016-08-03 | 浪潮通用软件有限公司 | Method for dynamically selecting and calling external system interface |
CN106603593A (en) * | 2015-10-15 | 2017-04-26 | 北京京东尚科信息技术有限公司 | HTTP calling method and device based on adaption |
CN106648565A (en) * | 2015-10-30 | 2017-05-10 | 北京国双科技有限公司 | Request sending method and apparatus |
CN106790325A (en) * | 2015-11-20 | 2017-05-31 | 北京神州泰岳软件股份有限公司 | A kind of method and system of accessing network equipment |
CN107483559A (en) * | 2017-07-27 | 2017-12-15 | 北京小米移动软件有限公司 | The offer method and device of SDK services |
CN107577629A (en) * | 2017-09-25 | 2018-01-12 | 北京因特睿软件有限公司 | A kind of data-interface processing method, device, server and medium |
CN107577590A (en) * | 2016-07-04 | 2018-01-12 | 北京奇虎科技有限公司 | Method and device based on database service real-time calling virtual interface |
CN108241503A (en) * | 2016-12-23 | 2018-07-03 | 北京国双科技有限公司 | The generation method and device of explanatory notes |
CN108595479A (en) * | 2018-03-13 | 2018-09-28 | 泰安协同软件有限公司 | Web request processing method based on unified Web entrances |
CN108712481A (en) * | 2018-05-04 | 2018-10-26 | 广东电网有限责任公司 | A kind of communication means and device based on secure accessing area |
CN110647415A (en) * | 2019-08-14 | 2020-01-03 | 平安科技(深圳)有限公司 | Database detection method, device and equipment and computer readable storage medium |
CN111258723A (en) * | 2019-12-05 | 2020-06-09 | 东软集团股份有限公司 | Transaction processing method, device, system, medium and equipment of distributed system |
CN111580987A (en) * | 2020-04-21 | 2020-08-25 | 深圳市优必选科技股份有限公司 | Remote procedure calling method and device, storage medium and terminal equipment |
CN114385263A (en) * | 2022-01-11 | 2022-04-22 | 中国民航信息网络股份有限公司 | Interface calling method and device, electronic equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103164270A (en) * | 2011-12-12 | 2013-06-19 | 阿里巴巴集团控股有限公司 | Java system application programming interface calling method and system using the same |
CN103913294A (en) * | 2014-03-20 | 2014-07-09 | 西安交通大学 | Reticle increment calibration method for laser galvanometer system |
-
2015
- 2015-01-27 CN CN201510040709.9A patent/CN104639539B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103164270A (en) * | 2011-12-12 | 2013-06-19 | 阿里巴巴集团控股有限公司 | Java system application programming interface calling method and system using the same |
CN103913294A (en) * | 2014-03-20 | 2014-07-09 | 西安交通大学 | Reticle increment calibration method for laser galvanometer system |
Non-Patent Citations (1)
Title |
---|
陈桦,等: "Java远程方法调用(RMI)技术及实现方法", 《计算机系统应用》 * |
Cited By (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106603593A (en) * | 2015-10-15 | 2017-04-26 | 北京京东尚科信息技术有限公司 | HTTP calling method and device based on adaption |
CN106648565A (en) * | 2015-10-30 | 2017-05-10 | 北京国双科技有限公司 | Request sending method and apparatus |
CN106790325B (en) * | 2015-11-20 | 2020-07-10 | 北京神州泰岳软件股份有限公司 | Method and system for accessing network equipment |
CN106790325A (en) * | 2015-11-20 | 2017-05-31 | 北京神州泰岳软件股份有限公司 | A kind of method and system of accessing network equipment |
CN105824926A (en) * | 2016-03-17 | 2016-08-03 | 浪潮通用软件有限公司 | Method for dynamically selecting and calling external system interface |
CN107577590A (en) * | 2016-07-04 | 2018-01-12 | 北京奇虎科技有限公司 | Method and device based on database service real-time calling virtual interface |
CN107577590B (en) * | 2016-07-04 | 2023-12-05 | 北京奇虎科技有限公司 | Method and device for calling virtual interface in real time based on database service |
CN108241503A (en) * | 2016-12-23 | 2018-07-03 | 北京国双科技有限公司 | The generation method and device of explanatory notes |
CN107483559A (en) * | 2017-07-27 | 2017-12-15 | 北京小米移动软件有限公司 | The offer method and device of SDK services |
CN107483559B (en) * | 2017-07-27 | 2020-09-11 | 北京小米移动软件有限公司 | SDK service providing method and device |
CN107577629A (en) * | 2017-09-25 | 2018-01-12 | 北京因特睿软件有限公司 | A kind of data-interface processing method, device, server and medium |
CN107577629B (en) * | 2017-09-25 | 2019-12-31 | 北京因特睿软件有限公司 | Data interface processing method, device, server and medium |
CN108595479B (en) * | 2018-03-13 | 2021-07-27 | 泰安协同软件有限公司 | Web request processing method based on unified Web gateway |
CN108595479A (en) * | 2018-03-13 | 2018-09-28 | 泰安协同软件有限公司 | Web request processing method based on unified Web entrances |
CN108712481A (en) * | 2018-05-04 | 2018-10-26 | 广东电网有限责任公司 | A kind of communication means and device based on secure accessing area |
CN110647415A (en) * | 2019-08-14 | 2020-01-03 | 平安科技(深圳)有限公司 | Database detection method, device and equipment and computer readable storage medium |
CN111258723A (en) * | 2019-12-05 | 2020-06-09 | 东软集团股份有限公司 | Transaction processing method, device, system, medium and equipment of distributed system |
CN111258723B (en) * | 2019-12-05 | 2024-03-19 | 东软集团股份有限公司 | Transaction processing method, device, system, medium and equipment of distributed system |
CN111580987A (en) * | 2020-04-21 | 2020-08-25 | 深圳市优必选科技股份有限公司 | Remote procedure calling method and device, storage medium and terminal equipment |
CN114385263A (en) * | 2022-01-11 | 2022-04-22 | 中国民航信息网络股份有限公司 | Interface calling method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN104639539B (en) | 2018-05-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104639539A (en) | Method and device for interface calling | |
CN105721473A (en) | WEB side remote invoking optimizing method and system | |
CN105718540B (en) | Data loading method and device | |
CN112114979A (en) | Remote procedure call method and device | |
US8332539B2 (en) | Binary data serialization system using machine dependant data alignment | |
CN108337236A (en) | A kind of gRPC call methods and device based on Protobuf and HTTP/1.1 | |
US20140372970A1 (en) | Method to auto generate jax-rs rest service implementation classes from existing interfaces | |
CN109257337B (en) | Internet of things equipment protocol conversion method and lamp pole operation platform based on same | |
CN111625585B (en) | Access method, device, host and storage medium of hardware acceleration database | |
CN111443909B (en) | Method and device for generating page | |
US11689626B2 (en) | Transport channel via web socket for ODATA | |
CN112418427A (en) | Method, device, system and equipment for providing deep learning unified reasoning service | |
CN110928545B (en) | Component distribution method, development method and device of single-page application and storage medium | |
CN113992641B (en) | Data processing method, device, equipment and storage medium | |
CN110062035A (en) | A kind of http request method and apparatus based on deque | |
US9077764B2 (en) | Communications handles and proxy agents | |
US20100198947A1 (en) | System and Method for Dynamically Processing Electronic Data Between Multiple Data Sources | |
US20110321022A1 (en) | Code generation through metadata programming for mobile devices and web platforms to ease access to web services | |
CN111937366B (en) | Web request processing method and device | |
CN103618791A (en) | WEB reverse proxy method, device and system supporting XSLT file | |
US6850972B1 (en) | Image transfer system and image transfer method | |
CN110191169A (en) | Data processing method and device | |
CN113779122A (en) | Method and apparatus for exporting data | |
CN105677750A (en) | Data acquiring method and apparatus | |
CN111274466A (en) | Non-structural data acquisition system and method for overseas server |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180518 Termination date: 20190127 |
|
CF01 | Termination of patent right due to non-payment of annual fee |