Define a class whose instances represent remote object references. It should contain information and should provide access methods needed by the request- reply protocol. Explain how each of the access methods will be used by that protocol. Give a justification for the type chosen for the instance variable containing information about the interface of the remote object.
What will be an ideal response?
```
class RemoteObjectReference{
private InetAddress ipAddress;
private int port;
private int time;
private int objectNumber;
private Class interface;
public InetAddress getIPaddress() ( return ipAddress;}
public int getPort() { return port;);
}
```
The server looks up the client port and IP address before sending a reply.
The variable interface is used to recognize the class of a remote object when the reference is passed as an argument or result. explains that proxies are created for communication with remote objects. A proxy needs to implement the remote interface. If the proxy name is constructed by adding a standard suffix to the interface name and all we need to do is to construct a proxy from a class already available, then its string name is sufficient. However, if we want to use reflection to construct a proxy, an instance of Class would be needed. CORBA uses a third alternative.
You might also like to view...
Which of the following will not help prevent infinite loops?
a. Include braces around the statements in a do…while statement. b. Ensure that the header of a for or while statement is not followed by a semicolon. c. If the loop is counter-controlled, the body of the loop should increment or decrement the counter as needed. d. If the loop is sentinel-controlled, ensure that the sentinel value is input eventually.
____ are the various printing-related services performed before ink actually is put on the printed page.
a. Service tasks b. Image setter tasks c. Prepress tasks d. none of the above
Assuming four bytes for an int, and a column size of 4, if val is an int array, the array element val[1][3] is located at an offset of ____ bytes from the start of the array.
A. 4 B. 12 C. 16 D. 28
Which item below is the standard security checklist against which systems are evaluated for a security posture?
A. profile B. threat C. control D. baseline