Vinay,
>Paul,
>So would the right place to export an Object
>from an API standpoint be :
>
>AltrmiFactory.exposeObject(Object o);
>
You mean in the context of BEEP and the layer it represents inside AltRMI ?
I don't quite understand what you are asking here....
AltrmiFactory is a client-side class, you would not call anythin on it
to publish (exposeObject is publishig right?).
BEEP would be used to allow us to have listeners straddling two VMs.
Consider the well understood PropertyChangeListener.
Server side :
interface XyzService {
void addListener(PropertyChangeListener pcl);
}
Client side :
class MyClient implements PropertyChangeListener {
XyzService xyzService;
public MyClient() {
xyzService = lookup(".... // via AltRMI
xyzService.addListener(this);
}
public void propertyChange(PropertyChangeEvent evt) {
System.out.println("Server has performed callback - " + evt.toString());
}
}
What we see there is the client reaching out to the server as usual
(lookup), but then registering itself as a suitable listener.
Completely asynchronously, the server can call the applicable method on
the client, even if there is TCP/IP in the way. We need at least two
channels open to do this. One (as we have now) to allow the client to
invoke methods on the server and the second to allow async invokation of
methods on the client from the server.
- Paul
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>