]> git.mxchange.org Git - hub.git/commitdiff
Added noisy debug lines, used constants defined in NetworkPackage instead of direct...
authorRoland Häder <roland@mxchange.org>
Thu, 21 Feb 2013 23:32:43 +0000 (23:32 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 21 Feb 2013 23:32:43 +0000 (23:32 +0000)
application/hub/main/recipient/dht/class_DhtRecipient.php
application/hub/main/recipient/direct/class_DirectRecipient.php
application/hub/main/recipient/self/class_SelfRecipient.php
application/hub/main/recipient/upper/class_UpperRecipient.php

index baef263859152d8f7410cb8bc86fa7bc253baada..c8d31c9854ebce792194cfaa8fd9e11de74681f3 100644 (file)
@@ -57,7 +57,8 @@ class DhtRecipient extends BaseRecipient implements Recipient {
         */
        public function resolveRecipient ($recipient, Listable $listInstance) {
                // Make sure the recipient is valid
-               assert($recipient == 'dht');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DHT-RECIPIENT: recipient=' . $recipient);
+               assert($recipient == NetworkPacke::PACKAGE_RECIPIENT_DHT);
                $this->partialStub('Please implement this method. recipient=' . $recipient);
        }
 }
index 1fafba533d3756e6dedf05b1079690fffc2ba7fc..a6089b093ac41e46ae765ae3ba5710dee8281aaa 100644 (file)
@@ -55,6 +55,9 @@ class DirectRecipient extends BaseRecipient implements Recipient {
         * @throws      FrameworkException      Could throw different exceptions depending on implementation
         */
        public function resolveRecipient ($recipient, Listable $listInstance = NULL) {
+               // Debug message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DIRECT-RECIPIENT: recipient=' . $recipient);
+
                // "Explode" all recipients
                $recipients = explode(NetworkPackage::PACKAGE_RECIPIENT_SEPARATOR, $recipient);
 
index 307f299973c10ad208a7c59ee931ef62de42058a..10c0bb1f0469da525c290c33ba5f84536d34c468 100644 (file)
@@ -56,7 +56,8 @@ class SelfRecipient extends BaseRecipient implements Recipient {
         */
        public function resolveRecipient ($recipient, Listable $listInstance) {
                // Make sure the recipient is valid
-               assert($recipient == 'self');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SELF-RECIPIENT: recipient=' . $recipient);
+               assert($recipient == NetworkPackage::NETWORK_TARGET_SELF);
 
                // Determine own port
                $port = $this->getConfigInstance()->getConfigEntry('node_listen_port');
index 408c62609bfd969fc27f52dde491deb86bbb47d9..db6cb2643742ed65e28b76958de956995ecd8845 100644 (file)
@@ -56,7 +56,8 @@ class UpperRecipient extends BaseRecipient implements Recipient {
         */
        public function resolveRecipient ($recipient, Listable $listInstance) {
                // Make sure the recipient is valid
-               assert($recipient == 'upper');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('UPPER-RECIPIENT: recipient=' . $recipient);
+               assert($recipient == NetworkPackage::PACKAGE_RECIPIENT_UPPER);
 
                // Get all bootstrap nodes
                foreach (explode(BaseHubSystem::BOOTSTRAP_NODES_SEPARATOR, $this->getConfigInstance()->getConfigEntry('hub_bootstrap_nodes')) as $ipPort) {