| Author |
How does server call clinet methods?
|
Elven Cao
Greenhorn
Joined: Sep 02, 2003
Posts: 2
|
|
|
I want to pass data between server and client. In RMI, client can call remote server methods, but how can server call client methods?
|
 |
Michael Ernest
High Plains Drifter
Sheriff
Joined: Oct 25, 2000
Posts: 7292
|
|
By reversing the normal process of passing a stub. A server isn't so much a machine or a process -- it's a role that a program can play in a distributed environment. In this sense with RMI, a server is any process that exports a stub that can be passed to a client for use. A client is any process that is "aware" of the service interface and will use the stub to call on a server's methods. A typical scenario might look like this: 1) One client process calls a server process and gets a stub. 2) The "initial client" passes a stub to the "initial server" as a parameter via one of the server's exported methods. 3) The initial server calls on the initial client via one of its exported methods, passing data as a parameter. High-level view, but I hope it gives you the gist.
|
Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
|
 |
 |
|
|
subject: How does server call clinet methods?
|
|
|