]> git.mxchange.org Git - hub.git/commitdiff
Next wave:
authorRoland Häder <roland@mxchange.org>
Thu, 18 May 2017 23:51:58 +0000 (01:51 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 21 Aug 2020 16:49:58 +0000 (18:49 +0200)
- imported [Node|Dht]ObjectFactory
- created namespaces

Signed-off-by: Roland Häder <roland@mxchange.org>
53 files changed:
application/hub/classes/commands/console/class_HubConsoleMainCommand.php
application/hub/classes/cruncher/class_BaseHubCruncher.php
application/hub/classes/database/frontend/node/class_NodeDistributedHashTableDatabaseWrapper.php
application/hub/classes/dht/class_BaseDht.php
application/hub/classes/discovery/recipient/dht/class_DhtRecipientDiscovery.php
application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php
application/hub/classes/factories/class_
application/hub/classes/factories/dht/class_DhtObjectFactory.php
application/hub/classes/factories/states/node/class_NodeStateFactory.php
application/hub/classes/filter/activation/node/class_NodeActivation
application/hub/classes/filter/bootstrap/node/class_NodeBootstrap
application/hub/classes/filter/bootstrap/node/class_NodeBootstrapExtraBootstrappingFilter.php
application/hub/classes/filter/bootstrap/node/class_NodeBootstrapGenerateNodeIdFilter.php
application/hub/classes/filter/bootstrap/node/class_NodeBootstrapGeneratePrivateKeyFilter.php
application/hub/classes/filter/bootstrap/node/class_NodeBootstrapGenerateSessionIdFilter.php
application/hub/classes/filter/bootstrap/node/class_NodeBootstrapListenerPoolFilter.php
application/hub/classes/filter/class_
application/hub/classes/filter/node/class_NodeInitializationFilter.php
application/hub/classes/filter/node/class_NodeWelcomeTeaserFilter.php
application/hub/classes/filter/shutdown/node/class_NodeShutdown
application/hub/classes/filter/shutdown/node/class_NodeShutdownFlushNodeListFilter.php
application/hub/classes/filter/shutdown/node/class_NodeShutdownNodeFilter.php
application/hub/classes/filter/task/node/class_NodeTaskHandlerInitializerFilter.php
application/hub/classes/handler/answer-status/announcement/class_AnnouncementAnswerOkayHandler.php [deleted file]
application/hub/classes/handler/answer-status/announcement/class_NodeAnnouncementAnswerOkayHandler.php [new file with mode: 0644]
application/hub/classes/handler/message-types/announcement/class_NodeMessageAnnouncementHandler.php
application/hub/classes/handler/message-types/answer/class_NodeMessageAnnouncementAnswerHandler.php
application/hub/classes/handler/message-types/answer/class_NodeMessageDhtBootstrapAnswerHandler.php
application/hub/classes/handler/message-types/answer/class_NodeMessageRequestNodeListAnswerHandler.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/message-types/self-connect/class_NodeMessageSelfConnectHandler.php
application/hub/classes/miner/class_BaseHubMiner.php
application/hub/classes/nodes/class_BaseHubNode.php
application/hub/classes/package/class_NetworkPackage.php
application/hub/classes/pools/class_BasePool.php
application/hub/classes/producer/class_BaseProducer.php
application/hub/classes/states/dht/booting/class_DhtBootingState.php
application/hub/classes/states/node/active/class_NodeActiveState.php
application/hub/classes/tasks/node/announcement/class_NodeAnnouncementTask.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/tasks/node/listener/class_NodeSocketListenerTask.php
application/hub/classes/tasks/node/self_connect/class_NodeSelfConnectTask.php
application/hub/classes/template/class_BaseXmlTemplateEngine.php
application/hub/classes/tools/class_HubTools.php
application/hub/config.php
application/hub/exceptions/dht/class_DhtBootstrapNotAcceptedException.php
application/hub/exceptions/factory/class_FactoryRequiredParameterException.php

index ccebfc281386af2fe62224025991df018ac46319..db9deed0ecb6839bb6e7d1e9f4fb714fd9976b52 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Command;
 
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 // Import framework stuff
 use CoreFramework\Command\BaseCommand;
 use CoreFramework\Command\Commandable;
index db94a79bc9bc3d9a8768d3d60dfcf9ac0d2f1270..ea6e6c100be0099ab00c170aa444173d6bddc93a 100644 (file)
@@ -6,6 +6,7 @@ namespace Hub\Cruncher;
 use Hub\Generic\BaseHubSystem;
 
 // Import framework stuff
+use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Object\BaseFrameworkSystem;
 
 /**
index 71862c67a1532aeecd0f4035a10e2ad3564ba24d..7e074d925be4e0b41d1312443625ff55483d7913 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Database\Frontend\Node\Dht;
+
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 /**
  * A database wrapper for distributed hash tables
  *
index aa2efb7e03958af2faa97d10eda592b453fa5a6c..4d5c5ff0dc7ee5862ba440731994b2bc49dabef6 100644 (file)
@@ -5,6 +5,9 @@ namespace Hub\Dht;
 // Import hub-specific stuff
 use Hub\Generic\BaseHubSystem;
 
+// Import framework stuff
+use CoreFramework\Factory\ObjectFactory;
+
 /**
  * A general DHT class
  *
index f090f1d30a83c94447f32f7a70670386c3b6d121..c05c7bbe4a48be3d1c1ceef409008068c7d4655b 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Discovery\Dht\Recipient;
+
+// Import application-specific stuff
+use Hub\Factory\Dht\DhtObjectFactory;
+
 /**
  * A DhtRecipient discovery class
  *
index 36349d7591b67e6b0cbd32eeab2b0c39905b3386..ae727099c7e81336d8b9eff5d70dfe46e73d9ede 100644 (file)
@@ -3,6 +3,7 @@
 namespace Hub\Network\Discovery\Socket;
 
 // Import hub-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
 use Hub\Generic\BaseHubSystem;
 
 /**
index d23d9641fd6ba2f8fda935579b45e3033b16aa2e..2c3b4db53b669bf5af088cbeb9da9cd090442268 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Factory\;
+
+// Import framework stuff
+use CoreFramework\Factory\ObjectFactory;
+
 /**
  * A factory class for !!!
  *
index 6555908a6cac87321e3e93c71d3d09a62d04eed3..9bd4e96bceabe19da890aeda3e9dacbb2af9d354 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Factory\Dht;
+
+// Import framework stuff
+use CoreFramework\Factory\ObjectFactory;
+
 /**
  * A factory class for DHT objects
  *
index 8b67277885bc2c6f2a26d6563b3f9a02256f8adc..4224bf70b43cf7bce2b79dc2f9c4aadf209c312b 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Factory\State\Node;
+
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 /**
  * A factory class for node states
  *
index f43dacb31d30bd58ea94050a3f7cd9059703e39b..9aae8fb3b738c9aa2d1615abdcd322914120466d 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Filter\Activation\Node\;
 
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 // Import framework stuff
 use CoreFramework\Request\Requestable;
 use CoreFramework\Response\Responseable;
index b358f4893c2bed11b2db197cbd4109043d1e9623..77a392e73201288d4298038a01092f1e84ad2ed2 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Filter\Bootstrap\Node\;
 
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 // Import framework stuff
 use CoreFramework\Request\Requestable;
 use CoreFramework\Response\Responseable;
index a83efcbd4a1f984d7121f66c512efd80a9c2f767..7634ee4e771c406e00848aec0529054687837525 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Filter\Bootstrap\Node\Extra;
 
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 // Import framework stuff
 use CoreFramework\Request\Requestable;
 use CoreFramework\Response\Responseable;
index 195b4cd874595336245804adb6a0ed33e528b580..fd4044d415e70a8b4e02d56af7b546b88d04d6fd 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Filter\Bootstrap\Node\NodeId;
 
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 // Import framework stuff
 use CoreFramework\Request\Requestable;
 use CoreFramework\Response\Responseable;
index 976ba1828dcb40aaecf3f85f2672519143dfd8f4..46389ff084178b78b9d4e06f9e9dafb66bb1e748 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Filter\Bootstrap\Node\PrivateKey;
 
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 // Import framework stuff
 use CoreFramework\Request\Requestable;
 use CoreFramework\Response\Responseable;
index c77bfc58c89ebe98226f4ab2e71b041884c8001a..e5033f060666cdb7da65d38155eeb1e171580e31 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Filter\Bootstrap\Node;
 
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 // Import framework stuff
 use CoreFramework\Request\Requestable;
 use CoreFramework\Response\Responseable;
index 9f9b87506b58d5a02764285d6d7e932fec1ce928..90a5f723b1a0fd7d8d05e01c8ae36fdb90c6088d 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Filter\Bootstrap\Node\Pool;
 
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 // Import framework stuff
 use CoreFramework\Request\Requestable;
 use CoreFramework\Response\Responseable;
index ec2db3e7e6447f0e3fccae259d95451d27429b40..a667fcb063362328810e2cb5dcdaf4394aa3fde6 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Filter\;
 
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 // Import framework stuff
 use CoreFramework\Request\Requestable;
 use CoreFramework\Response\Responseable;
index 1b02690345251f2dac2e2a35ac5b7a04bd980abd..dbee5f116fa2ad0900096755a9a547f628e9d3c2 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Node\Filter\Initialization;
 
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 // Import framework stuff
 use CoreFramework\Request\Requestable;
 use CoreFramework\Response\Responseable;
index bdb6db8e207870eaa3904703c886e80f598f3b8d..5f680a0db7bd06f090f524500e41498b18f7a821 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Node\Filter\WelcomeTeaser;
 
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 // Import framework stuff
 use CoreFramework\Request\Requestable;
 use CoreFramework\Response\Responseable;
index a94d37a5f17bc6eb21fb595b4b487f7b189604f8..8953e4f52dd0f179308c822b80d4685dd2f42956 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Filter\Shutdown\Node\;
 
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 // Import framework stuff
 use CoreFramework\Request\Requestable;
 use CoreFramework\Response\Responseable;
index 2e397775ec5c841f660fd4e3cdec9b3cce298ab1..8ae253f63ff33ba2e90a947696f428c7ade8ebe6 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Filter\Shutdown\Node\NodeList;
 
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 // Import framework stuff
 use CoreFramework\Request\Requestable;
 use CoreFramework\Response\Responseable;
index 5e886870241da25db68b957781c058dd123e62a9..e17567a83967b1c45f0452ec28efc2ddb2934fea 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Filter\Shutdown\Node;
 
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 // Import framework stuff
 use CoreFramework\Request\Requestable;
 use CoreFramework\Response\Responseable;
index 47ed0fccea2b16d61bcc94d69a67a97da37f6617..ba0fc32385d58117f27057fccd1c3f93f0ad0bef 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Filter\Initializer\Node\Handler\Task;
 
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 // Import framework stuff
 use CoreFramework\Request\Requestable;
 use CoreFramework\Response\Responseable;
diff --git a/application/hub/classes/handler/answer-status/announcement/class_AnnouncementAnswerOkayHandler.php b/application/hub/classes/handler/answer-status/announcement/class_AnnouncementAnswerOkayHandler.php
deleted file mode 100644 (file)
index 64425d5..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-<?php
-/**
- * A AnnouncementAnswerOkay handler
- *
- * @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 AnnouncementAnswerOkayHandler extends BaseAnserStatusHandler implements HandleableAnswerStatus, Registerable {
-       /**
-        * Protected constructor
-        *
-        * @return      void
-        */
-       protected function __construct () {
-               // Call parent constructor
-               parent::__construct(__CLASS__);
-
-               // Init array
-               $this->searchData = array(
-                       XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_SESSION_ID,
-                       XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_EXTERNAL_ADDRESS,
-               );
-
-               // Set handler name
-               $this->setHandlerName('announcement_answer_okay');
-       }
-
-       /**
-        * Creates an instance of this class
-        *
-        * @return      $handlerInstance        An instance of a HandleableMessage class
-        */
-       public final static function createAnnouncementAnswerOkayHandler () {
-               // Get new instance
-               $handlerInstance = new AnnouncementAnswerOkayHandler();
-
-               // Return the prepared instance
-               return $handlerInstance;
-       }
-
-       /**
-        * Handles given message data array
-        *
-        * @param       $messageData            An array of message data
-        * @param       $packageInstance        An instance of a Receivable class
-        * @return      void
-        * @todo        Do some more here: Handle karma, et cetera?
-        */
-       public function handleAnswerMessageData (array $messageData, Receivable $packageInstance) {
-               /*
-                * Query DHT and force update (which will throw an exception if the
-                * node is not found).
-                */
-               $this->getDhtInstance()->registerNodeByMessageData($messageData, $this, TRUE);
-
-               // Get handler instance
-               $handlerInstance = Registry::getRegistry()->getInstance('task_handler');
-
-               // Generate DHT bootstrap task
-               $taskInstance = ObjectFactory::createObjectByConfiguredName('node_dht_late_bootstrap_task_class');
-
-               // Register it as well
-               $handlerInstance->registerTask('dht_late_bootstrap', $taskInstance);
-
-               // Get the node instance
-               $nodeInstance = NodeObjectFactory::createNodeInstance();
-
-               // Change state
-               $nodeInstance->getStateInstance()->nodeAnnouncementSuccessful();
-
-               // Prepare next message
-               $this->prepareNextMessage($messageData, $packageInstance);
-       }
-
-       /**
-        * Initializes configuration data from given message data array
-        *
-        * The following array is being handled over:
-        *
-        *   my-external-address => 1.2.3.4
-        *   my-internal-address => 5.6.7.8
-        *   my-status           => reachable
-        *   my-node-id          => aaabbbcccdddeeefff123456789
-        *   my-session-id       => aaabbbcccdddeeefff123456789
-        *   my-tcp-port         => 9060
-        *   my-udp-port         => 9060
-        *   answer-status       => OKAY
-        *   message_type        => announcement_answer
-        *
-        * @param       $messageData    An array with all message data
-        * @return      void
-        */
-       protected function initMessageConfigurationData (array $messageData) {
-               // Get node instance
-               $nodeInstance = NodeObjectFactory::createNodeInstance();
-
-               // Get an array of all accepted object types
-               $objectList = $nodeInstance->getListFromAcceptedObjectTypes();
-
-               // Add missing (temporary) configuration 'accepted_object_types'
-               $this->getConfigInstance()->setConfigEntry(NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_ACCEPTED_OBJECTS, implode(BaseHubNode::OBJECT_LIST_SEPARATOR, $objectList));
-       }
-
-       /**
-        * Removes configuration data with given message data array from global
-        * configuration. For content of $messageData see method comment above.
-        *
-        * @param       $messageData    An array with all message data
-        * @return      void
-        */
-       protected function removeMessageConfigurationData (array $messageData) {
-               // Remove temporay configuration
-               $this->getConfigInstance()->unsetConfigEntry(NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_ACCEPTED_OBJECTS);
-       }
-}
-
-// [EOF]
-?>
diff --git a/application/hub/classes/handler/answer-status/announcement/class_NodeAnnouncementAnswerOkayHandler.php b/application/hub/classes/handler/answer-status/announcement/class_NodeAnnouncementAnswerOkayHandler.php
new file mode 100644 (file)
index 0000000..c797e70
--- /dev/null
@@ -0,0 +1,140 @@
+<?php
+// Own namespace
+namespace Hub\Handler\Node\Announcement\Answer;
+
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
+/**
+ * A AnnouncementAnswerOkay handler
+ *
+ * @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 NodeAnnouncementAnswerOkayHandler extends BaseAnserStatusHandler implements HandleableAnswerStatus, Registerable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Init array
+               $this->searchData = array(
+                       XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_SESSION_ID,
+                       XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_EXTERNAL_ADDRESS,
+               );
+
+               // Set handler name
+               $this->setHandlerName('announcement_answer_okay');
+       }
+
+       /**
+        * Creates an instance of this class
+        *
+        * @return      $handlerInstance        An instance of a HandleableMessage class
+        */
+       public final static function createNodeAnnouncementAnswerOkayHandler () {
+               // Get new instance
+               $handlerInstance = new NodeAnnouncementAnswerOkayHandler();
+
+               // Return the prepared instance
+               return $handlerInstance;
+       }
+
+       /**
+        * Handles given message data array
+        *
+        * @param       $messageData            An array of message data
+        * @param       $packageInstance        An instance of a Receivable class
+        * @return      void
+        * @todo        Do some more here: Handle karma, et cetera?
+        */
+       public function handleAnswerMessageData (array $messageData, Receivable $packageInstance) {
+               /*
+                * Query DHT and force update (which will throw an exception if the
+                * node is not found).
+                */
+               $this->getDhtInstance()->registerNodeByMessageData($messageData, $this, TRUE);
+
+               // Get handler instance
+               $handlerInstance = Registry::getRegistry()->getInstance('task_handler');
+
+               // Generate DHT bootstrap task
+               $taskInstance = ObjectFactory::createObjectByConfiguredName('node_dht_late_bootstrap_task_class');
+
+               // Register it as well
+               $handlerInstance->registerTask('dht_late_bootstrap', $taskInstance);
+
+               // Get the node instance
+               $nodeInstance = NodeObjectFactory::createNodeInstance();
+
+               // Change state
+               $nodeInstance->getStateInstance()->nodeAnnouncementSuccessful();
+
+               // Prepare next message
+               $this->prepareNextMessage($messageData, $packageInstance);
+       }
+
+       /**
+        * Initializes configuration data from given message data array
+        *
+        * The following array is being handled over:
+        *
+        *   my-external-address => 1.2.3.4
+        *   my-internal-address => 5.6.7.8
+        *   my-status           => reachable
+        *   my-node-id          => aaabbbcccdddeeefff123456789
+        *   my-session-id       => aaabbbcccdddeeefff123456789
+        *   my-tcp-port         => 9060
+        *   my-udp-port         => 9060
+        *   answer-status       => OKAY
+        *   message_type        => announcement_answer
+        *
+        * @param       $messageData    An array with all message data
+        * @return      void
+        */
+       protected function initMessageConfigurationData (array $messageData) {
+               // Get node instance
+               $nodeInstance = NodeObjectFactory::createNodeInstance();
+
+               // Get an array of all accepted object types
+               $objectList = $nodeInstance->getListFromAcceptedObjectTypes();
+
+               // Add missing (temporary) configuration 'accepted_object_types'
+               $this->getConfigInstance()->setConfigEntry(NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_ACCEPTED_OBJECTS, implode(BaseHubNode::OBJECT_LIST_SEPARATOR, $objectList));
+       }
+
+       /**
+        * Removes configuration data with given message data array from global
+        * configuration. For content of $messageData see method comment above.
+        *
+        * @param       $messageData    An array with all message data
+        * @return      void
+        */
+       protected function removeMessageConfigurationData (array $messageData) {
+               // Remove temporay configuration
+               $this->getConfigInstance()->unsetConfigEntry(NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_ACCEPTED_OBJECTS);
+       }
+}
+
+// [EOF]
+?>
index 5f14fc1e012e1c9970540a2f71c37712058de519..8dba472f994aaf2d104631155ffb5773ea8bbd5f 100644 (file)
@@ -2,7 +2,8 @@
 // Own namespace
 namespace Hub\Handler\Node\Message\Announcement;
 
-// Import hub-specific stuff
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
 use Hub\Generic\BaseHubSystem;
 
 /**
index 6ccd1619b46051145ba78555ce1b25d733dae230..0b5a64b6114d1691166947a4fbe188d92ebfabfa 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Handler\Node\Answer\Announcement;
+
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 /**
  * A NodeMessageAnnouncementAnswer handler
  *
index 85c9165e8f430049c255b7b547ee0af55fadd3d0..730df8e88687a40a8ad49201dcb2de0905927a26 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Handler\Answer\Node\DhtBootstrap;
+
+// Import application-specific stuff
+use Hub\Factory\Dht\DhtObjectFactory;
+
 /**
  * A NodeMessageDhtBootstrapAnswer handler
  *
index 9f7700f3000c4c9be40bf7bf473920e9cfed2dfc..e5f3c468333099953f5ea4112ad84bb5c3aa1437 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Handler\Node\Answer\Request\NodeList;
+
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 /**
  * A NodeMessageRequestNodeListAnswer handler
  *
index 4a70de0260ca176dfa93237c0ba1be9421994a23..527b24faef8b4be035e5115ac6550f042581e8e1 100644 (file)
@@ -1,4 +1,11 @@
 <?php
+// Own namespace
+namespace Hub\Handler\Node\Answer\Dht\Bootstrap;
+
+// Import application-specific stuff
+use Hub\Factory\Dht\DhtObjectFactory;
+use Hub\Factory\Node\NodeObjectFactory;
+
 /**
  * A NodeMessageDhtBootstrap handler
  *
index e52e0b3655c5f0c1a6b5426f439d112a6fa03d51..2e35f026ea496d518a225c619e9053b28123fdba 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Handler\Node\Message\Request\NodeList;
+
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 /**
  * A NodeMessageRequestNodeList handler
  *
index b8eea12c43dca08ce7af22cb71fa21bafe240f64..50f111f91fca0bb9eb7d57634f10bd6f4b7dfcc8 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Handler\Node\Message\SelfConnect;
+
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 /**
  * A NodeMessageSelfConnect handler
  *
index e4cec8cb78702461b653f63b2242b43cf960575f..7efa3f1f9e312e2c53220d7908d3ac680fb7fb8a 100644 (file)
@@ -6,6 +6,7 @@ namespace Hub\Miner;
 use Hub\Generic\BaseHubSystem;
 
 // Import framework stuff
+use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Object\BaseFrameworkSystem;
 
 /**
index b5abf004514ab1efab3c272d8111d55c12b7e4d4..af7b5d5cd1748df36ebe63faaa58647b6ce64a3d 100644 (file)
@@ -7,6 +7,7 @@ use Hub\Generic\BaseHubSystem;
 use Hub\Tools\HubTools;
 
 // Import framework stuff
+use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Object\BaseFrameworkSystem;
 use CoreFramework\Request\Requestable;
 use CoreFramework\Response\Responseable;
index b618a2b46940427a3e3ba2513640114736fb1f4d..97cd6b1a833fcaf02c889ea6d0c7a5d5fe88557f 100644 (file)
@@ -2,10 +2,15 @@
 // Own namespace
 namespace Hub\Network\Package;
 
-// Import hub-specific stuff
+// Import application-specific stuff
+use Hub\Factory\Dht\DhtObjectFactory;
+use Hub\Factory\Node\NodeObjectFactory;
 use Hub\Generic\BaseHubSystem;
 use Hub\Tools\HubTools;
 
+// Import framework stuff
+use CoreFramework\Factory\ObjectFactory;
+
 /**
  * A NetworkPackage class. This class implements Deliverable and Receivable
  * because all network packages should be deliverable to other nodes and
index 06d02d3eb08e6ab90bb9876cf4dd26353bde9c01..f4939f080c0831f72f7541bff0a309f9e2511bb7 100644 (file)
@@ -5,6 +5,9 @@ namespace Hub\Pool;
 // Import hub-specific stuff
 use Hub\Generic\BaseHubSystem;
 
+// Import framework stuff
+use CoreFramework\Factory\ObjectFactory;
+
 /**
  * A general pool class
  *
index 647a5cbcf8c5dbf82f6761776ae2835fbcf3679d..ee658260708589d5faf36dc216262fc70d862e05 100644 (file)
@@ -3,6 +3,7 @@
 namespace Hub\Producer;
 
 // Import framework stuff
+use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Object\BaseFrameworkSystem;
 
 /**
index 55e99137496249f6d206ce17bd67bb7e107a8679..91493f013a9eeb62796dfa00bb1d86ef036d6434 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Dht\Booting;
+
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 /**
  * A Booting dht state class
  *
index 0352ff754aabdccfe2052083fcb83ae30c7d578e..3ce52937dcad82be83d71598dab30946235b9eea 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Node\Active;
+
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 /**
  * An active node state class
  *
index e7ee04ac78c7d1b121f121bb02780711075422db..73d3d4e45bc842a760325e5a8cfd2fee1237fb14 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Task\Node\Announcement;
+
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 /**
  * A Announcement node-task
  *
index acbd89bdc2fc93577e51d36bf6111bd752f23013..5d48c5b1d2a17d308cc5b8f5286300b37aaca646 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Task\Node\Dht\Bootstrap;
+
+// Import application-specific stuff
+use Hub\Factory\Dht\DhtObjectFactory;
+
 /**
  * A DhtBootstrap node-task
  *
index 2c0815723c1e887e05f6e04aae96355342ee991e..2ab6352a8b19a1b7b7c675fbc443d436d745e4bb 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Task\Node\Dht\Initialization;
+
+// Import application-specific stuff
+use Hub\Factory\Dht\DhtObjectFactory;
+
 /**
  * A DhtInitialization node-task
  *
index 965fe9f0e6be76436c3168de1f779cf9abf8a26a..e15a6c8d752c134939e8144a4789c4bca655fc62 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Task\Node\Dht\Bootstrap\Late;
+
+// Import application-specific stuff
+use Hub\Factory\Dht\DhtObjectFactory;
+
 /**
  * A DhtBootstrap node-task
  *
index 2b281e5b02d1b7b8fb715425096ae9a3476d94d4..cbdfa5f4554c2cadf435b6b9a5f49186fdb829ab 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Task\Node\Dht\Check\Publication;
+
+// Import application-specific stuff
+use Hub\Factory\Dht\DhtObjectFactory;
+
 /**
  * A DhtPublicationCheck node-task
  *
index b31d65c48fa64405d96cbad6bb8dba0dd1e7b168..8d43b6e3756f8786f5ef058f67b00fd604097ff6 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Task\Node\Dht\Publication;
+
+// Import application-specific stuff
+use Hub\Factory\Dht\DhtObjectFactory;
+
 /**
  * A DhtPublication node-task
  *
index 0eb9755ba081e53e9768c2cd9d3c86c020893171..9375ddecb2ac479cce05fae9366c39e14a315d73 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Task\Node\Dht\Query;
+
+// Import application-specific stuff
+use Hub\Factory\Dht\DhtObjectFactory;
+
 /**
  * A DhtQuery node-task
  *
index 8ef264635a254b675fcef811ec19809cb74c11a4..b4dae1fd5d161859beb73b00938abdfad167deb1 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Task\Node\Listener\Socket;
+
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 /**
  * A HubSocketListener task
  *
index 924bf3cdc34bd08616b320a6f8c6647a63ce3968..68bdbc990c6e9fe1c820cb19ea69e5d6c7bab312 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Task\Node\SelfConnect;
+
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 /**
  * A SelfConnect node-task
  *
index 2894b511b0667be90a2d7778063ed6e2c7fa5e0f..7406f9835ec0c8043ac7e542091ff7e0db8f7bb1 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\TemplateEngine\Xml;
+
+// Import framework stuff
+use CoreFramework\Factory\ObjectFactory;
+
 /**
  * A generic XML template engine class
  *
index 3bf7b135cd46d67ab6ca9d9b2f25d0a44cc6639c..d76a87b6ac784240924a026304a7c2da0257aca7 100644 (file)
@@ -2,11 +2,14 @@
 // Own namespace
 namespace Hub\Tools;
 
-// Import hub-specific stuff
+// Import application-specific stuff
+use Hub\Factory\Dht\DhtObjectFactory;
+use Hub\Factory\Node\NodeObjectFactory;
 use Hub\Generic\BaseHubSystem;
 
 // Import framework stuff
 use CoreFramework\Configuration\FrameworkConfiguration;
+use CoreFramework\Factory\ObjectFactory;
 
 /**
  * This class contains static helper functions for our hub
index 97caf06a3426d1305e73d2099ebe217e71afed25..b20eeca1526f8291740eaa2e152657aa82c74e70 100644 (file)
@@ -910,7 +910,7 @@ $cfg->setConfigEntry('dht_active_state_class', 'DhtActiveState');
 ///////////////////////////////////////////////////////////////////////////////
 
 // CFG: ANNOUNCEMENT-ANSWER-STATUS-OKAY-HANDLER-CLASS
-$cfg->setConfigEntry('announcement_answer_status_okay_handler_class', 'AnnouncementAnswerOkayHandler');
+$cfg->setConfigEntry('announcement_answer_status_okay_handler_class', 'Hub\Handler\Node\Announcement\Answer\NodeAnnouncementAnswerOkayHandler');
 
 // CFG: REQUEST-NODE-LIST-ANSWER-STATUS-OKAY-HANDLER-CLASS
 $cfg->setConfigEntry('request_node_list_answer_status_okay_handler_class', 'RequestNodeListAnswerOkayHandler');
index 474d86e2b627e926551e59133f8c7526b89bb7bc..7f44a8fb9db4a6e8bf452d66ffdc0ef58c3a2641 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Node\Bootstrap;
+
+// Import application-specific stuff
+use Hub\Factory\Node\NodeObjectFactory;
+
 /**
  * This exception is thrown when a DHT bootstrap request from other nodes was
  * received but this node doesn't accept such requests.
index 923c977b07090a042f769c2183e6610145855314..b5bb886926b83b97517c294e339fe55f76ccc51d 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Factory\Parameter;
+
+// Import framework stuff
+use CoreFramework\Factory\ObjectFactory;
+
 /**
  * This exception is thrown if not all required parameter are given.
  *