RMI provides a way for a server object to remotely call into a registered client object by means of client side notification.
This is popularly known as the "notify when ready".
The post JDK 1.02 model is implemented in a producer consumer fashion.
That is, objects sign up with an event producer to be informed when the desired event occurs.
This is achieved by the object calling a registration method with reference to itself.
In this way the producer keeps a running list of all references to notify when the specified event occurs.
Fig 1: Producer Consumer Model of Awt
Extend this model into the RMI space and you end up with a model by which a server can make a call into a client object.
To facilitate such a client notification mechanism, five things must be provisioned for:
The client must implement an interface by which the server can call to the object
rmic must be run on the client and produced stubs must me in the clients classpath
The registry must be started on the client
The client must register itself with the local registry
The server object must be modified to handle the client registration method
Steps 3 and 4, though not needed to make the object remotely accessible, are included because the idea in this article is to make each client a fully functional remote object in itself.
Allowing other clients at a later stage to obtain a direct reference to it.
Sameer Tyagi is a Software Engineer with several years of programming experience in iNet application development and has conducted multiple training workshops in Java. Besides holding an Engineering degree in Electronics he is a Sun Certified Java 1.1 Programmer.
Email: sameertyagi@usa.net
JavaBytes
Internet Cyclone
This powerful, easy-to-use, internet optimizer is for
Windows 95, 98, ME, NT, 2000 and XP. It's designed to
automatically optimize your Windows settings, boosting your
Internet connection up to 200%.
Blackmail Applet
This applet prints out text that looks like letters cut out of a
newspaper. You can specify the text, the width and height of the
applet and the delay after each letter. Future versions will
have more parameters.
While surveys suggest that small businesses aren't prepared for ever-present security dangers, this Boston-area printer has maintained a pristine operation since a scare six years ago.