dcsimg
RMI callback
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   ranadhir_nag
Posted On:   Wednesday, January 10, 2007 10:38 AM

We have a local RMI server which provides for clients to register for callback. public void registerForNotification(Notifiable n){ clientList.addElement(n); } The client is an Applet which implements Notifiable,and exports itself to the registry: Registry registry = LocateRegistry.getRegistry(RMIInterface.REGISTRY_PORT); RMIInterface remoteReference = (RMIInterface) registry.lookup(RMIInterface.REGISTRY_NAME); try { UnicastRemoteObject.exportObject(this); remoteReference.registerForNotification(this); } catch(RemoteException re) { re.printStackTrace(); } ...... The client receives the server callbacks    More>>

We have a local RMI server which provides for clients to register for callback.

public void registerForNotification(Notifiable n){
clientList.addElement(n);
}

The client is an Applet which implements Notifiable,and exports itself to the registry:

Registry registry =
LocateRegistry.getRegistry(RMIInterface.REGISTRY_PORT);
RMIInterface remoteReference =
(RMIInterface) registry.lookup(RMIInterface.REGISTRY_NAME);

try {

UnicastRemoteObject.exportObject(this);
remoteReference.registerForNotification(this);
}
catch(RemoteException re) {
re.printStackTrace();
}
......

The client receives the server callbacks sucessfully - but the client stub has to be available at both the client and server.
Is there some way to make this work with the client stub available only as part of the server process?

   <<Less

Re: RMI callback

Posted By:   Edward_Harned  
Posted On:   Wednesday, January 10, 2007 12:36 PM

1. Cross posting is a no, no. You put this in the JavaRanch forum


2. Learn how to format your questions. See the posting guidlines, below.

About | Sitemap | Contact