Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Problem 2

State whether each of the following is true or false. If false, explain why. a) Not starting the RMI registry before attempting to bind the remote object to the registry results in a RuntimeException refusing connection to the registry. b) Every remote method must be part of an interface that extends java.rmi.Remote. c) The stubcompiler creates a stub class that performs the networking which allows the client to connect to the server and use the remote object’s methods. d) Class UnicastRemoteObject provides basic functionality required by remote objects. e) An object of a class that implements interface Serializable can be registered as a remote object and receive a remote method call. f) All methods in a Remote interface must have a throws clause indicating the potential for a RemoteException. g) RMI clients assume that they should connect to port 80 on a server computer when attempting to locate a remote object through the RMI registry. h) Once a remote object is bound to the RMI registry with method bind or rebind of class Naming, the client can look up the remote object with Naming method lookup. i) Method find of class Naming interacts with the RMI registry to help the client obtain a reference to a remote object so the client can use the remote object’s services.

Problem 5

Visit the NWS Web site for the format of each line of information. Next, modify class WeatherServiceImpl to implement the new features of the interface. Finally, modify class WeatherServiceClient to allow the user to select the weather forecast for either day. Modify the support classes WeatherBean and WeatherItem as necessary to support the changes to classes WeatherServiceImpl and WeatherServiceClient.

Problem 9

(Remote Phone Book Server) Create a remote phone book server that maintains a file of names and phone numbers. Define interface PhoneBookServer with the following methods: public PhoneBookEntry[] getPhoneBook() public void addEntry( PhoneBookEntry entry ) public void modifyEntry( PhoneBookEntry entry ) public void deleteEntry( PhoneBookEntry entry ) Create Activatable remote object class PhoneBookServerImpl, which implements interface PhoneBookServer. Class PhoneBookEntry should contain String instance variables that represent the first name, last name and phone number for one person. The class should also provide appropriate set/get methods and perform validation on the phone number format. Remember that class PhoneBookEntry also must implement Serializable, so that RMI can serialize objects of this class.

Problem 10

Class PhoneBookClient should provide a user interface that allows the user to scroll through entries, add a new entry, modify an existing entry and delete an existing entry. The client and the server should provide proper error handling (e.g., the client cannot modify an entry that does not exist).

Access millions of textbook solutions in one place

  • Access over 3 million high quality textbook solutions
  • Access our popular flashcard, quiz, mock-exam and notes features
  • Access our smart AI features to upgrade your learning
Get Vaia Premium now
Access millions of textbook solutions in one place

Recommended explanations on Computer Science Textbooks