Basic HTML version of Foils prepared 3 Feb 98

Foil 11 Define the constructor for the remote object

From Overview of Distributed Objects and RMI in Java 1.1 ARL Database Tutorial and CPS616 -- February 98. by Nancy McCracken


1 Creating an instance of this class calls the constructor in the same way as for a normal local class. The constructor initializes instance variables of the class.
2 In this case, we also call the constructor of the parent class by using the keyword "super". This call starts the server of the unicastremoteobject listening for requests on the incoming socket. Note that an implementation class must always be prepared to throw an exception if communication resources are not available. private String name; //instance variable public HelloImpl (String s) throws java.rmi.RemoteException { super(); name = s; }

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Nov 29 1998