/** * Adds the given <tt>HistoryRecord</tt> to the result list of this query and notifies all * interested listeners that a new record is received. * * @param record the <tt>HistoryRecord</tt> to add */ void addHistoryRecord(HistoryRecord record) { historyRecords.add(record); fireQueryEvent(record); }
/** * Adds the given <tt>HistoryQueryListener</tt> to the list of listeners interested in query * result changes. * * @param l the <tt>HistoryQueryListener</tt> to add */ public void addHistoryRecordsListener(HistoryQueryListener l) { synchronized (queryListeners) { queryListeners.add(l); } }