From c364d2db578eeaab4f077f281ac81aeb34c685f7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 5 Jul 2009 21:55:16 +0000 Subject: [PATCH] Method initQueues() added, class name HubBootNode fixed --- .gitattributes | 2 +- application/hub/class_ApplicationHelper.php | 7 +++---- .../hub/interfaces/nodes/class_NodeHelper.php | 7 +++++++ .../hub/main/nodes/boot/class_HubBootNode.php | 14 +++++++++++++- application/hub/main/nodes/class_BaseHubNode.php | 9 +++++++++ ...lass_BootListNode.php => class_HubBootNode.php} | 14 +++++++++++++- .../hub/main/nodes/master/class_HubMasterNode.php | 14 +++++++++++++- .../main/nodes/regular/class_HubRegularNode.php | 14 +++++++++++++- 8 files changed, 72 insertions(+), 9 deletions(-) rename application/hub/main/nodes/list/{class_BootListNode.php => class_HubBootNode.php} (89%) diff --git a/.gitattributes b/.gitattributes index 468e6ab41..91057f5bb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -34,7 +34,7 @@ application/hub/main/nodes/boot/class_HubBootNode.php -text application/hub/main/nodes/class_ -text application/hub/main/nodes/class_BaseHubNode.php -text application/hub/main/nodes/list/.htaccess -text -application/hub/main/nodes/list/class_BootListNode.php -text +application/hub/main/nodes/list/class_HubBootNode.php -text application/hub/main/nodes/master/.htaccess -text application/hub/main/nodes/master/class_HubMasterNode.php -text application/hub/main/nodes/regular/.htaccess -text diff --git a/application/hub/class_ApplicationHelper.php b/application/hub/class_ApplicationHelper.php index 055d9c988..23ad957ac 100644 --- a/application/hub/class_ApplicationHelper.php +++ b/application/hub/class_ApplicationHelper.php @@ -192,10 +192,9 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica $nodeInstance->doBootstrapping(); // ----------------------- Init all query queues ---------------------- - // After the bootstrap is done we need to initialize the query queues - // which will help us to communicate between the "tasks" a hub needs to - // do. - $nodeInstance->initQueryQueues(); + // After the bootstrap is done we need to initialize the queues which + // will help us to communicate between the "tasks" a hub needs to do. + $nodeInstance->initQueues(); // ----------------------------- Main loop ---------------------------- // This is the main loop. Queried calls should come back here very fast diff --git a/application/hub/interfaces/nodes/class_NodeHelper.php b/application/hub/interfaces/nodes/class_NodeHelper.php index fb7513c2b..ac4705d17 100644 --- a/application/hub/interfaces/nodes/class_NodeHelper.php +++ b/application/hub/interfaces/nodes/class_NodeHelper.php @@ -31,6 +31,13 @@ interface NodeHelper extends FrameworkInterface { * @return void */ function doBootstrapping (); + + /** + * Initializes hub-specific queues + * + * @return void + */ + function initQueues (); } // diff --git a/application/hub/main/nodes/boot/class_HubBootNode.php b/application/hub/main/nodes/boot/class_HubBootNode.php index 32bb6366d..93befa342 100644 --- a/application/hub/main/nodes/boot/class_HubBootNode.php +++ b/application/hub/main/nodes/boot/class_HubBootNode.php @@ -95,7 +95,19 @@ class HubBootNode extends BaseHubNode implements NodeHelper { // This should be the last thing to do: output teaser lines $this->outputConsoleTeaser(); } + + /** + * Initializes hub-specific queues + * + * @return void + * @todo Unfinished method + */ + public function initQueues () { + // Call generic queues every hub may have, like the core queue + parent::initGenericQueues(); + $this->partialStub('Please add some more hub-specific queues.'); + } } -// [EOF] +// ?> diff --git a/application/hub/main/nodes/class_BaseHubNode.php b/application/hub/main/nodes/class_BaseHubNode.php index 319ae987a..b6ff400aa 100644 --- a/application/hub/main/nodes/class_BaseHubNode.php +++ b/application/hub/main/nodes/class_BaseHubNode.php @@ -200,6 +200,15 @@ class BaseHubNode extends BaseFrameworkSystem implements Updateable { } } + /** + * Initializes queues which every node needs + * + * @return void + */ + protected function initGenericQueues () { + $this->partialStub('Init query queue here.'); + } + /** * Adds hub data elements to a given dataset instance * diff --git a/application/hub/main/nodes/list/class_BootListNode.php b/application/hub/main/nodes/list/class_HubBootNode.php similarity index 89% rename from application/hub/main/nodes/list/class_BootListNode.php rename to application/hub/main/nodes/list/class_HubBootNode.php index 2b5257fe7..c490782db 100644 --- a/application/hub/main/nodes/list/class_BootListNode.php +++ b/application/hub/main/nodes/list/class_HubBootNode.php @@ -72,7 +72,19 @@ class HubListNode extends BaseHubNode implements NodeHelper { // This should be the last line: output teaser $this->outputConsoleTeaser(); } + + /** + * Initializes hub-specific queues + * + * @return void + * @todo Unfinished method + */ + public function initQueues () { + // Call generic queues every hub may have, like the core queue + parent::initGenericQueues(); + $this->partialStub('Please add some more hub-specific queues.'); + } } -// [EOF] +// ?> diff --git a/application/hub/main/nodes/master/class_HubMasterNode.php b/application/hub/main/nodes/master/class_HubMasterNode.php index 5de2a59dd..983281756 100644 --- a/application/hub/main/nodes/master/class_HubMasterNode.php +++ b/application/hub/main/nodes/master/class_HubMasterNode.php @@ -72,7 +72,19 @@ class HubMasterNode extends BaseHubNode implements NodeHelper { // This should be the last line: output teaser $this->outputConsoleTeaser(); } + + /** + * Initializes hub-specific queues + * + * @return void + * @todo Unfinished method + */ + public function initQueues () { + // Call generic queues every hub may have, like the core queue + parent::initGenericQueues(); + $this->partialStub('Please add some more hub-specific queues.'); + } } -// [EOF] +// ?> diff --git a/application/hub/main/nodes/regular/class_HubRegularNode.php b/application/hub/main/nodes/regular/class_HubRegularNode.php index e1c144537..20ae415d4 100644 --- a/application/hub/main/nodes/regular/class_HubRegularNode.php +++ b/application/hub/main/nodes/regular/class_HubRegularNode.php @@ -73,7 +73,19 @@ class HubRegularNode extends BaseHubNode implements NodeHelper { // This is the last line: output teaser $this->outputConsoleTeaser(); } + + /** + * Initializes hub-specific queues + * + * @return void + * @todo Unfinished method + */ + public function initQueues () { + // Call generic queues every hub may have, like the core queue + parent::initGenericQueues(); + $this->partialStub('Please add some more hub-specific queues.'); + } } -// [EOF] +// ?> -- 2.39.5