The stub flushes the stream and waits for the returned value by
invoking:
- void waitRemoteRetVoid()
- int waitRemoteRetInt()
- double waitRemoteRetDouble()
- boolean waitRemoteRetBoolean()
- Object waitRemoteRetObject()
depending on the type of the value returned.