]> git.mxchange.org Git - hub.git/commitdiff
Added missing method nodeAnnouncedToUpperHubs to state NodeReachableState, fixed...
authorRoland Häder <roland@mxchange.org>
Thu, 16 Aug 2012 18:58:04 +0000 (18:58 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 16 Aug 2012 18:58:04 +0000 (18:58 +0000)
application/hub/exceptions/announcement/class_NoAnnouncementAttemptedException.php
application/hub/main/states/node/seniors/class_NodeReachableState.php

index fa8fdf59b9b8b36a3215d6082437a3af10632854..6363de18f8d59ff84a483fd08c71cecda9e638d1 100644 (file)
@@ -36,12 +36,12 @@ class NoAnnouncementAttemptedException extends FrameworkException {
                        $messageArray[0]->__toString(),
                        $this->getLine(),
                        $messageArray[1]->__toString(),
-                       $messageArray[2][XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_SESSION_ID],
-                       $messageArray[2][XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_EXTERNAL_IP],
-                       $messageArray[2][XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_INTERNAL_IP],
-                       $messageArray[2][XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_TCP_PORT],
-                       $messageArray[2][XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_UDP_PORT],
-                       $messageArray[2][XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_NODE_STATUS]
+                       $messageArray[2][XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_SESSION_ID],
+                       $messageArray[2][XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_EXTERNAL_IP],
+                       $messageArray[2][XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_INTERNAL_IP],
+                       $messageArray[2][XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_TCP_PORT],
+                       $messageArray[2][XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_UDP_PORT],
+                       $messageArray[2][XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_NODE_STATUS]
                );
 
                // Call parent exception constructor
index f4b8965c78d2f5949395a52495bf78a0d6a8848c..a0cdba1f8894b9b6243aa99757f92e73625b369d 100644 (file)
@@ -54,6 +54,16 @@ class NodeReachableState extends BaseNodeState implements Stateable {
                // Return the prepared instance
                return $stateInstance;
        }
+
+       /**
+        * State change for if the node got announced to it's upper hubs
+        *
+        * @return      void
+        */
+       public function nodeAnnouncedToUpperHubs () {
+               // Create the new state instance
+               NodeStateFactory::createNodeStateInstanceByName('announced', $this->getNodeInstance());
+       }
 }
 
 // [EOF]