void OnQueryResponse(IRubyMessage message)
        {
            try {
                ResponseMessage response = ResponseMessage.ParseFrom(message.Message);
                KeyValuePair    endpoint;
                if (KeyValuePairs.Find(RubyStrings.kQueryResponseEndpointKey,
                                       response.ReponsesList, out endpoint))
                {
                    // create a new reporter using the informations of the found service.
                    reporter_ = new ServiceReporter(registry_, context_, endpoint.Value);

                    if (predicate_ != null)
                    {
                        reporter_.Start(period_, period_unit_);
                    }
                    else
                    {
                        reporter_.Start(period_, period_unit_, predicate_);
                    }
                }
            } catch (Exception e) {
                logger_.Error(
                    string.Format(R.Log_MethodThrowsException, "OnQueryResponse",
                                  kClassName), e);
            }
        }