@Override
  public void run() {
    
    try {
        is = new ObjectInputStream(clientSocket.getInputStream());

        
        try {
            Object o = is.readObject();
            if (o instanceof StorageNodeMetadata) {
                StorageNodeMetadata m = null;
                m = (StorageNodeMetadata) o;

                synchronized(Client.countLock) {
                    Client.storageNodePort = m.getPort();
                    Client.countLock.notify();
                }
            }
            if (o instanceof String){
                String s = (String) o;
                synchronized(Client.countLock) {
                    Client.getResult = s;
                    Client.countLock.notify();
                }
                
            }
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(ClientThread.class.getName()).log(Level.SEVERE, null, ex);
        }
      
        is.close();
      clientSocket.close();
    } catch (IOException e) {
    }
  }