]> git.mxchange.org Git - hub.git/commitdiff
Method addExtraFilters() added to all node types (partial stub)
authorRoland Häder <roland@mxchange.org>
Fri, 7 Aug 2009 19:10:22 +0000 (19:10 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 7 Aug 2009 19:10:22 +0000 (19:10 +0000)
application/hub/interfaces/nodes/class_NodeHelper.php
application/hub/main/commands/console/class_HubConsoleMainCommand.php
application/hub/main/filter/node/class_NodeInitializationFilter.php
application/hub/main/nodes/boot/class_HubBootNode.php
application/hub/main/nodes/class_
application/hub/main/nodes/list/class_HubListNode.php
application/hub/main/nodes/master/class_HubMasterNode.php
application/hub/main/nodes/regular/class_HubRegularNode.php

index 1822552eedbb8a93b808176522ea80d6a16f7465..196d1ecaca6b2552079d7f2a5a109665370dcb60 100644 (file)
@@ -66,6 +66,15 @@ interface NodeHelper extends FrameworkInterface {
         */
        function activateHub (Requestable $requestInstance, Responseable $responseInstance);
 
+       /**
+        * Adds some node-specific filters to the filter chains
+        *
+        * @param       $requestInstance        A Requestable class
+        * @param       $responseInstance       A Responseable class
+        * @return      void
+        */
+       function addExtraFilters (Requestable $requestInstance, Responseable $responseInstance);
+
        /**
         * Generates a session id which will be sent to the other hubs and clients
         *
index 7904cb53f03d081207a790282c236d907a5c0560..c3ece8c2e6ce47e7c7dbf906c4baf2635f10fdc0 100644 (file)
@@ -98,8 +98,8 @@ class HubConsoleMainCommand extends BaseCommand implements Commandable {
                // 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
+               while ($nodeInstance->isHubActive()) {
+               } // END - while
        }
 
        /**
@@ -130,7 +130,7 @@ class HubConsoleMainCommand extends BaseCommand implements Commandable {
                $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('hub_shutdown_deinit_queues_filter'));
                $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('hub_shutdown_listener_pool_filter'));
 
-               // This is the last filter
+               // This is the last generic filter
                $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('hub_shutdown_node_filter'));
        }
 }
index 40cb4046be9970c5c4a6bce217e0e0b585936eb3..5dd157e7cc3e50382882470b9c8ce5e57335d71d 100644 (file)
@@ -80,8 +80,8 @@ class NodeInitializationFilter extends BaseFilter implements Filterable {
                        // Set the app instance
                        $nodeInstance->setApplicationInstance($appInstance);
 
-                       // Initialize all filters
-                       $nodeInstance->initializeFilters();
+                       // Add node-specific filters
+                       $nodeInstance->addExtraFilters($requestInstance, $responseInstance);
                } catch (ClassNotFoundException $e) {
                        // This exception means, the node mode is invalid.
                        // @TODO Can we rewrite this to app_die() ?
index 828188975e0485d37c71898f860fa6747119de60..ffd88f998f0e1c877034dcb794b6daf2b73ea9a3 100644 (file)
@@ -103,6 +103,18 @@ class HubBootNode extends BaseHubNode implements NodeHelper, Registerable {
                parent::initGenericQueues();
                $this->partialStub('Please add some more hub-specific queues.');
        }
+
+       /**
+        * Adds some node-specific filters to the filter chains
+        *
+        * @param       $requestInstance        A Requestable class
+        * @param       $responseInstance       A Responseable class
+        * @return      void
+        * @todo        0%
+        */
+       public function addExtraFilters (Requestable $requestInstance, Responseable $responseInstance) {
+               $this->partialStub('Please implement this method.');
+       }
 }
 
 //
index ec62ebbd2a74f6484274b8c3855f32c87a37c881..e82e94c7a84394f0f858716863cd8e9768b78170 100644 (file)
@@ -61,9 +61,6 @@ class Hub???Node extends BaseHubNode implements NodeHelper, Registerable {
                // Call generic (parent) bootstrapping method first
                parent::doGenericBootstrapping();
                $this->partialStub('Please implement this method.');
-
-               // This is the last line: output teaser
-               $this->outputTeaserLines();
        }
 
        /**
@@ -75,7 +72,19 @@ class Hub???Node extends BaseHubNode implements NodeHelper, Registerable {
        public function initQueues () {
                $this->partialStub('Please implement this method.');
        }
+
+       /**
+        * Adds some node-specific filters to the filter chains
+        *
+        * @param       $requestInstance        A Requestable class
+        * @param       $responseInstance       A Responseable class
+        * @return      void
+        * @todo        0%
+        */
+       public function addExtraFilters (Requestable $requestInstance, Responseable $responseInstance) {
+               $this->partialStub('Please implement this method.');
+       }
 }
 
-// [EOF]
+//
 ?>
index 64dd44f4b14dd7c23d55ce00ad3f979ddb8f4ccd..f9d289f45555f8417bdec66209715fd3cdf565ba 100644 (file)
@@ -72,6 +72,18 @@ class HubListNode extends BaseHubNode implements NodeHelper, Registerable {
                parent::initGenericQueues();
                $this->partialStub('Please add some more hub-specific queues.');
        }
+
+       /**
+        * Adds some node-specific filters to the filter chains
+        *
+        * @param       $requestInstance        A Requestable class
+        * @param       $responseInstance       A Responseable class
+        * @return      void
+        * @todo        0%
+        */
+       public function addExtraFilters (Requestable $requestInstance, Responseable $responseInstance) {
+               $this->partialStub('Please implement this method.');
+       }
 }
 
 //
index 3e9d399fe42f63bccc0c061412fffec14eb99bcd..4c9aeeb12d12ccb663a9cb5e63426ff3bc57b15b 100644 (file)
@@ -72,6 +72,18 @@ class HubMasterNode extends BaseHubNode implements NodeHelper, Registerable {
                parent::initGenericQueues();
                $this->partialStub('Please add some more hub-specific queues.');
        }
+
+       /**
+        * Adds some node-specific filters to the filter chains
+        *
+        * @param       $requestInstance        A Requestable class
+        * @param       $responseInstance       A Responseable class
+        * @return      void
+        * @todo        0%
+        */
+       public function addExtraFilters (Requestable $requestInstance, Responseable $responseInstance) {
+               $this->partialStub('Please implement this method.');
+       }
 }
 
 //
index 46105f22f79c1d991df641b92705d9dfda4bf30b..c1bfaa0b8da70dc07cad5e17a548b152ff84873a 100644 (file)
@@ -72,6 +72,18 @@ class HubRegularNode extends BaseHubNode implements NodeHelper, Registerable {
                parent::initGenericQueues();
                $this->partialStub('Please add some more hub-specific queues.');
        }
+
+       /**
+        * Adds some node-specific filters to the filter chains
+        *
+        * @param       $requestInstance        A Requestable class
+        * @param       $responseInstance       A Responseable class
+        * @return      void
+        * @todo        0%
+        */
+       public function addExtraFilters (Requestable $requestInstance, Responseable $responseInstance) {
+               $this->partialStub('Please implement this method.');
+       }
 }
 
 //