roughly implement a messageHandler() function in Registry_Stub class to handle message communication betweetn registry stub and server.