]> git.mxchange.org Git - hub.git/commitdiff
Node now initializes listeners again (but in a filtered way)
authorRoland Häder <roland@mxchange.org>
Fri, 24 Jul 2009 21:37:40 +0000 (21:37 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 24 Jul 2009 21:37:40 +0000 (21:37 +0000)
application/hub/class_ApplicationHelper.php
application/hub/main/commands/console/class_HubConsoleMainCommand.php

index c3c3efd4c06d1cf1a856200901e1777e82b27c38..61afb7bf97e014d46ff6f632db75d08c3cb1f453 100644 (file)
@@ -204,19 +204,6 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
 
                // Launch the hub main routine here
                $this->getControllerInstance()->handleRequest($requestInstance, $responseInstance);
-               die("STOP\n");
-
-               // -------------------------- Hub activation --------------------------
-               // Activates the hub by doing some final preparation steps and setting
-               // the attribute $hubIsActive to true
-               $nodeInstance->activateHub();
-
-               // ----------------------------- Main loop ----------------------------
-               // This is the main loop. Queried calls should come back here very fast
-               // so the whole application runs on nice speed. This while-loop goes
-               // until the hub is no longer active.
-               while ($nodeInstance->isHubActive()) {
-               } // END - while
 
                // -------------------------- Shutdown phase --------------------------
                // Shutting down the hub by saying "good bye" to all connected clients
index 052d7ef556b7b958cabdc2ac77b18d44239440c8..cf8a9a78b938eabb8cc257fc1f09eaa5e539e93f 100644 (file)
@@ -80,8 +80,26 @@ class HubConsoleMainCommand extends BaseCommand implements Commandable {
                $applicationInstance->getControllerInstance()->executeBootstrapFilters($requestInstance, $responseInstance);
                $this->debugOutput('BOOTSTRAP: Bootstrap finished.');
 
-               // Still unfinished:
-               $this->partialStub('Unfinished method.');
+               // Get node instance
+               $nodeInstance = Registry::getRegistry()->getInstance('node');
+
+               // Sanity-check on it
+               if (is_null($nodeInstance)) {
+                       // Throws a NullPointerException here
+                       throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
+               } // END - if
+
+               // -------------------------- Hub activation --------------------------
+               // Activates the hub by doing some final preparation steps and setting
+               // the attribute $hubIsActive to true
+               $nodeInstance->activateHub();
+
+               // ----------------------------- Main loop ----------------------------
+               // This is the main loop. Queried calls should come back here very fast
+               // so the whole application runs on nice speed. This while-loop goes
+               // until the hub is no longer active.
+               while ($nodeInstance->isHubActive()) {
+               } // END - while
        }
 
        /**