Method, apparatus and program product for interfacing a multi-threaded, client-based API to a single-threaded, server-based API
First Claim
1. A computer controlled method for interfacing a multi-threaded application programmer interface (API), written in a first programming language and executing in a client, to a single-threaded API written in a second programming language and executing in a server, the second programming language being different from the first programming language, said method comprising steps of:
- (a) registering said client with an object factory in said server;
(b) instantiating, by the object factory, a server object in the server, the server object configured to serialize access to the single threaded API using a lock to ensure serialized access;
(c) invoking all operation provided by the multi-threaded API;
(d) communicating the operation to the server object from the multi-threaded API; and
(e) invoking the single threaded API to effectuate the operation by the server.
5 Assignments
0 Petitions
Accused Products
Abstract
Apparatus, methods and computer program products are disclosed for interfacing a client based, multi-threaded API that is written in a first programming language (such as JAVA) with a server based, single-thread API that is written in a second programming language (such as C or C++). The invention uses an object factory to generate a server object for each client. Programmed-method invocations performed on logical objects at the client are communicated to the server object. The server object processes the programmed-method invocation to perform the requested service such as providing network management information services.
-
Citations
22 Claims
-
1. A computer controlled method for interfacing a multi-threaded application programmer interface (API), written in a first programming language and executing in a client, to a single-threaded API written in a second programming language and executing in a server, the second programming language being different from the first programming language, said method comprising steps of:
-
(a) registering said client with an object factory in said server;
(b) instantiating, by the object factory, a server object in the server, the server object configured to serialize access to the single threaded API using a lock to ensure serialized access;
(c) invoking all operation provided by the multi-threaded API;
(d) communicating the operation to the server object from the multi-threaded API; and
(e) invoking the single threaded API to effectuate the operation by the server. - View Dependent Claims (2, 3, 4, 5, 6)
(f) registering said multi-threaded API with an event dispatch mechanism;
(g) receiving, by said event dispatch mechanism, an event from said single threaded API; and
(h) distributing said event to said multi-threaded API.
-
-
4. The computer controlled method of claim 3 wherein step (g) further comprises:
-
(g1) generating said event by said single threaded API; and
(g2) sending said event to said event dispatch mechanism.
-
-
5. The computer controlled method of claim 1 wherein step (a) further comprises:
-
(a1) locating said server; and
(a2) locating said object factory in said server.
-
-
6. The computer controlled method of claim 1 wherein step (e) comprises:
-
(e1) acquiring a lock on said single threaded API;
(e2) invoking said single threaded API to effectuate said operation by said server; and
(e3) releasing said lock on said single threaded API.
-
-
7. An apparatus having a central processing unit (CPU) and a memory coupled to said CPU for interfacing a multi-threaded application programmer interface (API), written in a first programming language and executing in a client, to a single threaded API, written in a second programming language, the second programming language being different from the first programming language and executing in a server, said apparatus comprises:
-
a registration mechanism configured to register said client with an object factory in said server;
an instantiation mechanism configured to instantiate a server object in said server by said object factory, said server object configured to access said single threaded API using a lock to ensure safe access by said multi-threaded API to said single threaded API;
a first invocation mechanism configured to invoke an operation provided by said multi-threaded API;
a communication mechanism configured to communicate said operation to said server object from said multi-threaded API; and
a second invocation mechanism configured to invoke said single threaded API to effectuate said operation by said server. - View Dependent Claims (8, 9, 10, 11)
an event registration mechanism configured to register said multi-threaded API with an event dispatch mechanism;
an event reception mechanism configured to receive an event generated by said single threaded API; and
an event distribution mechanism configured to distribute said event to said multi-threaded API.
-
-
10. The apparatus of claim 7 wherein the registration mechanism further comprises:
-
a server lookup mechanism configured to locate said server; and
an object factory lookup mechanism configured to locate said object factory in said server.
-
-
11. The apparatus of claim 7 wherein the second invocation mechanism comprises:
-
a lock acquisition mechanism configured to acquire a lock on said single threaded API to serialize access to said single threaded API;
a server operation mechanism configured to invoke said single threaded API to effectuate said operation by said server; and
a lock release mechanism configured to release said lock on said single threaded API.
-
-
12. A computer program product comprising:
-
a computer usable storage medium having computer readable code embodied therein for causing a computer to interface a multi-threaded application programmer interface (API), written in a first programming language and executing in a client, to a single threaded API, written in a second programming language and executing in a server, the second programming language being different from the first programming language, said computer readable code comprising;
computer readable program code configured to cause the computer to effect a registration mechanism configured to register the client with an object factory in said server;
computer readable program code configured to cause the computer to effect an instantiation mechanism configured to instantiate a server object in the server by the object factory, the server object configured to serialize access to the single threaded API using a lock to ensure serialized access;
computer readable program code configured to cause the computer to effect a first invocation mechanism configured to invoke an operation provided by the multi-threaded API;
computer readable program code configured to cause the computer to effect a communication mechanism configured to communicate said operation to said server object from said multi-threaded API; and
computer readable program code configured to cause the computer to effect a second invocation mechanism configured to invoke the single threaded API to effectuate the operation by the server. - View Dependent Claims (13, 14, 15, 16)
computer readable program code configured to cause said computer to effect an event registration mechanism configured to register said multi-threaded API with an event dispatch mechanism;
computer readable program code configured to cause said computer to effect an event reception mechanism configured to receive an event generated by said single threaded API; and
computer readable program code configured to cause said computer to effect an event distribution mechanism configured to distribute said event to said multi-threaded API.
-
-
15. The computer program product of claim 12 wherein the registration mechanism further comprises:
-
computer readable program code configured to cause said computer to effect a server lookup mechanism configured to locate said server; and
computer readable program code configured to cause said computer to effect an object factory lookup mechanism configured to locate said object factory in said server.
-
-
16. The computer program product of claim 12 wherein the second invocation mechanism comprises:
-
computer readable program code configured to cause said computer to effect a lock acquisition mechanism configured to acquire a lock on said single threaded API to serialize access to said single threaded API;
computer readable program code configured to cause said computer to effect a server operation mechanism configured to invoke said single threaded API to effectuate said operation by said server; and
computer readable program code configured to cause said computer to effect a lock release mechanism configured to release said lock on said single threaded API.
-
-
17. A method for providing a multi-threaded client application running on a client with access to services provided by a single-threaded server application running on a server, the multi-threaded client application being written in a first programming language, the single-threaded server application being written in a second programming language which is different than the first programming language, said method comprising:
-
registering said multi-threaded client application with said server;
requesting by said multi-threaded client application, an operation provided by said single-threaded server application running on said server;
instantiating a server object, in response to said requesting by said multi-threaded client application, said server object configured to provide a lock to serialize access to said single-threaded server application running on said server on behalf of said multi-threaded client application; and
invoking said operation provided by said single-threaded server application running on said server by using said instantiated server object to serialize access to said single-threaded server application on the server. - View Dependent Claims (18, 19, 20, 21, 22)
registering said multi-threaded client application with an event handler associated with said server.
-
-
20. A method as recited in claim 17, wherein said instantiated server object includes an event handler object.
-
21. A method as recited in claim 17, wherein said instantiated server object includes an exclusion lock object.
-
22. A method as recited in claim 17, wherein the instantiated server object includes a lock, a controlling thread, an operational thread, and a server event handler.
Specification