摘要 |
The invention provides a mechanism for distributing objects from a object oriented framework that permits method invocation and state information notification, such as event notification in a JavaBeans software component model. A code generation tool generates code from an existing server object that contains only application domain specific logic, to support deployment of the server object on a remote machine in a distributed application. The generated code includes a proxy class to reside locally with a client program that might invoke methods on the server object or receive notification of state information (events) from the server object, and a proxy class to be remotely deployed with the server object. The proxies created provide all the middleware specific logics. More importantly, the proxy on the client side contains all of the public methods, properties and event interfaces of the server object, so that a client program using this proxy can invoke the server object's methods and register to receive notification of state information on the proxy as if it were interacting locally with the server object. A proxy on the server side communicates the client program's method invocations and registrations to receive event notifications to the server object as if this proxy were a local client. When an event notification is issued by the server object, it is received by the proxy on the client side which transmits the notification through the middleware of the distributed application to the proxy on the client side. The proxy on the client side overrides the identification of the source of the notification, substituting itself, to receive any requests for data on the state information from the client program, but then delegates such requests to the object containing the state information to be fulfilled.
|