@Override
    public synchronized void run() {
        while(true) {
            if (getSocket() == null) {
                try {
                    this.wait();
                }
                catch (InterruptedException ignored) {

                }
            }

            ByteBuffer buffer = ByteBuffer.allocate(bufferSize);
            socket.read(buffer, null, new SocketReadCompleteHandler(buffer, socket, this));

            threadPool.workComplete(this);
        }
    }