Implemented Query and NotifyQuery.