public ClientThread(Socket socket, History history, Users users) throws IOException { logger.warn("New client is trying to connect to the chat..."); logger.info("Assigning a socket to a new client..."); this.s = socket; logger.info("Getting the input stream..."); in = new DataInputStream(s.getInputStream()); logger.info("Getting the output stream..."); out = new DataOutputStream(s.getOutputStream()); this.users = users; users.addObserver(this); this.history = history; start(); logger.warn("Connection with new user is established."); }