public void cycle() {
        try {
            String userInput = reader.readLine();
            if (null != userInput) {
                listener.onMessage(userInput);
            }
        } catch (IOException e) {
            error.onException(e);
        }

    }