Exercise 5.18 required the client to convert Object arguments into an array of bytes before invoking doOperation and Exercise 5.20 required the dispatcher to convert an array of bytes into an array of Objects before invoking the method. Discuss the implementation of a new version of doOperation with the following signature:
```
Object [] doOperation (RemoteObjectRef o, Method m, Object[] arguments);
```
which uses the ObjectOutputStream and ObjectInputStream classes to stream the request and reply messages between client and server over a TCP connection. How would these changes affect the design of the dispatcher?
The method DoOperation sends the invocation to the target’s remote object reference by setting up a TCP connection to the host and port specified in ref. It opens an ObjectOutputStream and uses writeObject to marshal ref, the method, m and the arguments by serializing them to an ObjectOutputStream. For the results, it opens an ObjectIntputStream and uses readObject to get the results from the stream.
At the server end, the dispatcher is given a connection to the client and opens an ObjectIntputStream and uses readObject to get the arguments sent by the client. Its signature will be:
public void dispatch(Object target, Method aMethod)
You might also like to view...
A(n) ________ repeats all data received on any port to the remaining ports; it is gradually being replaced by switches and SPAN systems
Fill in the blank(s) with correct word
What are Datapipe, Fpipe, and Netcat examples of?
a. Wrapper tools b. Trojan tools c. Backdoors d. Port redirection tools