Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to write java RMI callbacks or RMI Listener or bidirectional RMI

I am writing an RMI application.

I am able to perform RMI. Data are transferring between client and server via RMI.

Client should be always up to receive/updates the server side data.

Is it possible to have a listener which can transport or notify the data updates/modification from server to clients. I mean whenever data's are updated/modified at server side,client should be automatically updated. Please let me know, if there exist any RMI Call be listener which can be used for this task.

Also, what are all the security standards to be followed while performing RMI?

How can we update server side object via client? If i need to update the server side instance, can i update it using client?

Please guide me to achieve this.

like image 286
VelNaga Avatar asked Jan 21 '26 04:01

VelNaga


1 Answers

An RMI callback is no different from an RMI server object, except that it is exported from the client instead of the server.

However it's usually an infeasible architecture due to client-side firewalls. And using a remote callback as a listener has major overheads that make it typically infeasible even within a LAN. You really don't want to do this.

The last part of your question is really about how to write a remote method call, for which you should consult the Oracle RMI Tutorial.

like image 157
user207421 Avatar answered Jan 22 '26 18:01

user207421