Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, I really need help with this ASAP as it is due tonight. It has to do with concepts of RMI design. Please answer them

Hello, I really need help with this ASAP as it is due tonight. It has to do with concepts of RMI design. Please answer them all as it is a set of questions and the square boxes mean multiple answers are possible. As always, I upvote answers! Thanks. In these questions, clientMethod is a method defined in programmer-defined client class ClientClass, which is part of the client program ClientProgram. serverMethod is a method defined in programmer-defined server class ServerClass, which is part of the server program ServerProgram. ClientProgram and ServerProgram are run in separate processes, ClientProcess and ServerProcess. clientMethod, executing in clientObject, an instance of ClientClass, makes a remote call to serverMethod in serverObject, an instance of ServerClass, through a proxy proxyObject for serverObject retrieved from RMIRegistry. Here, a proxy p for object o forwards some of the methods invoked on it to o.

image text in transcribed

image text in transcribedimage text in transcribed

image text in transcribed

Question 1 of 9 3 Points The call to serverMethod may not succeed True False Question 2 of 9 Points It is possible to write code in ClientProgram and ServerProgram to ensure that the call to serverMethod always succeeds. OTrue False Reset Selection Question 3 of 9 10 Points How does a client receive results of method calls and learn about errors? OA. The call to serverMethod waits for the remote call to finish and returns the result or throws a checked exception. O B. The call to serverMethod waits for the remote call to finish and returns the result or throws an unchecked exception C. The call to serverMethod does not wait for the remote call to finish and the RMI system calls a notification method in ClientProgram to return the result or indicate failure. Question 4 of 9 10 Points The call to serverMethod occurs OA. at least once. OB. at most once. OC. exactly once. OD. none of the above. Question 5 or 9 12 Points Constraints on serverMethod OA. serverMethod can be an arbitrary method of ServerClass. OB. serverMethod must be declared in an interface or class that is a subtype of (extends or implements) a predefined Java interface OC. serverMethod must be declared in an interface or class that is a subtype of (extends or implements) a programmer-defined Java intertace. 0 D. none of the above Reset Selection Question 6 of 9 10 Points The header of serverMethod in ServerClass must throw OA. a predefined checked exception B. a predefined checked or unchecked exception C, a programmer-defined checked exception D. a programmer-defined checked or unchecked exception OE E. None of the above Question 7 of 9 15 Points The predefined export operation throws an exception if A. The exported object is not an instance or Remote B. Some interace of the exported object has a method header that does not throw RemoteException. C. Some interface of the exported object is a subtype of Remote has a method header that does not throw RemoteException. D. No method header declared or inherited by the class of the exported object throws RemoteException. E. None of the above Question 8 of 9 10 Points proxyObject and serverObject must be (direct or indirect) instances of A. a common programmer-defined class B. a common programmer-defined interface .none or the above Question 9 of 9 12 Points Which are true A. serverObject can be an instance of an interface of which proxyObject is not an instance B. proxyObject can be an instance of an intertace of which serverObject is not an instance. c. serverobject can be an instance of a class of which proxyObject is not an instance. D. proxyObject can be an instance of a class of which serverObject is not an instance. Question 1 of 9 3 Points The call to serverMethod may not succeed True False Question 2 of 9 Points It is possible to write code in ClientProgram and ServerProgram to ensure that the call to serverMethod always succeeds. OTrue False Reset Selection Question 3 of 9 10 Points How does a client receive results of method calls and learn about errors? OA. The call to serverMethod waits for the remote call to finish and returns the result or throws a checked exception. O B. The call to serverMethod waits for the remote call to finish and returns the result or throws an unchecked exception C. The call to serverMethod does not wait for the remote call to finish and the RMI system calls a notification method in ClientProgram to return the result or indicate failure. Question 4 of 9 10 Points The call to serverMethod occurs OA. at least once. OB. at most once. OC. exactly once. OD. none of the above. Question 5 or 9 12 Points Constraints on serverMethod OA. serverMethod can be an arbitrary method of ServerClass. OB. serverMethod must be declared in an interface or class that is a subtype of (extends or implements) a predefined Java interface OC. serverMethod must be declared in an interface or class that is a subtype of (extends or implements) a programmer-defined Java intertace. 0 D. none of the above Reset Selection Question 6 of 9 10 Points The header of serverMethod in ServerClass must throw OA. a predefined checked exception B. a predefined checked or unchecked exception C, a programmer-defined checked exception D. a programmer-defined checked or unchecked exception OE E. None of the above Question 7 of 9 15 Points The predefined export operation throws an exception if A. The exported object is not an instance or Remote B. Some interace of the exported object has a method header that does not throw RemoteException. C. Some interface of the exported object is a subtype of Remote has a method header that does not throw RemoteException. D. No method header declared or inherited by the class of the exported object throws RemoteException. E. None of the above Question 8 of 9 10 Points proxyObject and serverObject must be (direct or indirect) instances of A. a common programmer-defined class B. a common programmer-defined interface .none or the above Question 9 of 9 12 Points Which are true A. serverObject can be an instance of an interface of which proxyObject is not an instance B. proxyObject can be an instance of an intertace of which serverObject is not an instance. c. serverobject can be an instance of a class of which proxyObject is not an instance. D. proxyObject can be an instance of a class of which serverObject is not an instance

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions