From bc764b3b79ae7aeab09247b458033703096b213c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 13 Jul 2009 19:15:49 +0000 Subject: [PATCH] Stub call doTestQuery() added to run an initial test query --- .../hub/main/nodes/class_BaseHubNode.php | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) 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(); } /** -- 2.39.5