]> git.mxchange.org Git - hub.git/commitdiff
Stub call doTestQuery() added to run an initial test query
authorRoland Häder <roland@mxchange.org>
Mon, 13 Jul 2009 19:15:49 +0000 (19:15 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 13 Jul 2009 19:15:49 +0000 (19:15 +0000)
application/hub/main/nodes/class_BaseHubNode.php

index 08e6fbdd2adbeeec59fa092fca723e3b5b5f81a9..92d794cc4b89a450bb7b53259dcf78cf6cce5a46 100644 (file)
@@ -77,6 +77,25 @@ class BaseHubNode extends BaseHubSystem implements Updateable {
                return $this->nodeId;
        }
 
                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
         *
        /**
         * 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 () {
         * @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();
        }
        
        /**
        }
        
        /**