application/hub/main/filter/activation/.htaccess -text svneol=unset#text/plain
application/hub/main/filter/activation/class_HubActivation -text
application/hub/main/filter/activation/class_HubActivationSelfAnnouncementFilter.php -text svneol=unset#text/plain
+application/hub/main/filter/activation/node/.htaccess svneol=native#text/plain
+application/hub/main/filter/activation/node/class_NodeActivation -text
+application/hub/main/filter/activation/node/class_NodeActivationSelfAnnouncementFilter.php svneol=native#text/plain
application/hub/main/filter/bootstrap/.htaccess -text svneol=unset#text/plain
application/hub/main/filter/bootstrap/class_HubBootstrap -text
application/hub/main/filter/bootstrap/class_HubBootstrapAquireHubIdFilter.php -text svneol=unset#text/plain
application/hub/main/filter/bootstrap/class_HubBootstrapInitQueuesFilter.php -text svneol=unset#text/plain
application/hub/main/filter/bootstrap/class_HubBootstrapListenerPoolFilter.php -text svneol=unset#text/plain
application/hub/main/filter/bootstrap/class_HubBootstrapRestoreNodeListFilter.php -text svneol=unset#text/plain
+application/hub/main/filter/bootstrap/cruncher/.htaccess svneol=native#text/plain
+application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrap -text
+application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrapExtraBootstrappingFilter.php svneol=native#text/plain
+application/hub/main/filter/bootstrap/node/.htaccess svneol=native#text/plain
+application/hub/main/filter/bootstrap/node/class_NodeBootstrap -text
+application/hub/main/filter/bootstrap/node/class_NodeBootstrapExtraBootstrappingFilter.php svneol=native#text/plain
+application/hub/main/filter/bootstrap/node/class_NodeBootstrapGenerateNodeIdFilter.php svneol=native#text/plain
+application/hub/main/filter/bootstrap/node/class_NodeBootstrapGenerateSessionIdFilter.php svneol=native#text/plain
+application/hub/main/filter/bootstrap/node/class_NodeBootstrapInitQueuesFilter.php svneol=native#text/plain
+application/hub/main/filter/bootstrap/node/class_NodeBootstrapListenerPoolFilter.php svneol=native#text/plain
+application/hub/main/filter/bootstrap/node/class_NodeBootstrapRestoreNodeListFilter.php svneol=native#text/plain
application/hub/main/filter/class_ -text svneol=unset#text/plain
application/hub/main/filter/console/.htaccess -text svneol=unset#text/plain
application/hub/main/filter/console/class_Console -text
application/hub/main/filter/shutdown/class_HubShutdownListenerPoolFilter.php -text svneol=unset#text/plain
application/hub/main/filter/shutdown/class_HubShutdownNodeFilter.php -text svneol=unset#text/plain
application/hub/main/filter/shutdown/class_HubShutdownTaskHandlerFilter.php -text svneol=unset#text/plain
+application/hub/main/filter/shutdown/cruncher/.htaccess svneol=native#text/plain
+application/hub/main/filter/shutdown/cruncher/class_CruncherShutdownCruncherFilter.php svneol=native#text/plain
+application/hub/main/filter/shutdown/node/.htaccess svneol=native#text/plain
+application/hub/main/filter/shutdown/node/class_NodeShutdown -text
+application/hub/main/filter/shutdown/node/class_NodeShutdownDeinitQueuesFilter.php svneol=native#text/plain
+application/hub/main/filter/shutdown/node/class_NodeShutdownFlushNodeListFilter.php svneol=native#text/plain
+application/hub/main/filter/shutdown/node/class_NodeShutdownNodeFilter.php svneol=native#text/plain
+application/hub/main/filter/shutdown/node/class_NodeShutdownTaskHandlerFilter.php svneol=native#text/plain
application/hub/main/filter/task/.htaccess -text svneol=unset#text/plain
application/hub/main/filter/task/class_CruncherTaskHandlerInitializerFilter.php svneol=native#text/plain
application/hub/main/filter/task/class_HubTaskHandlerInitializerFilter.php -text svneol=unset#text/plain
application/hub/main/filter/task/class_TaskHandlerInitializerFilter.php -text svneol=unset#text/plain
+application/hub/main/filter/task/cruncher/.htaccess svneol=native#text/plain
+application/hub/main/filter/task/cruncher/class_CruncherTaskHandlerInitializerFilter.php svneol=native#text/plain
+application/hub/main/filter/task/node/.htaccess svneol=native#text/plain
+application/hub/main/filter/task/node/class_NodeTaskHandlerInitializerFilter.php svneol=native#text/plain
application/hub/main/handler/.htaccess -text svneol=unset#text/plain
application/hub/main/handler/class_ -text svneol=unset#text/plain
application/hub/main/handler/class_BaseHandler.php -text svneol=unset#text/plain
// CFG: CRUNCHER-INITIALIZER-FILTER
$cfg->setConfigEntry('cruncher_initializer_filter', 'CruncherInitializationFilter');
-// CFG: HUB-ACTIVATION-TASK-HANDLER-INITIALIZER-FILTER
-$cfg->setConfigEntry('hub_activation_task_handler_initializer_filter', 'HubTaskHandlerInitializerFilter');
+// CFG: NODE-ACTIVATION-TASK-HANDLER-INITIALIZER-FILTER
+$cfg->setConfigEntry('node_activation_task_handler_initializer_filter', 'NodeTaskHandlerInitializerFilter');
// CFG: CRUNCHER-BOOTSTRAP-TASK-HANDLER-INITIALIZER-FILTER
$cfg->setConfigEntry('cruncher_bootstrap_task_handler_initializer_filter', 'CruncherTaskHandlerInitializerFilter');
-// CFG: HUB-ACTIVATION-SELF-ANNOUNCEMENT-TASK-FILTER
-$cfg->setConfigEntry('hub_activation_self_announcement_task_filter', 'HubActivationSelfAnnouncementFilter');
+// CFG: NODE-ACTIVATION-SELF-ANNOUNCEMENT-TASK-FILTER
+$cfg->setConfigEntry('node_activation_self_announcement_task_filter', 'NodeActivationSelfAnnouncementFilter');
// CFG: NODE-WELCOME-TEASER-FILTER
$cfg->setConfigEntry('node_welcome_teaser_filter', 'NodeWelcomeTeaserFilter');
// CFG: CRUNCHER-WELCOME-TEASER-FILTER
$cfg->setConfigEntry('cruncher_welcome_teaser_filter', 'CruncherWelcomeTeaserFilter');
-// CFG: HUB-BOOTSTRAP-GENERATE-HUBID-FILTER
-$cfg->setConfigEntry('hub_bootstrap_generate_hubid_filter', 'HubBootstrapGenerateHubIdFilter');
+// CFG: NODE-BOOTSTRAP-GENERATE-HUBID-FILTER
+$cfg->setConfigEntry('node_bootstrap_generate_nodeid_filter', 'NodeBootstrapGenerateNodeIdFilter');
-// CFG: HUB-BOOTSTRAP-GENERATE-SESSIONID-FILTER
-$cfg->setConfigEntry('hub_bootstrap_generate_sessionid_filter', 'HubBootstrapGenerateSessionIdFilter');
+// CFG: NODE-BOOTSTRAP-GENERATE-SESSIONID-FILTER
+$cfg->setConfigEntry('node_bootstrap_generate_sessionid_filter', 'NodeBootstrapGenerateSessionIdFilter');
-// CFG: HUB-BOOTSTRAP-RESTORE-NODELIST-FILTER
-$cfg->setConfigEntry('hub_bootstrap_restore_nodelist_filter', 'HubBootstrapRestoreNodeListFilter');
+// CFG: NODE-BOOTSTRAP-RESTORE-NODELIST-FILTER
+$cfg->setConfigEntry('node_bootstrap_restore_nodelist_filter', 'NodeBootstrapRestoreNodeListFilter');
-// CFG: HUB-BOOTSTRAP-INIT-QUEUES-FILTER
-$cfg->setConfigEntry('hub_bootstrap_init_queues_filter', 'HubBootstrapInitQueuesFilter');
+// CFG: NODE-BOOTSTRAP-INIT-QUEUES-FILTER
+$cfg->setConfigEntry('node_bootstrap_init_queues_filter', 'NodeBootstrapInitQueuesFilter');
-// CFG: HUB-BOOTSTRAP-EXTRA-BOOTSTRAP-FILTER
-$cfg->setConfigEntry('hub_bootstrap_extra_bootstrap_filter', 'HubBootstrapExtraBootstrappingFilter');
+// CFG: NODE-BOOTSTRAP-EXTRA-BOOTSTRAP-FILTER
+$cfg->setConfigEntry('node_bootstrap_extra_bootstrap_filter', 'NodeBootstrapExtraBootstrappingFilter');
-// CFG: HUB-BOOTSTRAP-LISTENER-POOL-FILTER
-$cfg->setConfigEntry('hub_bootstrap_listener_pool_filter', 'HubBootstrapListenerPoolFilter');
+// CFG: NODE-BOOTSTRAP-LISTENER-POOL-FILTER
+$cfg->setConfigEntry('node_bootstrap_listener_pool_filter', 'NodeBootstrapListenerPoolFilter');
-// CFG: HUB-SHUTDOWN-FLUSH-NODE-LIST-FILTER
-$cfg->setConfigEntry('hub_shutdown_flush_node_list_filter', 'HubShutdownFlushNodeListFilter');
+// CFG: NODE-SHUTDOWN-FLUSH-NODE-LIST-FILTER
+$cfg->setConfigEntry('node_shutdown_flush_node_list_filter', 'NodeShutdownFlushNodeListFilter');
-// CFG: HUB-SHUTDOWN-DEINIT-QUEUES-FILTER
-$cfg->setConfigEntry('hub_shutdown_deinit_queues_filter', 'HubShutdownDeinitQueuesFilter');
+// CFG: NODE-SHUTDOWN-DEINIT-QUEUES-FILTER
+$cfg->setConfigEntry('node_shutdown_deinit_queues_filter', 'NodeShutdownDeinitQueuesFilter');
-// CFG: HUB-SHUTDOWN-TASK-HANDLER-FILTER
-$cfg->setConfigEntry('hub_shutdown_task_handler_filter', 'HubShutdownTaskHandlerFilter');
+// CFG: NODE-SHUTDOWN-TASK-HANDLER-FILTER
+$cfg->setConfigEntry('node_shutdown_task_handler_filter', 'NodeShutdownTaskHandlerFilter');
-// CFG: HUB-SHUTDOWN-NODE-FILTER
-$cfg->setConfigEntry('hub_shutdown_node_filter', 'HubShutdownNodeFilter');
+// CFG: NODE-SHUTDOWN-NODE-FILTER
+$cfg->setConfigEntry('node_shutdown_node_filter', 'NodeShutdownNodeFilter');
-// CFG: HUB-SHUTDOWN-CRUNCHER-FILTER
-$cfg->setConfigEntry('hub_shutdown_cruncher_filter', 'HubShutdownCruncherFilter');
+// CFG: CRUNCHER-SHUTDOWN-CRUNCHER-FILTER
+$cfg->setConfigEntry('cruncher_shutdown_cruncher_filter', 'CruncherShutdownCruncherFilter');
// CFG: NEWS-READER-CLASS
$cfg->setConfigEntry('news_reader_class', 'ConsoleNewsReader');
* @param $responseInstance A Responseable class
* @return void
*/
- function bootstrapAcquireHubId (Requestable $requestInstance, Responseable $responseInstance);
+ function bootstrapAcquireNodeId (Requestable $requestInstance, Responseable $responseInstance);
/**
* Activates the hub by doing some final preparation and setting
*/
function bootstrapRestoreNodeList ();
- /**
- * Add some node-specific filters
- *
- * @return void
- */
- function addExtraNodeFilters ();
-
/**
* Announces this hub to the upper (bootstrap or list) hubs. After this is
* successfully done the given task is unregistered from the handler.
// Add bootstrap filters
$controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('cruncher_bootstrap_task_handler_initializer_filter'));
- //$controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('hub_bootstrap_generate_hubid_filter'));
+ //$controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('cruncher_bootstrap_generate_nodeid_filter'));
// Add shutdown filters
- //$controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('hub_shutdown_task_handler_filter'));
+ //$controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('cruncher_shutdown_task_handler_filter'));
// This is the last generic filter
- $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('hub_shutdown_cruncher_filter'));
+ $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('cruncher_shutdown_cruncher_filter'));
}
}
$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('node_welcome_teaser_filter'));
// Add bootstrap filters
- $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('hub_bootstrap_generate_hubid_filter'));
- $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('hub_bootstrap_generate_sessionid_filter'));
- $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('hub_bootstrap_restore_nodelist_filter'));
- $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('hub_bootstrap_init_queues_filter'));
- $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('hub_bootstrap_extra_bootstrap_filter'));
- $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('hub_bootstrap_listener_pool_filter'));
+ $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_generate_nodeid_filter'));
+ $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_generate_sessionid_filter'));
+ $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_restore_nodelist_filter'));
+ $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_init_queues_filter'));
+ $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_extra_bootstrap_filter'));
+ $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_listener_pool_filter'));
// Add hub activation filters
- $controllerInstance->addActivationFilter(ObjectFactory::createObjectByConfiguredName('hub_activation_task_handler_initializer_filter'));
+ $controllerInstance->addActivationFilter(ObjectFactory::createObjectByConfiguredName('node_activation_task_handler_initializer_filter'));
// Add shutdown filters
- $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('hub_shutdown_flush_node_list_filter'));
- $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('hub_shutdown_deinit_queues_filter'));
- $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('hub_shutdown_task_handler_filter'));
+ $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('node_shutdown_flush_node_list_filter'));
+ $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('node_shutdown_deinit_queues_filter'));
+ $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('node_shutdown_task_handler_filter'));
// This is the last generic filter
- $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('hub_shutdown_node_filter'));
+ $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('node_shutdown_node_filter'));
}
}
protected function __construct () {
// Call parent constructor
parent::__construct(__CLASS__);
+
+ // Set version number
+ $this->setVersion('x.x');
}
/**
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
class BaseHubCruncher extends BaseHubSystem implements Updateable {
+ /**
+ * Version information
+ */
+ private $version = 'x.x';
+
/**
* Protected constructor
*
parent::__construct($className);
}
+ /**
+ * Getter for version
+ *
+ * @return $version Version number of this cruncher
+ */
+ protected final function getVersion () {
+ return $this->version;
+ }
+
+ /**
+ * Setter for version
+ *
+ * @param $version Version number of this cruncher
+ * @return void
+ */
+ protected final function setVersion ($version) {
+ $this->version = (string) $version;
+ }
+
/**
* Updates a given field with new value
*
protected function __construct () {
// Call parent constructor
parent::__construct(__CLASS__);
+
+ // Set version number
+ $this->setVersion('0.0.0');
}
/**
* @return void
*/
public function outputConsoleTeaser () {
- $this->partialStub('Please implement this method.');
+ // Output all lines
+ $this->debugOutput(' ');
+ $this->debugOutput('MCrypt Cruncher v' . $this->getVersion() . ' is starting ...');
+ $this->debugOutput('Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2011 Hub Developer Team');
+ $this->debugOutput(' ');
+ $this->debugOutput('This program comes with ABSOLUTELY NO WARRANTY; for details see docs/COPYING.');
+ $this->debugOutput('This is free software, and you are welcome to redistribute it under certain');
+ $this->debugOutput('conditions; see docs/COPYING for details.');
+ $this->debugOutput(' ');
}
/**
* Add some cruncher-specific filters
*
* @return void
+ * @todo 0% done
*/
public function addExtraCruncherFilters () {
// Add some filters here
<?php
-/**
- * A ??? filter for hub activation
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class HubActivation???Filter extends BaseFilter implements Filterable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this filter class
- *
- * @return $filterInstance An instance of this filter class
- */
- public final static function createHubActivation???Filter () {
- // Get a new instance
- $filterInstance = new HubActivation???Filter();
-
- // Return the instance
- return $filterInstance;
- }
-
- /**
- * Executes the filter with given request and response objects
- *
- * @param $requestInstance An instance of a class with an Requestable interface
- * @param $responseInstance An instance of a class with an Responseable interface
- * @return void
- * @todo 0% done
- */
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- // Get node instance
- $nodeInstance = Registry::getRegistry()->getInstance('node');
-
- // Now do something
- $this->partialStub('Please implement this step.');
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A SelfAnnouncement filter for hub activation
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class HubActivationSelfAnnouncementFilter extends BaseFilter implements Filterable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this filter class
- *
- * @return $filterInstance An instance of this filter class
- */
- public static final function createHubActivationSelfAnnouncementFilter () {
- // Get a new instance
- $filterInstance = new HubActivationSelfAnnouncementFilter();
-
- // Return the instance
- return $filterInstance;
- }
-
- /**
- * Executes the filter with given request and response objects
- *
- * @param $requestInstance An instance of a class with an Requestable interface
- * @param $responseInstance An instance of a class with an Responseable interface
- * @return void
- * @todo 0% done
- */
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- // Get task handler instance
- $handlerInstance = Registry::getRegistry()->getInstance('task');
-
- // Prepare a self-test task for the listeners
- $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_self_announcement_task_class');
-
- // Register it
- $handlerInstance->registerTask('self_announcement', $taskInstance);
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A ??? filter for hub activation
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class HubActivation???Filter extends BaseFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public final static function createHubActivation???Filter () {
+ // Get a new instance
+ $filterInstance = new HubActivation???Filter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter with given request and response objects
+ *
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
+ * @return void
+ * @todo 0% done
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Get node instance
+ $nodeInstance = Registry::getRegistry()->getInstance('node');
+
+ // Now do something
+ $this->partialStub('Please implement this step.');
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A SelfAnnouncement filter for hub activation
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class NodeActivationSelfAnnouncementFilter extends BaseFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public static final function createNodeActivationSelfAnnouncementFilter () {
+ // Get a new instance
+ $filterInstance = new NodeActivationSelfAnnouncementFilter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter with given request and response objects
+ *
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
+ * @return void
+ * @todo 0% done
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Get task handler instance
+ $handlerInstance = Registry::getRegistry()->getInstance('task');
+
+ // Prepare a self-test task for the listeners
+ $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_self_announcement_task_class');
+
+ // Register it
+ $handlerInstance->registerTask('self_announcement', $taskInstance);
+ }
+}
+
+// [EOF]
+?>
<?php
-/**
- * A ??? filter for bootstrapping
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class HubBootstrap???Filter extends BaseFilter implements Filterable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this filter class
- *
- * @return $filterInstance An instance of this filter class
- */
- public final static function createHubBootstrap???Filter () {
- // Get a new instance
- $filterInstance = new HubBootstrap???Filter();
-
- // Return the instance
- return $filterInstance;
- }
-
- /**
- * Executes the filter with given request and response objects
- *
- * @param $requestInstance An instance of a class with an Requestable interface
- * @param $responseInstance An instance of a class with an Responseable interface
- * @return void
- * @todo 0% done
- */
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- // Get node instance
- $nodeInstance = Registry::getRegistry()->getInstance('node');
-
- // Now do something
- $this->partialStub('Please implement this step.');
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A ExtraBootstrapping filter for bootstrapping
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class HubBootstrapExtraBootstrappingFilter extends BaseFilter implements Filterable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this filter class
- *
- * @return $filterInstance An instance of this filter class
- */
- public static final function createHubBootstrapExtraBootstrappingFilter () {
- // Get a new instance
- $filterInstance = new HubBootstrapExtraBootstrappingFilter();
-
- // Return the instance
- return $filterInstance;
- }
-
- /**
- * Executes the filter with given request and response objects
- *
- * @param $requestInstance An instance of a class with an Requestable interface
- * @param $responseInstance An instance of a class with an Responseable interface
- * @return void
- * @throws FilterChainException If $nodeInstance is null (no NullPointerException here)
- */
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- // Get node instance
- $nodeInstance = Registry::getRegistry()->getInstance('node');
-
- // Do some extra bootstrapping steps
- $nodeInstance->doBootstrapping();
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A GenerateHubId filter for bootstrapping
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class HubBootstrapGenerateHubIdFilter extends BaseFilter implements Filterable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this filter class
- *
- * @return $filterInstance An instance of this filter class
- */
- public static final function createHubBootstrapGenerateHubIdFilter () {
- // Get a new instance
- $filterInstance = new HubBootstrapGenerateHubIdFilter();
-
- // Return the instance
- return $filterInstance;
- }
-
- /**
- * Executes the filter with given request and response objects
- *
- * @param $requestInstance An instance of a class with an Requestable interface
- * @param $responseInstance An instance of a class with an Responseable interface
- * @return void
- * @throws FilterChainException If $nodeInstance is null (no NullPointerException here)
- */
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- // Get node instance
- $nodeInstance = Registry::getRegistry()->getInstance('node');
-
- // --------------------- Hub-id acquirement phase ---------------------
- // Acquire a hub-id. This step generates on first launch a new one and
- // on any later launches it will restore the hub-id from the database.
- // A passed 'nickname=xxx' argument will be used to add some
- // 'personality' to the hub.
- $nodeInstance->bootstrapAcquireHubId($requestInstance, $responseInstance);
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A GenerateSessionId filter for bootstrapping
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class HubBootstrapGenerateSessionIdFilter extends BaseFilter implements Filterable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this filter class
- *
- * @return $filterInstance An instance of this filter class
- */
- public static final function createHubBootstrapGenerateSessionIdFilter () {
- // Get a new instance
- $filterInstance = new HubBootstrapGenerateSessionIdFilter();
-
- // Return the instance
- return $filterInstance;
- }
-
- /**
- * Executes the filter with given request and response objects
- *
- * @param $requestInstance An instance of a class with an Requestable interface
- * @param $responseInstance An instance of a class with an Responseable interface
- * @return void
- * @throws FilterChainException If $nodeInstance is null (no NullPointerException here)
- */
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- // Get node instance
- $nodeInstance = Registry::getRegistry()->getInstance('node');
-
- // ------------------- More generic bootstrap steps -------------------
- // Generate the session id which will only be stored in RAM and kept for
- // the whole "session".
- $nodeInstance->bootstrapGenerateSessionId();
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A InitQueues filter for bootstrapping
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class HubBootstrapInitQueuesFilter extends BaseFilter implements Filterable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this filter class
- *
- * @return $filterInstance An instance of this filter class
- */
- public static final function createHubBootstrapInitQueuesFilter () {
- // Get a new instance
- $filterInstance = new HubBootstrapInitQueuesFilter();
-
- // Return the instance
- return $filterInstance;
- }
-
- /**
- * Executes the filter with given request and response objects
- *
- * @param $requestInstance An instance of a class with an Requestable interface
- * @param $responseInstance An instance of a class with an Responseable interface
- * @return void
- * @throws FilterChainException If $nodeInstance is null (no NullPointerException here)
- */
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- // Get node instance
- $nodeInstance = Registry::getRegistry()->getInstance('node');
-
- // Now init the queues
- $nodeInstance->initQueues();
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A ListenerPool filter for bootstrapping
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class HubBootstrapListenerPoolFilter extends BaseFilter implements Filterable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this filter class
- *
- * @return $filterInstance An instance of this filter class
- */
- public static final function createHubBootstrapListenerPoolFilter () {
- // Get a new instance
- $filterInstance = new HubBootstrapListenerPoolFilter();
-
- // Return the instance
- return $filterInstance;
- }
-
- /**
- * Executes the filter with given request and response objects
- *
- * @param $requestInstance An instance of a class with an Requestable interface
- * @param $responseInstance An instance of a class with an Responseable interface
- * @return void
- * @throws FilterChainException If $nodeInstance is null (no NullPointerException here)
- */
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- // Get node instance
- $nodeInstance = Registry::getRegistry()->getInstance('node');
-
- // Now do something
- $nodeInstance->initializeListenerPool();
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A RestoreNodeList filter for bootstrapping
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class HubBootstrapRestoreNodeListFilter extends BaseFilter implements Filterable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this filter class
- *
- * @return $filterInstance An instance of this filter class
- */
- public static final function createHubBootstrapRestoreNodeListFilter () {
- // Get a new instance
- $filterInstance = new HubBootstrapRestoreNodeListFilter();
-
- // Return the instance
- return $filterInstance;
- }
-
- /**
- * Executes the filter with given request and response objects
- *
- * @param $requestInstance An instance of a class with an Requestable interface
- * @param $responseInstance An instance of a class with an Responseable interface
- * @return void
- * @throws FilterChainException If $nodeInstance is null (no NullPointerException here)
- */
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- // Get node instance
- $nodeInstance = Registry::getRegistry()->getInstance('node');
-
- // Restore a previously downloaded bootstrap-node list.
- $nodeInstance->bootstrapRestoreNodeList();
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A ??? filter for bootstrapping
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Cruncher Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class CruncherBootstrap???Filter extends BaseFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public final static function createCruncherBootstrap???Filter () {
+ // Get a new instance
+ $filterInstance = new CruncherBootstrap???Filter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter with given request and response objects
+ *
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
+ * @return void
+ * @todo 0% done
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Get node instance
+ $nodeInstance = Registry::getRegistry()->getInstance('node');
+
+ // Now do something
+ $this->partialStub('Please implement this step.');
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A ExtraBootstrapping filter for bootstrapping
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Cruncher Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class CruncherBootstrapExtraBootstrappingFilter extends BaseFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public static final function createCruncherBootstrapExtraBootstrappingFilter () {
+ // Get a new instance
+ $filterInstance = new CruncherBootstrapExtraBootstrappingFilter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter with given request and response objects
+ *
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
+ * @return void
+ * @throws FilterChainException If $cruncherInstance is null (no NullPointerException here)
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Get cruncher instance
+ $cruncherInstance = Registry::getRegistry()->getInstance('cruncher');
+
+ // Do some extra bootstrapping steps
+ $cruncherInstance->doBootstrapping();
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A ??? filter for bootstrapping
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Node Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class NodeBootstrap???Filter extends BaseFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public final static function createNodeBootstrap???Filter () {
+ // Get a new instance
+ $filterInstance = new NodeBootstrap???Filter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter with given request and response objects
+ *
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
+ * @return void
+ * @todo 0% done
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Get node instance
+ $nodeInstance = Registry::getRegistry()->getInstance('node');
+
+ // Now do something
+ $this->partialStub('Please implement this step.');
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A ExtraBootstrapping filter for bootstrapping
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class NodeBootstrapExtraBootstrappingFilter extends BaseFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public static final function createNodeBootstrapExtraBootstrappingFilter () {
+ // Get a new instance
+ $filterInstance = new NodeBootstrapExtraBootstrappingFilter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter with given request and response objects
+ *
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
+ * @return void
+ * @throws FilterChainException If $nodeInstance is null (no NullPointerException here)
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Get node instance
+ $nodeInstance = Registry::getRegistry()->getInstance('node');
+
+ // Do some extra bootstrapping steps
+ $nodeInstance->doBootstrapping();
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A GenerateNodeId filter for bootstrapping
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Node Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class NodeBootstrapGenerateNodeIdFilter extends BaseFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public static final function createNodeBootstrapGenerateNodeIdFilter () {
+ // Get a new instance
+ $filterInstance = new NodeBootstrapGenerateNodeIdFilter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter with given request and response objects
+ *
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
+ * @return void
+ * @throws FilterChainException If $nodeInstance is null (no NullPointerException here)
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Get node instance
+ $nodeInstance = Registry::getRegistry()->getInstance('node');
+
+ // --------------------- Node-id acquirement phase ---------------------
+ // Acquire a hub-id. This step generates on first launch a new one and
+ // on any later launches it will restore the hub-id from the database.
+ // A passed 'nickname=xxx' argument will be used to add some
+ // 'personality' to the hub.
+ $nodeInstance->bootstrapAcquireNodeId($requestInstance, $responseInstance);
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A GenerateSessionId filter for bootstrapping
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Node Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class NodeBootstrapGenerateSessionIdFilter extends BaseFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public static final function createNodeBootstrapGenerateSessionIdFilter () {
+ // Get a new instance
+ $filterInstance = new NodeBootstrapGenerateSessionIdFilter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter with given request and response objects
+ *
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
+ * @return void
+ * @throws FilterChainException If $nodeInstance is null (no NullPointerException here)
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Get node instance
+ $nodeInstance = Registry::getRegistry()->getInstance('node');
+
+ // ------------------- More generic bootstrap steps -------------------
+ // Generate the session id which will only be stored in RAM and kept for
+ // the whole "session".
+ $nodeInstance->bootstrapGenerateSessionId();
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A InitQueues filter for bootstrapping
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Node Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class NodeBootstrapInitQueuesFilter extends BaseFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public static final function createNodeBootstrapInitQueuesFilter () {
+ // Get a new instance
+ $filterInstance = new NodeBootstrapInitQueuesFilter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter with given request and response objects
+ *
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
+ * @return void
+ * @throws FilterChainException If $nodeInstance is null (no NullPointerException here)
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Get node instance
+ $nodeInstance = Registry::getRegistry()->getInstance('node');
+
+ // Now init the queues
+ $nodeInstance->initQueues();
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A ListenerPool filter for bootstrapping
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Node Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class NodeBootstrapListenerPoolFilter extends BaseFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public static final function createNodeBootstrapListenerPoolFilter () {
+ // Get a new instance
+ $filterInstance = new NodeBootstrapListenerPoolFilter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter with given request and response objects
+ *
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
+ * @return void
+ * @throws FilterChainException If $nodeInstance is null (no NullPointerException here)
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Get node instance
+ $nodeInstance = Registry::getRegistry()->getInstance('node');
+
+ // Now do something
+ $nodeInstance->initializeListenerPool();
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A RestoreNodeList filter for bootstrapping
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Node Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class NodeBootstrapRestoreNodeListFilter extends BaseFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public static final function createNodeBootstrapRestoreNodeListFilter () {
+ // Get a new instance
+ $filterInstance = new NodeBootstrapRestoreNodeListFilter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter with given request and response objects
+ *
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
+ * @return void
+ * @throws FilterChainException If $nodeInstance is null (no NullPointerException here)
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Get node instance
+ $nodeInstance = Registry::getRegistry()->getInstance('node');
+
+ // Restore a previously downloaded bootstrap-node list.
+ $nodeInstance->bootstrapRestoreNodeList();
+ }
+}
+
+// [EOF]
+?>
<?php
-/**
- * A ??? filter for shutting down the node.
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class HubShutdown???Filter extends BaseFilter implements Filterable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this filter class
- *
- * @return $filterInstance An instance of this filter class
- */
- public final static function createHubShutdown???Filter () {
- // Get a new instance
- $filterInstance = new HubShutdown???Filter();
-
- // Return the instance
- return $filterInstance;
- }
-
- /**
- * Executes the filter with given request and response objects
- *
- * @param $requestInstance An instance of a class with an Requestable interface
- * @param $responseInstance An instance of a class with an Responseable interface
- * @return void
- * @throws FilterChainException If $nodeInstance is null (no NullPointerException here)
- * @todo 0% done
- */
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- // Get node instance
- $nodeInstance = Registry::getRegistry()->getInstance('node');
-
- // Now do something
- $this->partialStub('Please implement this step.');
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A ShutdownCruncher filter for shutting down the cruncher. This filter should
- * be the last one in 'shutdown' chain so the hub is shutted down at the very
- * end of its life... R.I.P. little cruncher...
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class HubShutdownCruncherFilter extends BaseFilter implements Filterable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this filter class
- *
- * @return $filterInstance An instance of this filter class
- */
- public static final function createHubShutdownCruncherFilter () {
- // Get a new instance
- $filterInstance = new HubShutdownCruncherFilter();
-
- // Return the instance
- return $filterInstance;
- }
-
- /**
- * Executes the filter with given request and response objects
- *
- * @param $requestInstance An instance of a class with an Requestable interface
- * @param $responseInstance An instance of a class with an Responseable interface
- * @return void
- * @throws FilterChainException If $nodeInstance is null (no NullPointerException please)
- */
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- // Get node instance
- $cruncherInstance = Registry::getRegistry()->getInstance('cruncher');
-
- // Shutdown the cruncher. This should be the last line
- $cruncherInstance->doShutdown();
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A DeinitQueues filter for shutting down the node.
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class HubShutdownDeinitQueuesFilter extends BaseFilter implements Filterable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this filter class
- *
- * @return $filterInstance An instance of this filter class
- */
- public static final function createHubShutdownDeinitQueuesFilter () {
- // Get a new instance
- $filterInstance = new HubShutdownDeinitQueuesFilter();
-
- // Return the instance
- return $filterInstance;
- }
-
- /**
- * Executes the filter with given request and response objects
- *
- * @param $requestInstance An instance of a class with an Requestable interface
- * @param $responseInstance An instance of a class with an Responseable interface
- * @return void
- * @throws FilterChainException If $nodeInstance is null (no NullPointerException here)
- * @todo 0% done
- */
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- // Get node instance
- $nodeInstance = Registry::getRegistry()->getInstance('node');
-
- // Get query instance
- $connectorInstance = $nodeInstance->getQueryConnectorInstance();
-
- // Sanity-check on it
- if (is_null($connectorInstance)) {
- // Throws a FilterChainException to stop further processing
- throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
- } // END - if
-
- // Now shutdown this one done
- $connectorInstance->doShutdown();
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A FlushNodeList filter for shutting down the node.
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class HubShutdownFlushNodeListFilter extends BaseFilter implements Filterable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this filter class
- *
- * @return $filterInstance An instance of this filter class
- */
- public static final function createHubShutdownFlushNodeListFilter () {
- // Get a new instance
- $filterInstance = new HubShutdownFlushNodeListFilter();
-
- // Return the instance
- return $filterInstance;
- }
-
- /**
- * Executes the filter with given request and response objects
- *
- * @param $requestInstance An instance of a class with an Requestable interface
- * @param $responseInstance An instance of a class with an Responseable interface
- * @return void
- * @throws FilterChainException If $nodeInstance is null (no NullPointerException please)
- * @todo 0% done
- */
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- // Get node instance
- $nodeInstance = Registry::getRegistry()->getInstance('node');
-
- // Now do something
- $this->partialStub('Please implement this step.');
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A ShutdownNode filter for shutting down the node. This filter should be the
- * last one in 'shutdown' chain so the hub is shutted down at the very end of
- * its life... R.I.P. little hub...
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class HubShutdownNodeFilter extends BaseFilter implements Filterable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this filter class
- *
- * @return $filterInstance An instance of this filter class
- */
- public static final function createHubShutdownNodeFilter () {
- // Get a new instance
- $filterInstance = new HubShutdownNodeFilter();
-
- // Return the instance
- return $filterInstance;
- }
-
- /**
- * Executes the filter with given request and response objects
- *
- * @param $requestInstance An instance of a class with an Requestable interface
- * @param $responseInstance An instance of a class with an Responseable interface
- * @return void
- * @throws FilterChainException If $nodeInstance is null (no NullPointerException please)
- */
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- // Get node instance
- $nodeInstance = Registry::getRegistry()->getInstance('node');
-
- // Shutdown the node. This should be the last line
- $nodeInstance->doShutdown();
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A TaskHandler filter for shutting down the node.
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class HubShutdownTaskHandlerFilter extends BaseFilter implements Filterable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this filter class
- *
- * @return $filterInstance An instance of this filter class
- */
- public static final function createHubShutdownTaskHandlerFilter () {
- // Get a new instance
- $filterInstance = new HubShutdownTaskHandlerFilter();
-
- // Return the instance
- return $filterInstance;
- }
-
- /**
- * Executes the filter with given request and response objects
- *
- * @param $requestInstance An instance of a class with an Requestable interface
- * @param $responseInstance An instance of a class with an Responseable interface
- * @return void
- * @throws FilterChainException If $nodeInstance is null (no NullPointerException here)
- * @todo 0% done
- */
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- // Get task handler instance
- $handlerInstance = Registry::getRegistry()->getInstance('task');
-
- // Shutdown the task manager and all its registered tasks
- $handlerInstance->doShutdown();
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A ShutdownCruncher filter for shutting down the cruncher. This filter should
+ * be the last one in 'shutdown' chain so the hub is shutted down at the very
+ * end of its life... R.I.P. little cruncher...
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class CruncherShutdownCruncherFilter extends BaseFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public static final function createCruncherShutdownCruncherFilter () {
+ // Get a new instance
+ $filterInstance = new CruncherShutdownCruncherFilter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter with given request and response objects
+ *
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
+ * @return void
+ * @throws FilterChainException If $nodeInstance is null (no NullPointerException please)
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Get node instance
+ $cruncherInstance = Registry::getRegistry()->getInstance('cruncher');
+
+ // Shutdown the cruncher. This should be the last line
+ $cruncherInstance->doShutdown();
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A ??? filter for shutting down the node.
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class HubShutdown???Filter extends BaseFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public final static function createHubShutdown???Filter () {
+ // Get a new instance
+ $filterInstance = new HubShutdown???Filter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter with given request and response objects
+ *
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
+ * @return void
+ * @throws FilterChainException If $nodeInstance is null (no NullPointerException here)
+ * @todo 0% done
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Get node instance
+ $nodeInstance = Registry::getRegistry()->getInstance('node');
+
+ // Now do something
+ $this->partialStub('Please implement this step.');
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A DeinitQueues filter for shutting down the node.
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class NodeShutdownDeinitQueuesFilter extends BaseFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public static final function createNodeShutdownDeinitQueuesFilter () {
+ // Get a new instance
+ $filterInstance = new NodeShutdownDeinitQueuesFilter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter with given request and response objects
+ *
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
+ * @return void
+ * @throws FilterChainException If $nodeInstance is null (no NullPointerException here)
+ * @todo 0% done
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Get node instance
+ $nodeInstance = Registry::getRegistry()->getInstance('node');
+
+ // Get query instance
+ $connectorInstance = $nodeInstance->getQueryConnectorInstance();
+
+ // Sanity-check on it
+ if (is_null($connectorInstance)) {
+ // Throws a FilterChainException to stop further processing
+ throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
+ } // END - if
+
+ // Now shutdown this one done
+ $connectorInstance->doShutdown();
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A FlushNodeList filter for shutting down the node.
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class NodeShutdownFlushNodeListFilter extends BaseFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public static final function createNodeShutdownFlushNodeListFilter () {
+ // Get a new instance
+ $filterInstance = new NodeShutdownFlushNodeListFilter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter with given request and response objects
+ *
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
+ * @return void
+ * @throws FilterChainException If $nodeInstance is null (no NullPointerException please)
+ * @todo 0% done
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Get node instance
+ $nodeInstance = Registry::getRegistry()->getInstance('node');
+
+ // Now do something
+ $this->partialStub('Please implement this step.');
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A ShutdownNode filter for shutting down the node. This filter should be the
+ * last one in 'shutdown' chain so the hub is shutted down at the very end of
+ * its life... R.I.P. little hub...
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class NodeShutdownNodeFilter extends BaseFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public static final function createNodeShutdownNodeFilter () {
+ // Get a new instance
+ $filterInstance = new NodeShutdownNodeFilter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter with given request and response objects
+ *
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
+ * @return void
+ * @throws FilterChainException If $nodeInstance is null (no NullPointerException please)
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Get node instance
+ $nodeInstance = Registry::getRegistry()->getInstance('node');
+
+ // Shutdown the node. This should be the last line
+ $nodeInstance->doShutdown();
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A TaskHandler filter for shutting down the node.
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class NodeShutdownTaskHandlerFilter extends BaseFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public static final function createNodeShutdownTaskHandlerFilter () {
+ // Get a new instance
+ $filterInstance = new NodeShutdownTaskHandlerFilter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter with given request and response objects
+ *
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
+ * @return void
+ * @throws FilterChainException If $nodeInstance is null (no NullPointerException here)
+ * @todo 0% done
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Get task handler instance
+ $handlerInstance = Registry::getRegistry()->getInstance('task');
+
+ // Shutdown the task manager and all its registered tasks
+ $handlerInstance->doShutdown();
+ }
+}
+
+// [EOF]
+?>
<?php
-/**
- * A TaskHandlerInitializer filter for crunchers
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Cruncher Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class CruncherTaskHandlerInitializerFilter extends BaseFilter implements Filterable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this filter class
- *
- * @return $filterInstance An instance of this filter class
- */
- public static final function createCruncherTaskHandlerInitializerFilter () {
- // Get a new instance
- $filterInstance = new CruncherTaskHandlerInitializerFilter();
-
- // Return the instance
- return $filterInstance;
- }
-
- /**
- * Executes the filter with given request and response objects
- *
- * @param $requestInstance An instance of a class with an Requestable interface
- * @param $responseInstance An instance of a class with an Responseable interface
- * @return void
- * @throws FilterChainException If we need to interrupt the filter chain
- * @todo 0% done
- */
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- // Get cruncher instance
- //$cruncherInstance = Registry::getRegistry()->getInstance('cruncher');
-
- // Get a new task handler instance
- $handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class');
-
- // Put the task handler in registry
- Registry::getRegistry()->addInstance('task', $handlerInstance);
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A TaskHandlerInitializer filter for hubs
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class HubTaskHandlerInitializerFilter extends BaseFilter implements Filterable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this filter class
- *
- * @return $filterInstance An instance of this filter class
- */
- public static final function createHubTaskHandlerInitializerFilter () {
- // Get a new instance
- $filterInstance = new HubTaskHandlerInitializerFilter();
-
- // Return the instance
- return $filterInstance;
- }
-
- /**
- * Executes the filter with given request and response objects
- *
- * @param $requestInstance An instance of a class with an Requestable interface
- * @param $responseInstance An instance of a class with an Responseable interface
- * @return void
- * @throws FilterChainException If we need to interrupt the filter chain
- * @todo 0% done
- */
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- // Get node instance
- $nodeInstance = Registry::getRegistry()->getInstance('node');
-
- // Get a new task handler instance
- $handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class');
-
- // Generate idle task
- $taskInstance = ObjectFactory::createObjectByConfiguredName('idle_task_class');
-
- // Register it as well
- $handlerInstance->registerTask('idle_loop', $taskInstance);
-
- // Network package reader, needs to be delayed a little
- $handlerInstance->registerTask('network_package_reader', $nodeInstance->getListenerPoolInstance());
-
- // Generate package writer task
- $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_package_writer_task_class');
-
- // Register it as well
- $handlerInstance->registerTask('network_package_writer', $taskInstance);
-
- // Query handler instance
- $handlerInstance->registerTask('query_handler', $nodeInstance->getQueryConnectorInstance());
-
- // Queue handler instance
- $handlerInstance->registerTask('queue_handler', $nodeInstance->getQueueConnectorInstance());
-
- // Prepare a self-test task for the listeners
- $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_selfconnect_task_class');
-
- // Register it
- $handlerInstance->registerTask('self_connect', $taskInstance);
-
- // Prepare a update-check task
- $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_update_check_task_class');
-
- // Register it
- $handlerInstance->registerTask('update_check', $taskInstance);
-
- // Get the list instance here
- $listInstance = $nodeInstance->getListenerPoolInstance()->getPoolEntriesInstance();
-
- // Prepare a ping task
- $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_ping_task_class', array($listInstance));
-
- // Register it
- $handlerInstance->registerTask('ping', $taskInstance);
-
- // Put the task handler in registry
- Registry::getRegistry()->addInstance('task', $handlerInstance);
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A TaskHandlerInitializer filter for crunchers
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Cruncher Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class CruncherTaskHandlerInitializerFilter extends BaseFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public static final function createCruncherTaskHandlerInitializerFilter () {
+ // Get a new instance
+ $filterInstance = new CruncherTaskHandlerInitializerFilter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter with given request and response objects
+ *
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
+ * @return void
+ * @throws FilterChainException If we need to interrupt the filter chain
+ * @todo 0% done
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Get cruncher instance
+ //$cruncherInstance = Registry::getRegistry()->getInstance('cruncher');
+
+ // Get a new task handler instance
+ $handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class');
+
+ // Put the task handler in registry
+ Registry::getRegistry()->addInstance('task', $handlerInstance);
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A TaskHandlerInitializer filter for hubs
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class NodeTaskHandlerInitializerFilter extends BaseFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public static final function createNodeTaskHandlerInitializerFilter () {
+ // Get a new instance
+ $filterInstance = new NodeTaskHandlerInitializerFilter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter with given request and response objects
+ *
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
+ * @return void
+ * @throws FilterChainException If we need to interrupt the filter chain
+ * @todo 0% done
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Get node instance
+ $nodeInstance = Registry::getRegistry()->getInstance('node');
+
+ // Get a new task handler instance
+ $handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class');
+
+ // Generate idle task
+ $taskInstance = ObjectFactory::createObjectByConfiguredName('idle_task_class');
+
+ // Register it as well
+ $handlerInstance->registerTask('idle_loop', $taskInstance);
+
+ // Network package reader, needs to be delayed a little
+ $handlerInstance->registerTask('network_package_reader', $nodeInstance->getListenerPoolInstance());
+
+ // Generate package writer task
+ $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_package_writer_task_class');
+
+ // Register it as well
+ $handlerInstance->registerTask('network_package_writer', $taskInstance);
+
+ // Query handler instance
+ $handlerInstance->registerTask('query_handler', $nodeInstance->getQueryConnectorInstance());
+
+ // Queue handler instance
+ $handlerInstance->registerTask('queue_handler', $nodeInstance->getQueueConnectorInstance());
+
+ // Prepare a self-test task for the listeners
+ $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_selfconnect_task_class');
+
+ // Register it
+ $handlerInstance->registerTask('self_connect', $taskInstance);
+
+ // Prepare a update-check task
+ $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_update_check_task_class');
+
+ // Register it
+ $handlerInstance->registerTask('update_check', $taskInstance);
+
+ // Get the list instance here
+ $listInstance = $nodeInstance->getListenerPoolInstance()->getPoolEntriesInstance();
+
+ // Prepare a ping task
+ $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_ping_task_class', array($listInstance));
+
+ // Register it
+ $handlerInstance->registerTask('ping', $taskInstance);
+
+ // Put the task handler in registry
+ Registry::getRegistry()->addInstance('task', $handlerInstance);
+ }
+}
+
+// [EOF]
+?>
* @param $responseInstance A Responseable class
* @return void
*/
- public function bootstrapAcquireHubId (Requestable $requestInstance, Responseable $responseInstance) {
+ public function bootstrapAcquireNodeId (Requestable $requestInstance, Responseable $responseInstance) {
// Get a wrapper instance
$wrapperInstance = ObjectFactory::createObjectByConfiguredName('node_info_db_wrapper_class');
// Get a crypto instance
$cryptoInstance = ObjectFactory::createObjectByConfiguredName('crypto_class');
- // Hash and encrypt the string so we become a "node id" aka Hub-Id
+ // Hash and encrypt the string so we become a node id (also documented as "hub id")
$this->setNodeId($cryptoInstance->hashString($cryptoInstance->encryptString($randomString)));
// Register the node id with our wrapper
$controllerInstance = $applicationInstance->getControllerInstance();
// Self-announcement task
- $controllerInstance->addActivationFilter(ObjectFactory::createObjectByConfiguredName('hub_activation_self_announcement_task_filter'));
+ $controllerInstance->addActivationFilter(ObjectFactory::createObjectByConfiguredName('node_activation_self_announcement_task_filter'));
// @TODO Add some filters here
$this->partialStub('Add some filters here.');
$controllerInstance = $applicationInstance->getControllerInstance();
// Self-announcement task
- $controllerInstance->addActivationFilter(ObjectFactory::createObjectByConfiguredName('hub_activation_self_announcement_task_filter'));
+ $controllerInstance->addActivationFilter(ObjectFactory::createObjectByConfiguredName('node_activation_self_announcement_task_filter'));
// @TODO Add some filters here
$this->partialStub('Add some filters here.');
$controllerInstance = $applicationInstance->getControllerInstance();
// Self-announcement task
- $controllerInstance->addActivationFilter(ObjectFactory::createObjectByConfiguredName('hub_activation_self_announcement_task_filter'));
+ $controllerInstance->addActivationFilter(ObjectFactory::createObjectByConfiguredName('node_activation_self_announcement_task_filter'));
// @TODO Add some filters here
$this->partialStub('Add some filters here.');