public void run() {
            lock.lock();
            try {
                while(!awaitingResponse.isEmpty()) {
                    List<StubConnection> gotResponse = getWaitingResponses();
                    if(!awaitingResponse.isEmpty() && gotResponse.isEmpty()) {
                        try {
                            notEmpty.await();
                        } catch(InterruptedException e) {
                            return;
                        }
                        continue;
                    }
                    
                    for(StubConnection conn: gotResponse) {
                        awaitingResponse.remove(conn);

                        fireCompleted(conn);
                        try {
                            conn.executeResponse();
                        } catch(IOException e) {
                            e.printStackTrace();
                        }
                    }

                }
            } finally {
                lock.unlock();
            }
        }