@Override
     public void run() {
        while(true){
            try {
                // Create input and output streams for this client.
                ObjectInputStream is = new ObjectInputStream(clientSocket.getInputStream()); 
                
                
                while (true) {
                    if (parseObject(is.readObject()) == 1)
                        break;
                }
                
                is.close();
                
                clientSocket.close();
            } catch (IOException e) {
            } catch (ClassNotFoundException ex) {
                Logger.getLogger(LoadBalancerThread.class.getName()).log(Level.SEVERE, null, ex);
            } catch (InterruptedException ex) {
                Logger.getLogger(LoadBalancerThread.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
     }