public QHandler(IPAddress queryIP, Query query) { this.query = query; query.setIP(queryIP); // set IPAddress of query }