public void run() {
HPIServerProtocol serverProtocol = null;
try {
serverProtocol = new HPIServerProtocol(this.socket);
Request clientRequest = serverProtocol.readRequest();
Response response = null;
// deciding the correct request
if (clientRequest instanceof LoginRequest) { // login request
response = this.doLogin((LoginRequest) clientRequest);
} else if (clientRequest instanceof ListInvokersRequest) { // list invokers request