From: Roland Häder Date: Mon, 13 Jul 2009 19:15:49 +0000 (+0000) Subject: Stub call doTestQuery() added to run an initial test query X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bc764b3b79ae7aeab09247b458033703096b213c;p=hub.git Stub call doTestQuery() added to run an initial test query --- diff --git a/application/hub/main/nodes/class_BaseHubNode.php b/application/hub/main/nodes/class_BaseHubNode.php index 08e6fbdd2..92d794cc4 100644 --- a/application/hub/main/nodes/class_BaseHubNode.php +++ b/application/hub/main/nodes/class_BaseHubNode.php @@ -77,6 +77,25 @@ class BaseHubNode extends BaseHubSystem implements Updateable { return $this->nodeId; } + /** + * Setter for query instance + * + * @param $queryInstance Our new query instance + * @return void + */ + private final function setQueryInstance (Queryable $queryInstance) { + $this->queryInstance = $queryInstance; + } + + /** + * Getter for query instance + * + * @return $queryInstance Our new query instance + */ + protected final function getQueryInstance () { + return $this->queryInstance; + } + /** * Checks wether the given IP address matches one of the bootstrapping nodes * @@ -241,8 +260,11 @@ class BaseHubNode extends BaseHubSystem implements Updateable { * @return void */ protected function initGenericQueues () { - // Set it - $this->queryInstance = ObjectFactory::createObjectByConfiguredName('query_connector_class', array($this)); + // Set the query connector instance + $this->setQueryInstance(ObjectFactory::createObjectByConfiguredName('query_connector_class', array($this))); + + // Run a test query + $this->getQueryInstance()->doTestQuery(); } /**