]> git.mxchange.org Git - hub.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Mon, 22 May 2017 17:05:37 +0000 (19:05 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 21 Aug 2020 16:50:08 +0000 (18:50 +0200)
- imported Distributable
- imported FiLoStacker
- imported BaseState
- imported NodeDistributedHashTableDatabaseWrapper
- created/added namespaces
- setter/getter for DHT instance is no longer working and maybe okay to use
  DhtObjectFactory instead. Okay, a few more calls then, but well.
- renamed HubPingIterator -> NodePingIterator
- updated core framework

Signed-off-by: Roland Häder <roland@mxchange.org>
45 files changed:
application/hub/classes/dht/class_
application/hub/classes/dht/class_BaseDht.php
application/hub/classes/dht/node/class_NodeDhtFacade.php
application/hub/classes/discovery/recipient/dht/class_DhtRecipientDiscovery.php
application/hub/classes/factories/states/dht/class_DhtStateFactory.php
application/hub/classes/handler/answer-status/announcement/class_NodeAnnouncementAnswerOkayHandler.php
application/hub/classes/handler/answer-status/requests/class_RequestNodeListAnswerOkayHandler.php
application/hub/classes/handler/message-types/announcement/class_NodeMessageAnnouncementHandler.php
application/hub/classes/handler/message-types/class_BaseMessageHandler.php
application/hub/classes/handler/message-types/dht/class_NodeMessageDhtBootstrapHandler.php
application/hub/classes/handler/message-types/requests/class_NodeMessageRequestNodeListHandler.php
application/hub/classes/handler/raw_data/class_BaseDataHandler.php
application/hub/classes/helper/dht/class_DhtBootstrapHelper.php
application/hub/classes/helper/dht/class_DhtPublishEntryHelper.php
application/hub/classes/iterator/hub/.htaccess [deleted file]
application/hub/classes/iterator/hub/class_HubPingIterator.php [deleted file]
application/hub/classes/iterator/node/.htaccess [new file with mode: 0644]
application/hub/classes/iterator/node/class_NodePingIterator.php [new file with mode: 0644]
application/hub/classes/nodes/class_BaseHubNode.php
application/hub/classes/package/class_NetworkPackage.php
application/hub/classes/recipient/dht/class_DhtRecipient.php
application/hub/classes/states/communicator/class_BaseCommunicatorState.php
application/hub/classes/states/crawler/class_BaseCrawlerState.php
application/hub/classes/states/cruncher/class_BaseCruncherState.php
application/hub/classes/states/dht/active/class_DhtActiveState.php
application/hub/classes/states/dht/booting/class_DhtBootingState.php
application/hub/classes/states/dht/class_BaseDhtState.php
application/hub/classes/states/dht/class_Dht
application/hub/classes/states/dht/init/class_DhtInitState.php
application/hub/classes/states/dht/virgin/class_DhtVirginState.php
application/hub/classes/states/miner/class_BaseMinerState.php
application/hub/classes/states/peer/class_BasePeerState.php
application/hub/classes/tasks/node/dht/class_NodeDhtBootstrapTask.php
application/hub/classes/tasks/node/dht/class_NodeDhtInitializationTask.php
application/hub/classes/tasks/node/dht/class_NodeDhtLateBootstrapTask.php
application/hub/classes/tasks/node/dht/class_NodeDhtPublicationCheckTask.php
application/hub/classes/tasks/node/dht/class_NodeDhtPublicationTask.php
application/hub/classes/tasks/node/dht/class_NodeDhtQueryTask.php
application/hub/classes/tools/class_HubTools.php
application/hub/config.php
application/hub/exceptions/wrapper/class_NodeAlreadyRegisteredException.php
application/hub/exceptions/wrapper/class_NodeDataMissingException.php
application/hub/interfaces/distributable/node/class_DistributableNode.php
application/hub/interfaces/helper/dht/class_HelpableDht.php
core

index 92d40c8f5a5b4e9767883f2065add3a7288d4a9c..cf2444172ae5e9827de1d41ed93b07aa1fb97ae5 100644 (file)
@@ -1,4 +1,11 @@
 <?php
+// Own namespace
+namespace Hub\Dht\;
+
+// Import application-specific stuff
+use Hub\Dht\BaseDht;
+use Hub\Dht\Distributable;
+
 /**
  * A ??? DHT facade class
  *
index 31b16fba6b4168e9e78421ed3629abb18a295dae..4909bea6d5f6fba15bb2e47d976d6702ab0afb83 100644 (file)
@@ -3,6 +3,8 @@
 namespace Hub\Dht;
 
 // Import hub-specific stuff
+use Hub\Factory\State\Dht\DhtStateFactory;
+use Hub\Dht\Distributable;
 use Hub\Generic\BaseHubSystem;
 
 // Import framework stuff
index 77326645cc769c66bd28a093661bf87b50ec5fb0..378cfdad0568854178faa147ea824823e67de190 100644 (file)
@@ -2,7 +2,9 @@
 // Own namespace
 namespace Hub\Dht\Node;
 
-// Import hub-specific stuff
+// Import application-specific stuff
+use Hub\Dht\BaseDht;
+use Hub\Dht\Distributable;
 use Hub\Generic\BaseHubSystem;
 
 // Import framework stuff
index 83bbdf5d09213093d79cb7125cc98923b08aaea5..ac3d5f7b89c006dc9d1ec37fd72279efad677bc8 100644 (file)
@@ -50,12 +50,6 @@ class DhtRecipientDiscovery extends BaseRecipientDiscovery implements Discoverab
                // Get an instance of this class
                $discoveryInstance = new DhtRecipientDiscovery();
 
-               // Get a DHT instance
-               $dhtInstance = DhtObjectFactory::createDhtInstance('node');
-
-               // Set it here
-               $discoveryInstance->setDhtInstance($dhtInstance);
-
                // Return the prepared instance
                return $discoveryInstance;
        }
@@ -68,12 +62,10 @@ class DhtRecipientDiscovery extends BaseRecipientDiscovery implements Discoverab
         */
        public function resolveRecipientsByPackageData (array $packageData) {
                // Use facade to get recipients back
-               $recipients = $this->getDhtInstance()->findRecipientsByPackageData($packageData);
+               $recipients = DhtObjectFactory::createDhtInstance('node')->findRecipientsByPackageData($packageData);
 
                // Return it
                return $recipients;
        }
-}
 
-// [EOF]
-?>
+}
index 9085cd3fc0faf4c27c9531c9c8733e7b465aae75..03ebd954d9a6623de0079fe275a8d264625ba11d 100644 (file)
@@ -2,6 +2,10 @@
 // Own namespace
 namespace Hub\Factory\State\Dht;
 
+// Import application-specific stuff
+use Hub\Dht\Distributable;
+use Hub\Factory\State\Dht\DhtStateFactory;
+
 // Import framework stuff
 use CoreFramework\Factory\ObjectFactory;
 
@@ -65,7 +69,5 @@ class DhtStateFactory extends ObjectFactory {
                // For any purposes, return the state instance
                return $stateInstance;
        }
-}
 
-// [EOF]
-?>
+}
index 3494284e799a6faf676f81916f3630db715eaefa..a55714d15cabc896663b7ce9ac1caee979882c6f 100644 (file)
@@ -3,6 +3,7 @@
 namespace Hub\Handler\Node\Announcement\Answer;
 
 // Import application-specific stuff
+use Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
 use Hub\Factory\Node\NodeObjectFactory;
 use Hub\Network\Receive\Receivable;
 use Hub\Node\BaseHubNode;
@@ -79,7 +80,7 @@ class NodeAnnouncementAnswerOkayHandler extends BaseAnserStatusHandler implement
                 * Query DHT and force update (which will throw an exception if the
                 * node is not found).
                 */
-               $this->getDhtInstance()->registerNodeByMessageData($messageData, $this, TRUE);
+               DhtObjectFactory::createDhtInstance('node')->registerNodeByMessageData($messageData, $this, TRUE);
 
                // Get handler instance
                $handlerInstance = Registry::getRegistry()->getInstance('task_handler');
index 0ea6e20b5417bcd418f947c86e3b2ec313ec0068..3199bb5d22071fd18cd784bcda14ef705bd50f3c 100644 (file)
@@ -85,13 +85,13 @@ class RequestNodeListAnswerOkayHandler extends BaseAnserStatusHandler implements
                unset($messageData[XmlRequestNodeListAnswerTemplateEngine::REQUEST_DATA_NODE_LIST]);
 
                // Write node list to DHT
-               $this->getDhtInstance()->insertNodeList($nodeList);
+               DhtObjectFactory::createDhtInstance('node')->insertNodeList($nodeList);
 
                /*
                 * Query DHT and force update (which will throw an exception if the
                 * node is not found).
                 */
-               $this->getDhtInstance()->registerNodeByMessageData($messageData, $this, TRUE);
+               DhtObjectFactory::createDhtInstance('node')->registerNodeByMessageData($messageData, $this, TRUE);
 
                // Prepare next message ("hello" message to all returned nodes)
                //$this->prepareNextMessage($messageData, $packageInstance);
index 2931e81faa49cf08347c0ebf06740a4c645ca86c..1882fb2e3b95c4c18b856deabcdd8f1adfb36326 100644 (file)
@@ -3,6 +3,7 @@
 namespace Hub\Handler\Node\Message\Announcement;
 
 // Import application-specific stuff
+use Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
 use Hub\Factory\Node\NodeObjectFactory;
 use Hub\Generic\BaseHubSystem;
 use Hub\Network\Receive\Receivable;
index e502920a49ac81aaf581c1b2c4bf3156cb47c71c..f9038c8ff3118908221f08eecc02be987d9b5b30 100644 (file)
@@ -79,7 +79,7 @@ abstract class BaseMessageHandler extends BaseDataHandler {
                assert(count($this->getSearchData()) > 0);
 
                // Let the DHT facade do the work
-               $this->getDhtInstance()->registerNodeByMessageData($messageData, $this);
+               DhtObjectFactory::createDhtInstance('node')->registerNodeByMessageData($messageData, $this);
        }
 
        /**
index c431f3a971ca4fb120061887968847613bc7278c..bcffb8394ee681ecd58567ecdc611c27d856db7f 100644 (file)
@@ -3,6 +3,7 @@
 namespace Hub\Handler\Node\Answer\Dht\Bootstrap;
 
 // Import application-specific stuff
+use Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
 use Hub\Factory\Dht\DhtObjectFactory;
 use Hub\Factory\Node\NodeObjectFactory;
 use Hub\Network\Receive\Receivable;
@@ -85,12 +86,6 @@ class NodeMessageDhtBootstrapHandler extends BaseMessageHandler implements Handl
                // Get new instance
                $handlerInstance = new NodeMessageDhtBootstrapHandler();
 
-               // Get a DHT instance
-               $dhtInstance = DhtObjectFactory::createDhtInstance('node');
-
-               // Set the DHT instance here
-               $handlerInstance->setDhtInstance($dhtInstance);
-
                // Return the prepared instance
                return $handlerInstance;
        }
@@ -179,7 +174,7 @@ class NodeMessageDhtBootstrapHandler extends BaseMessageHandler implements Handl
                 * DHT nodes that accept bootstrap requests are read from the DHT
                 * database.
                 */
-               $nodeList = $this->getDhtInstance()->findRecipientsByKey(NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_ACCEPT_BOOTSTRAP, 'Y');
+               $nodeList = DhtObjectFactory::createDhtInstance('node')->findRecipientsByKey(NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_ACCEPT_BOOTSTRAP, 'Y');
 
                // Make sure it is an array and has at least one entry
                assert(is_array($nodeList));
index a9ca0bf3fef98e9483880fd40500a9b9308cd415..1cefd96e5f6a9eede53a06e83478e70ccd91bf23 100644 (file)
@@ -3,6 +3,7 @@
 namespace Hub\Handler\Node\Message\Request\NodeList;
 
 // Import application-specific stuff
+use Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
 use Hub\Factory\Node\NodeObjectFactory;
 use Hub\Network\Receive\Receivable;
 use Hub\Node\BaseHubNode;
@@ -143,7 +144,7 @@ class NodeMessageRequestNodeListHandler extends BaseMessageHandler implements Ha
                } // END - foreach
 
                // Query local DHT for nodes except given session id
-               $nodeList = $this->getDhtInstance()->queryLocalNodeListExceptByMessageData(
+               $nodeList = DhtObjectFactory::createDhtInstance('node')->queryLocalNodeListExceptByMessageData(
                        $messageData,
                        $this,
                        XmlRequestNodeListTemplateEngine::REQUEST_DATA_SESSION_ID,
index dcc7896e1890d801c7b92e3cf973a3f0563639cf..b6a47f15a6ba230c707b9ddd971f96f9a9d506e1 100644 (file)
@@ -68,12 +68,6 @@ abstract class BaseDataHandler extends BaseHandler {
        protected function __construct ($className) {
                // Call parent constructor
                parent::__construct($className);
-
-               // Get a DHT instance
-               $dhtInstance = DhtObjectFactory::createDhtInstance('node');
-
-               // Set it here
-               $this->setDhtInstance($dhtInstance);
        }
 
        /**
index 5c296512a9469fb2d6ab25d21733a7ae008148a0..29fdc3477d97d1b42f7714e9e84d093735fb92a2 100644 (file)
@@ -2,7 +2,8 @@
 // Own namespace
 namespace Hub\Helper\Dht\Bootstrap;
 
-// Import hub-specific stuff
+// Import application-specific stuff
+use Hub\Dht\Distributable;
 use Hub\Generic\BaseHubSystem;
 use Hub\Helper\BaseHubSystemHelper;
 use Hub\Network\Package\NetworkPackage;
index c3099dda17b54a26bc7a207d1fdfe8f08edd98ea..174f3e9dca0cec1081537773367bb3cb13d1b4fd 100644 (file)
@@ -2,7 +2,8 @@
 // Own namespace
 namespace Hub\Helper\Dht\Publish;
 
-// Import hub-specific stuff
+// Import application-specific stuff
+use Hub\Dht\Distributable;
 use Hub\Generic\BaseHubSystem;
 use Hub\Helper\BaseHubSystemHelper;
 use Hub\Network\Package\NetworkPackage;
diff --git a/application/hub/classes/iterator/hub/.htaccess b/application/hub/classes/iterator/hub/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/hub/classes/iterator/hub/class_HubPingIterator.php b/application/hub/classes/iterator/hub/class_HubPingIterator.php
deleted file mode 100644 (file)
index 4600d0e..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-<?php
-// Own namespace
-namespace Hub\Iterator\Ping;
-
-// Import framework stuff
-use CoreFramework\Iterator\BaseIterator;
-
-// Import SPL stuff
-use \Iterator;
-
-/**
- * A HubPing iterator
- *
- * @author             Roland Haeder <webmaster@shipsimu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.shipsimu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-class HubPingIterator extends BaseIterator implements Iterator {
-       /**
-        * Protected constructor
-        *
-        * @return      void
-        */
-       protected function __construct () {
-               // Call parent constructor
-               parent::__construct(__CLASS__);
-       }
-
-       /**
-        * Creates an instance of this class
-        *
-        * @return      $iteratorInstance               An instance of a Iterator class
-        */
-       public static final function createHubPingIterator () {
-               // Get new instance
-               $iteratorInstance = new HubPingIterator();
-
-               // Return the prepared instance
-               return $iteratorInstance;
-       }
-
-       /**
-        * Getter for current value from group or generic
-        *
-        * @return      $current        Current value in iteration
-        */
-       public function current () {
-               // Default is null
-               $current = NULL;
-
-               $this->partialStub('Please implement this method.');
-
-               // Return it
-               return $current;
-       }
-
-       /**
-        * Getter for key from group or generic
-        *
-        * @return      $key    Current key in iteration
-        */
-       public function key () {
-               // Default is null
-               $key = NULL;
-
-               $this->partialStub('Please implement this method.');
-
-               // Return it
-               return $key;
-       }
-
-       /**
-        * Advances to the next entry
-        *
-        * @return      void
-        */
-       public function next () {
-               $this->partialStub('Please implement this method.');
-       }
-
-       /**
-        * Rewinds to the beginning of the iteration
-        *
-        * @return      void
-        */
-       public function rewind () {
-               $this->partialStub('Please implement this method.');
-       }
-
-       /**
-        * Checks whether the current entry is valid (not at the end of the list)
-        *
-        * @return      void
-        */
-       public function valid () {
-               $this->partialStub('Please implement this method.');
-       }
-}
-
-// [EOF]
-?>
diff --git a/application/hub/classes/iterator/node/.htaccess b/application/hub/classes/iterator/node/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/classes/iterator/node/class_NodePingIterator.php b/application/hub/classes/iterator/node/class_NodePingIterator.php
new file mode 100644 (file)
index 0000000..905e4f0
--- /dev/null
@@ -0,0 +1,116 @@
+<?php
+// Own namespace
+namespace Hub\Iterator\Node\Ping;
+
+// Import framework stuff
+use CoreFramework\Iterator\BaseIterator;
+
+// Import SPL stuff
+use \Iterator;
+
+/**
+ * A HubPing iterator
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+class NodePingIterator extends BaseIterator implements Iterator {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this class
+        *
+        * @return      $iteratorInstance               An instance of a Iterator class
+        */
+       public static final function createNodePingIterator () {
+               // Get new instance
+               $iteratorInstance = new NodePingIterator();
+
+               // Return the prepared instance
+               return $iteratorInstance;
+       }
+
+       /**
+        * Getter for current value from group or generic
+        *
+        * @return      $current        Current value in iteration
+        */
+       public function current () {
+               // Default is null
+               $current = NULL;
+
+               $this->partialStub('Please implement this method.');
+
+               // Return it
+               return $current;
+       }
+
+       /**
+        * Getter for key from group or generic
+        *
+        * @return      $key    Current key in iteration
+        */
+       public function key () {
+               // Default is null
+               $key = NULL;
+
+               $this->partialStub('Please implement this method.');
+
+               // Return it
+               return $key;
+       }
+
+       /**
+        * Advances to the next entry
+        *
+        * @return      void
+        */
+       public function next () {
+               $this->partialStub('Please implement this method.');
+       }
+
+       /**
+        * Rewinds to the beginning of the iteration
+        *
+        * @return      void
+        */
+       public function rewind () {
+               $this->partialStub('Please implement this method.');
+       }
+
+       /**
+        * Checks whether the current entry is valid (not at the end of the list)
+        *
+        * @return      void
+        */
+       public function valid () {
+               $this->partialStub('Please implement this method.');
+       }
+}
+
+// [EOF]
+?>
index 7d653a78643fa3a80e52dce53bf11c874fc511d4..e57002eb60fcf53b8c99eddacd8849c10888d0c9 100644 (file)
@@ -3,6 +3,7 @@
 namespace Hub\Node;
 
 // Import hub-specific stuff
+use Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
 use Hub\Database\Frontend\Node\Information\NodeInformationDatabaseWrapper;
 use Hub\Factory\State\Node\NodeStateFactory;
 use Hub\Locator\Node\LocateableNode;
index 5a218e6b393f85bc65b2b5a9cc66e5f8508a94e2..feeca4db29c4b3c9b501f25bfb49aac28fac74be 100644 (file)
@@ -4,6 +4,7 @@ namespace Hub\Network\Package;
 
 // Import application-specific stuff
 use Hub\Container\Socket\StorableSocket;
+use Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
 use Hub\Factory\Assembler\Package\PackageAssemblerFactory;
 use Hub\Factory\Dht\DhtObjectFactory;
 use Hub\Factory\Information\Connection\ConnectionInfoFactory;
index 2d4511fedb9b26ffbec7e0159fa3794042f92c46..2e3e2a78dd6a100962ee1c12644da11044e5cba9 100644 (file)
@@ -3,6 +3,7 @@
 namespace Hub\Recipient\Dht;
 
 // Import application-specific stuff
+use Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
 use Hub\Network\Package\NetworkPackage;
 
 // Import framework stuff
index 32a05540620797ef658839ea3b8156adab07ea67..bfb80130b865d2ebd924af0f09622150af4baea8 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Communicator\State;
+
+// Import framework stuff
+use CoreFramework\State\BaseState;
+
 /**
  * A general communicator state class
  *
index fbb75fda415d5c6890ba87bdf2fe6c674fdbafc4..dcfefa1d5d5e6ba300c88553041c54f0101d2196 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Crawler\State;
+
+// Import framework stuff
+use CoreFramework\State\BaseState;
+
 /**
  * A general crawler state class
  *
index 246bd812e0c5b9bb6730bc8feb364c303b96ce2d..357abe17062e81a56f5ce4b363e96e74d0636c0a 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Cruncher\State;
+
+// Import framework stuff
+use CoreFramework\State\BaseState;
+
 /**
  * A general cruncher state class
  *
index 06aadf2b6cb527b93ea329d248daf3cab769d484..18021357fb9756b130ca7e366c2c578a800abe93 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\State\Dht;
 
+// Import application-specific stuff
+use Hub\Dht\Distributable;
+
 // Import framework stuff
 use CoreFramework\State\Stateable;
 
@@ -54,13 +57,8 @@ class DhtActiveState extends BaseDhtState implements Stateable {
                // Debug message
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-STATE: Has changed from ' . $dhtInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
 
-               // Set the dht instance
-               $stateInstance->setDhtInstance($dhtInstance);
-
                // Return the prepared instance
                return $stateInstance;
        }
-}
 
-// [EOF]
-?>
+}
index 51f864cda4b5830a44f7b47e828835e6baae4b4a..1059659cf1eaa2bf12443979420f36a98c00d652 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\State\Dht;
 
+// Import application-specific stuff
+use Hub\Dht\Distributable;
+
 // Import application-specific stuff
 use Hub\Factory\Node\NodeObjectFactory;
 
@@ -57,9 +60,6 @@ class DhtBootingState extends BaseDhtState implements Stateable {
                // Debug message
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-STATE: Has changed from ' . $dhtInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
 
-               // Set the dht instance
-               $stateInstance->setDhtInstance($dhtInstance);
-
                // Get node instance and enable DHT bootstrap requests
                NodeObjectFactory::createNodeInstance()->enableAcceptDhtBootstrap();
 
@@ -69,7 +69,5 @@ class DhtBootingState extends BaseDhtState implements Stateable {
                // Return the prepared instance
                return $stateInstance;
        }
-}
 
-// [EOF]
-?>
+}
index 44e0b5584ffe60c00aa8a540bb0ea810fb169d6b..f6051285eb1b275e267075d3999b5a934c605381 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Dht;
+
+// Import framework stuff
+use CoreFramework\State\BaseState;
+
 /**
  * A general DHT state class
  *
index 1d1dd6fb57081d1081532f382d0ec8733132b645..974d6f0c7561d1fb1559beed1ff7e50f50fe06ca 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\State\Dht\;
 
+// Import application-specific stuff
+use Hub\Dht\Distributable;
+
 // Import framework stuff
 use CoreFramework\State\Stateable;
 
@@ -54,13 +57,8 @@ class Dht???State extends BaseDhtState implements Stateable {
                // Debug message
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-STATE: Has changed from ' . $dhtInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
 
-               // Set the dht instance
-               $stateInstance->setDhtInstance($dhtInstance);
-
                // Return the prepared instance
                return $stateInstance;
        }
-}
 
-// [EOF]
-?>
+}
index e08a84c9d98874ffd99ab0a09c8d1454480c485c..02a0690acbfe1727f1a112e4840859c1337af1aa 100644 (file)
@@ -2,6 +2,10 @@
 // Own namespace
 namespace Hub\State\Dht;
 
+// Import application-specific stuff
+use Hub\Dht\Distributable;
+use Hub\Factory\State\Dht\DhtStateFactory;
+
 // Import framework stuff
 use CoreFramework\State\Stateable;
 
@@ -54,9 +58,6 @@ class DhtInitState extends BaseDhtState implements Stateable {
                // Debug message
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-STATE: Has changed from ' . $dhtInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
 
-               // Set the dht instance
-               $stateInstance->setDhtInstance($dhtInstance);
-
                // Return the prepared instance
                return $stateInstance;
        }
@@ -69,9 +70,7 @@ class DhtInitState extends BaseDhtState implements Stateable {
         */
        public function dhtHasInitialized () {
                // Create a new instance
-               DhtStateFactory::createDhtStateInstanceByName('virgin', $this->getDhtInstance());
+               DhtStateFactory::createDhtStateInstanceByName('virgin', DhtObjectFactory::createDhtInstance('node'));
        }
-}
 
-// [EOF]
-?>
+}
index 3dc2b82e711c723cd89c0b2745526238e4d95660..322c17f799e046cb9ff99f7562c357ebd66a55bf 100644 (file)
@@ -2,6 +2,10 @@
 // Own namespace
 namespace Hub\State\Dht;
 
+// Import application-specific stuff
+use Hub\Dht\Distributable;
+use Hub\Factory\State\Dht\DhtStateFactory;
+
 // Import framework stuff
 use CoreFramework\State\Stateable;
 
@@ -54,9 +58,6 @@ class DhtVirginState extends BaseDhtState implements Stateable {
                // Debug message
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-STATE: Has changed from ' . $dhtInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
 
-               // Set the dht instance
-               $stateInstance->setDhtInstance($dhtInstance);
-
                // Return the prepared instance
                return $stateInstance;
        }
@@ -69,9 +70,7 @@ class DhtVirginState extends BaseDhtState implements Stateable {
         */
        public function dhtIsBooting () {
                // Get new instance and set it
-               DhtStateFactory::createDhtStateInstanceByName('booting', $this->getDhtInstance());
+               DhtStateFactory::createDhtStateInstanceByName('booting', DhtObjectFactory::createDhtInstance('node'));
        }
-}
 
-// [EOF]
-?>
+}
index cf53991ee82dfbda8b559aef5be42fc392a99f9c..3b1a13693e8b9e28ca9fa600e70963d79512378e 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Miner\State;
+
+// Import framework stuff
+use CoreFramework\State\BaseState;
+
 /**
  * A general miner state class
  *
index cbbc183f2e0c193e72b6840eddc53718f3aa3e09..1113b34932e77cdd43791fbcd9a9e3156a84e8ee 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Peer\State;
+
+// Import framework stuff
+use CoreFramework\State\BaseState;
+
 /**
  * A general peer state class
  *
index 05d2cb924b75b5351c8ad4185aa2b187e7649bba..c2465718d952feca1a89d32d19ed54baca332667 100644 (file)
@@ -53,12 +53,6 @@ class NodeDhtBootstrapTask extends BaseTask implements Taskable, Visitable {
                // Get new instance
                $taskInstance = new NodeDhtBootstrapTask();
 
-               // Get a DHT instance
-               $dhtInstance = DhtObjectFactory::createDhtInstance('node');
-
-               // Set the DHT instance here
-               $taskInstance->setDhtInstance($dhtInstance);
-
                // Return the prepared instance
                return $taskInstance;
        }
@@ -81,7 +75,7 @@ class NodeDhtBootstrapTask extends BaseTask implements Taskable, Visitable {
         */
        public function executeTask () {
                // Let the DHT class do the work for us
-               $this->getDhtInstance()->bootstrapDht();
+               DhtObjectFactory::createDhtInstance('node')->bootstrapDht();
        }
 
        /**
@@ -93,7 +87,5 @@ class NodeDhtBootstrapTask extends BaseTask implements Taskable, Visitable {
        public function doShutdown () {
                self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index e4905265445b537fcf6ad889cebdcad14f1f469b..e9c0df869b904e33bf3b36860af1f2aa5c93fd99 100644 (file)
@@ -53,12 +53,6 @@ class NodeDhtInitializationTask extends BaseTask implements Taskable, Visitable
                // Get new instance
                $taskInstance = new NodeDhtInitializationTask();
 
-               // Get a DHT instance
-               $dhtInstance = DhtObjectFactory::createDhtInstance('node');
-
-               // Set the DHT instance here
-               $taskInstance->setDhtInstance($dhtInstance);
-
                // Return the prepared instance
                return $taskInstance;
        }
@@ -81,7 +75,7 @@ class NodeDhtInitializationTask extends BaseTask implements Taskable, Visitable
         */
        public function executeTask () {
                // Intiailize the DHT
-               $this->getDhtInstance()->initDht();
+               DhtObjectFactory::createDhtInstance('node')->initDht();
        }
 
        /**
@@ -93,7 +87,5 @@ class NodeDhtInitializationTask extends BaseTask implements Taskable, Visitable
        public function doShutdown () {
                self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 265aff2c4944c3b1cee14278da5ee1028b6fc486..625e8e5324db41806093358541d338b1b8243c0e 100644 (file)
@@ -53,12 +53,6 @@ class NodeDhtLateBootstrapTask extends BaseTask implements Taskable, Visitable {
                // Get new instance
                $taskInstance = new NodeDhtLateBootstrapTask();
 
-               // Get a DHT instance
-               $dhtInstance = DhtObjectFactory::createDhtInstance('node');
-
-               // Set the DHT instance here
-               $taskInstance->setDhtInstance($dhtInstance);
-
                // Return the prepared instance
                return $taskInstance;
        }
@@ -81,7 +75,7 @@ class NodeDhtLateBootstrapTask extends BaseTask implements Taskable, Visitable {
         */
        public function executeTask () {
                // Let the DHT class do the work for us
-               $this->getDhtInstance()->bootstrapDht();
+               DhtObjectFactory::createDhtInstance('node')->bootstrapDht();
        }
 
        /**
@@ -93,7 +87,5 @@ class NodeDhtLateBootstrapTask extends BaseTask implements Taskable, Visitable {
        public function doShutdown () {
                self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index baa6b52ec736fa1b7d8333093cc1a3331a309694..01bbf446d1e5ca8c00223ff2d7cba732d6692441 100644 (file)
@@ -53,12 +53,6 @@ class NodeDhtPublicationCheckTask extends BaseTask implements Taskable, Visitabl
                // Get new instance
                $taskInstance = new NodeDhtPublicationCheckTask();
 
-               // Get a DHT instance
-               $dhtInstance = DhtObjectFactory::createDhtInstance('node');
-
-               // Set the DHT instance here
-               $taskInstance->setDhtInstance($dhtInstance);
-
                // Return the prepared instance
                return $taskInstance;
        }
@@ -82,7 +76,7 @@ class NodeDhtPublicationCheckTask extends BaseTask implements Taskable, Visitabl
         */
        public function executeTask () {
                // Get DHT instance
-               $dhtInstance = $this->getDhtInstance();
+               $dhtInstance = DhtObjectFactory::createDhtInstance('node');
 
                // Has the DHT some unpublished entries?
                if (($dhtInstance->hasFullyBootstrapped()) && ($dhtInstance->hasUnpublishedEntries())) {
@@ -100,7 +94,5 @@ class NodeDhtPublicationCheckTask extends BaseTask implements Taskable, Visitabl
        public function doShutdown () {
                self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 0dbddb906316db0cfa1e436401ff73578d07f005..268df78279feb3f61c53d3538d48c866226cbb99 100644 (file)
@@ -53,12 +53,6 @@ class NodeDhtPublicationTask extends BaseTask implements Taskable, Visitable {
                // Get new instance
                $taskInstance = new NodeDhtPublicationTask();
 
-               // Get a DHT instance
-               $dhtInstance = DhtObjectFactory::createDhtInstance('node');
-
-               // Set the DHT instance here
-               $taskInstance->setDhtInstance($dhtInstance);
-
                // Return the prepared instance
                return $taskInstance;
        }
@@ -82,7 +76,7 @@ class NodeDhtPublicationTask extends BaseTask implements Taskable, Visitable {
         */
        public function executeTask () {
                // Get DHT instance
-               $dhtInstance = $this->getDhtInstance();
+               $dhtInstance = DhtObjectFactory::createDhtInstance('node');
 
                // Has the DHT some entries pending publication?
                if ($dhtInstance->hasEntriesPendingPublication()) {
@@ -100,7 +94,5 @@ class NodeDhtPublicationTask extends BaseTask implements Taskable, Visitable {
        public function doShutdown () {
                self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 0d59c59be21832d6e7d815300b7bc07582b3af92..cd9ddadac8f4c84b604b12f16d7f8caff8e72b32 100644 (file)
@@ -53,12 +53,6 @@ class NodeDhtQueryTask extends BaseTask implements Taskable, Visitable {
                // Get new instance
                $taskInstance = new NodeDhtQueryTask();
 
-               // Get a DHT instance
-               $dhtInstance = DhtObjectFactory::createDhtInstance('node');
-
-               // Set the DHT instance here
-               $taskInstance->setDhtInstance($dhtInstance);
-
                // Return the prepared instance
                return $taskInstance;
        }
@@ -82,7 +76,7 @@ class NodeDhtQueryTask extends BaseTask implements Taskable, Visitable {
         */
        public function executeTask () {
                // Get DHT instance
-               $dhtInstance = $this->getDhtInstance();
+               $dhtInstance = DhtObjectFactory::createDhtInstance('node');
 
                // Are there "INSERT" node data entries?
                if ($dhtInstance->ifInsertNodeDataPending()) {
@@ -100,7 +94,5 @@ class NodeDhtQueryTask extends BaseTask implements Taskable, Visitable {
        public function doShutdown () {
                self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 5f4d5023d6e2905788b33c04b51f07bae8f445ba..bbac6089573f30cd32c0d3d95c53f2fa893b1f5a 100644 (file)
@@ -3,6 +3,7 @@
 namespace Hub\Tools;
 
 // Import application-specific stuff
+use Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
 use Hub\Factory\Dht\DhtObjectFactory;
 use Hub\Factory\Node\NodeObjectFactory;
 use Hub\Generic\BaseHubSystem;
@@ -63,12 +64,6 @@ class HubTools extends BaseHubSystem {
                // Call parent constructor
                parent::__construct(__CLASS__);
 
-               // Get a DHT instance
-               $dhtInstance = DhtObjectFactory::createDhtInstance('node');
-
-               // Set it here
-               $this->setDhtInstance($dhtInstance);
-
                // Init salt length
                $this->sessionIdLength = 32 + $this->getConfigInstance()->getConfigEntry('salt_length');
        }
@@ -110,7 +105,7 @@ class HubTools extends BaseHubSystem {
                $recipientUniversalNodeLocator = 'invalid://invalid:invalid';
 
                // And ask it for Universal Node Locator by given session id
-               $recipient = $this->getDhtInstance()->findNodeLocalBySessionId($sessionId);
+               $recipient = DhtObjectFactory::createDhtInstance('node')->findNodeLocalBySessionId($sessionId);
                //* DEBUG-DIE: */ die(__METHOD__ . ': UNFINISHED: recipient[' . gettype($recipient) . ']=' . print_r($recipient, TRUE) . ',sessionId=' . $sessionId . PHP_EOL);
 
                // Is the recipient valid?
@@ -143,7 +138,7 @@ class HubTools extends BaseHubSystem {
                $selfInstance = self::getSelfInstance();
 
                // And ask it for session id by given Universal Node Locator
-               $nodeData = $selfInstance->getDhtInstance()->findNodeLocalBySessionId($sessionId);
+               $nodeData = DhtObjectFactory::createDhtInstance('node')->findNodeLocalBySessionId($sessionId);
 
                // Make sure the node id is there
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HUB-TOOLS: sessionId=' . $sessionId . ', nodeData[' . gettype($nodeData) . ']=' . print_r($nodeData, TRUE));
@@ -165,7 +160,7 @@ class HubTools extends BaseHubSystem {
                $selfInstance = self::getSelfInstance();
 
                // And ask it for session id by given Universal Node Locator
-               $recipient = $selfInstance->getDhtInstance()->findNodeByUniversalNodeLocator($unlInstance);
+               $recipient = DhtObjectFactory::createDhtInstance('node')->findNodeByUniversalNodeLocator($unlInstance);
                die(__METHOD__.':recipient='.print_r($recipient, TRUE));
 
                // Return result
index 1a276bb9a500992fd9aa70d09d3e56a73ae3f831..5f27fd1f07b72b4d6b40f5937e86b92dab2ecfa2 100644 (file)
@@ -55,7 +55,7 @@ $cfg->setConfigEntry('output_class', 'DebugConsoleOutput');
 $cfg->setConfigEntry('node_info_db_wrapper_class', 'Hub\Database\Frontend\Node\Information\NodeInformationDatabaseWrapper');
 
 // CFG: NODE-DHT-DB-WRAPPER-CLASS
-$cfg->setConfigEntry('node_dht_db_wrapper_class', 'NodeDistributedHashTableDatabaseWrapper');
+$cfg->setConfigEntry('node_dht_db_wrapper_class', 'Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper');
 
 // CFG: NODE-DHT-LIST-LIMIT
 $cfg->setConfigEntry('node_dht_list_limit', 20);
@@ -307,28 +307,28 @@ $cfg->setConfigEntry('node_announcement_answer_template_extension', '.xml');
 $cfg->setConfigEntry('node_announcement_template_type', 'xml/announcement');
 
 // CFG: NODE-ANNOUNCEMENT-STACKER-CLASS
-$cfg->setConfigEntry('node_announcement_stacker_class', 'FiLoStacker');
+$cfg->setConfigEntry('node_announcement_stacker_class', 'CoreFramework\Stacker\FiLoStacker');
 
 // CFG: NODE-ANNOUNCEMENT-ANSWER-STACKER-CLASS
-$cfg->setConfigEntry('node_announcement_answer_stacker_class', 'FiLoStacker');
+$cfg->setConfigEntry('node_announcement_answer_stacker_class', 'CoreFramework\Stacker\FiLoStacker');
 
 // CFG: NODE-DHT-BOOTSTRAP-STACKER-CLASS
-$cfg->setConfigEntry('node_dht_bootstrap_stacker_class', 'FiLoStacker');
+$cfg->setConfigEntry('node_dht_bootstrap_stacker_class', 'CoreFramework\Stacker\FiLoStacker');
 
 // CFG: NODE-DHT-BOOTSTRAP-ANSWER-STACKER-CLASS
-$cfg->setConfigEntry('node_dht_bootstrap_answer_stacker_class', 'FiLoStacker');
+$cfg->setConfigEntry('node_dht_bootstrap_answer_stacker_class', 'CoreFramework\Stacker\FiLoStacker');
 
 // CFG: NODE-REQUEST-NODE-LIST-ANSWER-STACKER-CLASS
-$cfg->setConfigEntry('node_request_node_list_answer_stacker_class', 'FiLoStacker');
+$cfg->setConfigEntry('node_request_node_list_answer_stacker_class', 'CoreFramework\Stacker\FiLoStacker');
 
 // CFG: NODE-REQUEST-NODE-LIST-ENTRY-STACKER-CLASS
-$cfg->setConfigEntry('node_request_node_list_entry_stacker_class', 'FiLoStacker');
+$cfg->setConfigEntry('node_request_node_list_entry_stacker_class', 'CoreFramework\Stacker\FiLoStacker');
 
 // CFG: DHT-STACKER-CLASS
-$cfg->setConfigEntry('dht_stacker_class', 'FiLoStacker');
+$cfg->setConfigEntry('dht_stacker_class', 'CoreFramework\Stacker\FiLoStacker');
 
 // CFG: RAW-DATA-STACKER-CLASS
-$cfg->setConfigEntry('raw_data_stacker_class', 'FiLoStacker');
+$cfg->setConfigEntry('raw_data_stacker_class', 'CoreFramework\Stacker\FiLoStacker');
 
 // CFG: MULTIPLE-MESSAGE-STACKER-CLASS
 $cfg->setConfigEntry('multiple_message_stacker_class', 'CoreFramework\Stacker\FiFoStacker');
@@ -352,10 +352,10 @@ $cfg->setConfigEntry('node_self_connect_template_type', 'xml/self_connect');
 $cfg->setConfigEntry('node_request_node_list_template_type', 'xml/requests');
 
 // CFG: NODE-SELF-CONNECT-STACKER-CLASS
-$cfg->setConfigEntry('node_self_connect_stacker_class', 'FiLoStacker');
+$cfg->setConfigEntry('node_self_connect_stacker_class', 'CoreFramework\Stacker\FiLoStacker');
 
 // CFG: NODE-REQUEST-NODE_LIST-STACKER-CLASS
-$cfg->setConfigEntry('node_request_node_list_stacker_class', 'FiLoStacker');
+$cfg->setConfigEntry('node_request_node_list_stacker_class', 'CoreFramework\Stacker\FiLoStacker');
 
 // CFG: NODE-OBJECT-REGISTRY-TEMPLATE-CLASS
 $cfg->setConfigEntry('node_object_registry_template_class', 'XmlObjectRegistryTemplateEngine');
@@ -367,7 +367,7 @@ $cfg->setConfigEntry('node_object_registry_template_extension', '.xml');
 $cfg->setConfigEntry('node_object_registry_template_type', 'xml/object_registry');
 
 // CFG: NODE-OBJECT-REGISTRY-STACKER-CLASS
-$cfg->setConfigEntry('node_object_registry_stacker_class', 'FiLoStacker');
+$cfg->setConfigEntry('node_object_registry_stacker_class', 'CoreFramework\Stacker\FiLoStacker');
 
 // CFG: NODE-OBJECT-TYPE-REGISTRY-CLASS
 $cfg->setConfigEntry('node_object_type_registry_class', 'ObjectTypeRegistry');
@@ -541,13 +541,13 @@ $cfg->setConfigEntry('task_ping_max_runs', 0);
 $cfg->setConfigEntry('node_package_tags_init_task_class', 'Hub\Node\Task\Initialization\Tag\NodePackageTagsInitTask');
 
 // CFG: NODE-SELFCONNECT-TASK-CLASS
-$cfg->setConfigEntry('node_selfconnect_task_class', 'NodeSelfConnectTask');
+$cfg->setConfigEntry('node_selfconnect_task_class', 'Hub\Node\Task\SelfConnect\NodeSelfConnectTask');
 
 // CFG: NODE-UPDATE-CHECK-TASK-CLASS
-$cfg->setConfigEntry('node_update_check_task_class', 'NodeUpdateCheckTask');
+$cfg->setConfigEntry('node_update_check_task_class', 'Hub\Node\Check\Update\NodeUpdateCheckTask');
 
 // CFG: NODE-PING-TASK-CLASS
-$cfg->setConfigEntry('node_ping_task_class', 'NodePingTask');
+$cfg->setConfigEntry('node_ping_task_class', 'Hub\Node\Ping\NodePingTask');
 
 // CFG: NODE-ANNOUNCEMENT-TASK-CLASS
 $cfg->setConfigEntry('node_announcement_task_class', 'NodeAnnouncementTask');
@@ -571,19 +571,19 @@ $cfg->setConfigEntry('node_package_decoder_task_class', 'Hub\Node\Task\Decoder\N
 $cfg->setConfigEntry('node_dht_init_task_class', 'Hub\Node\Task\Dht\Initialization\NodeDhtInitializationTask');
 
 // CFG: NODE-DHT-BOOTSTRAP-TASK-CLASS
-$cfg->setConfigEntry('node_dht_bootstrap_task_class', 'NodeDhtBootstrapTask');
+$cfg->setConfigEntry('node_dht_bootstrap_task_class', 'Hub\Node\Task\Dht\Bootstrap\NodeDhtBootstrapTask');
 
 // CFG: NODE-DHT-LATE-BOOTSTRAP-TASK-CLASS
 $cfg->setConfigEntry('node_dht_late_bootstrap_task_class', 'NodeDhtLateBootstrapTask');
 
 // CFG: NODE-DHT-QUERY-TASK-CLASS
-$cfg->setConfigEntry('node_dht_query_task_class', 'NodeDhtQueryTask');
+$cfg->setConfigEntry('node_dht_query_task_class', 'Hub\Node\Task\Dht\Query\NodeDhtQueryTask');
 
 // CFG: NODE-DHT-PUBLICATION-CHECK-TASK-CLASS
-$cfg->setConfigEntry('node_dht_publication_check_task_class', 'NodeDhtPublicationCheckTask');
+$cfg->setConfigEntry('node_dht_publication_check_task_class', 'Hub\Node\Task\Dht\Check\Publication\NodeDhtPublicationCheckTask');
 
 // CFG: NODE-DHT-PUBLICATION-TASK-CLASS
-$cfg->setConfigEntry('node_dht_publication_task_class', 'NodeDhtPublicationTask');
+$cfg->setConfigEntry('node_dht_publication_task_class', 'Hub\Node\Task\Dht\Publication\NodeDhtPublicationTask');
 
 // CFG: TASK-NETWORK-PACKAGE-WRITER-STARTUP-DELAY
 $cfg->setConfigEntry('task_network_package_writer_startup_delay', 2500);
@@ -694,7 +694,7 @@ $cfg->setConfigEntry('monitor_pool_iterator_class', 'MonitorPoolIterator');
 $cfg->setConfigEntry('query_iterator_class', 'CoreFramework\Iterator\DefaultIterator');
 
 // CFG: NODE-PING-ITERATOR-CLASS
-$cfg->setConfigEntry('node_ping_iterator_class', 'HubPingIterator');
+$cfg->setConfigEntry('node_ping_iterator_class', 'Hub\Iterator\Node\Ping\NodePingIterator');
 
 // CFG: WEB-TEMPLATE-CLASS @OVERRIDE
 $cfg->setConfigEntry('web_template_class', 'ConsoleTemplateEngine');
@@ -897,16 +897,16 @@ $cfg->setConfigEntry('peer_no_route_to_host_state_class', 'NoRouteToHostPeerStat
 ///////////////////////////////////////////////////////////////////////////////
 
 // CFG: DHT-INIT-STATE-CLASS
-$cfg->setConfigEntry('dht_init_state_class', 'DhtInitState');
+$cfg->setConfigEntry('dht_init_state_class', 'Hub\State\Dht\DhtInitState');
 
 // CFG: DHT-VIRGIN-STATE-CLASS
-$cfg->setConfigEntry('dht_virgin_state_class', 'DhtVirginState');
+$cfg->setConfigEntry('dht_virgin_state_class', 'Hub\State\Dht\DhtVirginState');
 
 // CFG: DHT-BOOTING-STATE-CLASS
-$cfg->setConfigEntry('dht_booting_state_class', 'DhtBootingState');
+$cfg->setConfigEntry('dht_booting_state_class', 'Hub\State\Dht\DhtBootingState');
 
 // CFG: DHT-ACTIVE-STATE-CLASS
-$cfg->setConfigEntry('dht_active_state_class', 'DhtActiveState');
+$cfg->setConfigEntry('dht_active_state_class', 'Hub\State\Dht\DhtActiveState');
 
 ///////////////////////////////////////////////////////////////////////////////
 //                       Message answer-status handler
@@ -1141,7 +1141,7 @@ $cfg->setConfigEntry('cruncher_message_template_extension', '.xml');
 $cfg->setConfigEntry('cruncher_test_unit_template_extension', '.xml');
 
 // CFG: CRUNCHER-TEST-UNIT-STACKER-CLASS
-$cfg->setConfigEntry('cruncher_test_unit_stacker_class', 'FiLoStacker');
+$cfg->setConfigEntry('cruncher_test_unit_stacker_class', 'CoreFramework\Stacker\FiLoStacker');
 
 // CFG: CRUNCHER-TEST-UNIT-TEMPLATE-TYPE
 $cfg->setConfigEntry('cruncher_test_unit_template_type', 'xml/cruncher/producer');
index 6d7baf54b37fcd7e4c459ec4b4e38be78082ccdd..e8e12a5666ca55c479e96380615d5ad576a08a85 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Node\Registering;
 
+// Import application-specific stuff
+use Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
+
 // Import framework stuff
 use CoreFramework\Generic\FrameworkException;
 
index 4e6b8041e087db06673fd1467fc86182296e2b12..45786eccc55b09ade4ae1255fa6bfa59b4c7e598 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Node\Data;
 
+// Import application-specific stuff
+use Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
+
 // Import framework stuff
 use CoreFramework\Generic\FrameworkException;
 
index 6f5177e5c70fb327b613474615f5212a26704a7f..8629f4d13c36050829d3ca1674bee3879540fb53 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Dht\Node;
 
+// Import application-specific stuff
+use Hub\Dht\Distributable;
+
 // Import framework stuff
 use CoreFramework\Handler\DataSet\HandleableDataSet;
 
@@ -111,7 +114,5 @@ interface DistributableNode extends Distributable {
         * @return      void
         */
        function publishEntry ();
-}
 
-// [EOF]
-?>
+}
index b208b74bfcf145224d8439c2a0ddd61a174ee7e4..cb48498c3d6d1ac4082457a0147bef5db75bd6cc 100644 (file)
@@ -3,6 +3,7 @@
 namespace Hub\Helper\Dht;
 
 // Import application-specific stuff
+use Hub\Dht\Distributable;
 use Hub\Helper\HubHelper;
 
 /**
diff --git a/core b/core
index d506014f84d8e6a76ea67ef59537fc56f5f1c364..8180df9650994694ac2db841d91b6bfa2d83d36f 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit d506014f84d8e6a76ea67ef59537fc56f5f1c364
+Subproject commit 8180df9650994694ac2db841d91b6bfa2d83d36f