From f32b47d0ff970e6ed0bed68ba55195a7da9ade1f Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 24 Mar 2015 21:36:40 +0100 Subject: [PATCH] Moved all to 'core' project. Signed-off-by: Roland Haeder --- application/hub/config.php | 15 --- .../interfaces/visitor/class_Visitable.php | 35 ------ .../hub/interfaces/visitor/class_Visitor.php | 28 ----- .../interfaces/visitor/decorator/.htaccess | 1 - .../decorator/class_DecoratorVisitor.php | 35 ------ .../hub/interfaces/visitor/listener/.htaccess | 1 - .../listener/class_ListenerVisitor.php | 35 ------ .../visitor/pool/class_PoolVisitor.php | 35 ------ .../hub/interfaces/visitor/tasks/.htaccess | 1 - .../visitor/tasks/class_TaskVisitor.php | 35 ------ application/hub/main/tasks/class_ | 72 ------------ application/hub/main/tasks/class_BaseTask.php | 38 ------- application/hub/main/tasks/idle/.htaccess | 1 - .../main/tasks/idle/class_IdleLoopTask.php | 81 -------------- application/hub/main/visitor/class_ | 53 --------- .../hub/main/visitor/class_BaseVisitor.php | 62 ----------- application/hub/main/visitor/tasks/.htaccess | 1 - .../visitor/tasks/class_ActiveTaskVisitor.php | 104 ------------------ .../tasks/class_ShutdownTaskVisitor.php | 97 ---------------- core | 2 +- 20 files changed, 1 insertion(+), 731 deletions(-) delete mode 100644 application/hub/interfaces/visitor/class_Visitable.php delete mode 100644 application/hub/interfaces/visitor/class_Visitor.php delete mode 100644 application/hub/interfaces/visitor/decorator/.htaccess delete mode 100644 application/hub/interfaces/visitor/decorator/class_DecoratorVisitor.php delete mode 100644 application/hub/interfaces/visitor/listener/.htaccess delete mode 100644 application/hub/interfaces/visitor/listener/class_ListenerVisitor.php delete mode 100644 application/hub/interfaces/visitor/pool/class_PoolVisitor.php delete mode 100644 application/hub/interfaces/visitor/tasks/.htaccess delete mode 100644 application/hub/interfaces/visitor/tasks/class_TaskVisitor.php delete mode 100644 application/hub/main/tasks/class_ delete mode 100644 application/hub/main/tasks/class_BaseTask.php delete mode 100644 application/hub/main/tasks/idle/.htaccess delete mode 100644 application/hub/main/tasks/idle/class_IdleLoopTask.php delete mode 100644 application/hub/main/visitor/class_ delete mode 100644 application/hub/main/visitor/class_BaseVisitor.php delete mode 100644 application/hub/main/visitor/tasks/.htaccess delete mode 100644 application/hub/main/visitor/tasks/class_ActiveTaskVisitor.php delete mode 100644 application/hub/main/visitor/tasks/class_ShutdownTaskVisitor.php diff --git a/application/hub/config.php b/application/hub/config.php index e718837aa..9adff562d 100644 --- a/application/hub/config.php +++ b/application/hub/config.php @@ -111,9 +111,6 @@ $cfg->setConfigEntry('shutdown_socket_visitor_class', 'ShutdownSocketVisitor'); // CFG: HALF-SHUTDOWN-SOCKET-VISITOR-CLASS $cfg->setConfigEntry('half_shutdown_socket_visitor_class', 'HalfShutdownSocketVisitor'); -// CFG: ACTIVE-TASK-VISITOR-CLASS -$cfg->setConfigEntry('active_task_visitor_class', 'ActiveTaskVisitor'); - // CFG: NODE-RAW-DATA-MONITOR-VISITOR-CLASS $cfg->setConfigEntry('node_raw_data_monitor_visitor_class', 'RawDataPoolMonitorVisitor'); @@ -483,15 +480,6 @@ $cfg->setConfigEntry('task_package_tags_init_interval_delay', 1000*60*60*24*7); // CFG: TASK-PACKAGE-TAGS-INIT-MAX-RUNS $cfg->setConfigEntry('task_package_tags_init_max_runs', 1); -// CFG: TASK-IDLE-LOOP-STARTUP-DELAY -$cfg->setConfigEntry('task_idle_loop_startup_delay', 0); - -// CFG: TASK-IDLE-LOOP-INTERVAL-DELAY -$cfg->setConfigEntry('task_idle_loop_interval_delay', 0); - -// CFG: TASK-IDLE-LOOP-MAX-RUNS -$cfg->setConfigEntry('task_idle_loop_max_runs', 0); - // CFG: TASK-SELF-CONNECT-STARTUP-DELAY $cfg->setConfigEntry('task_self_connect_startup_delay', 4000); @@ -528,9 +516,6 @@ $cfg->setConfigEntry('task_ping_interval_delay', 1000*60*60); // CFG: TASK-PING-MAX-RUNS $cfg->setConfigEntry('task_ping_max_runs', 0); -// CFG: IDLE-TASK-CLASS -$cfg->setConfigEntry('idle_task_class', 'IdleLoopTask'); - // CFG: NODE-PACKAGE-TAGS-INIT-TASK-CLASS $cfg->setConfigEntry('node_package_tags_init_task_class', 'NodePackageTagsInitTask'); diff --git a/application/hub/interfaces/visitor/class_Visitable.php b/application/hub/interfaces/visitor/class_Visitable.php deleted file mode 100644 index 8f31c85d6..000000000 --- a/application/hub/interfaces/visitor/class_Visitable.php +++ /dev/null @@ -1,35 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team - * @license GNU GPL 3.0 or any newer version - * @link http://www.shipsimu.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 . - */ -interface Visitable extends FrameworkInterface { - /** - * Accepts the visitor to process the visit "request" - * - * @param $visitorInstance An instance of a Visitor class - * @return void - */ - function accept (Visitor $visitorInstance); -} - -// [EOF] -?> diff --git a/application/hub/interfaces/visitor/class_Visitor.php b/application/hub/interfaces/visitor/class_Visitor.php deleted file mode 100644 index 7f6cc26fc..000000000 --- a/application/hub/interfaces/visitor/class_Visitor.php +++ /dev/null @@ -1,28 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team - * @license GNU GPL 3.0 or any newer version - * @link http://www.shipsimu.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 . - */ -interface Visitor extends FrameworkInterface { -} - -// [EOF] -?> diff --git a/application/hub/interfaces/visitor/decorator/.htaccess b/application/hub/interfaces/visitor/decorator/.htaccess deleted file mode 100644 index 3a4288278..000000000 --- a/application/hub/interfaces/visitor/decorator/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/hub/interfaces/visitor/decorator/class_DecoratorVisitor.php b/application/hub/interfaces/visitor/decorator/class_DecoratorVisitor.php deleted file mode 100644 index 40246844f..000000000 --- a/application/hub/interfaces/visitor/decorator/class_DecoratorVisitor.php +++ /dev/null @@ -1,35 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team - * @license GNU GPL 3.0 or any newer version - * @link http://www.shipsimu.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 . - */ -interface DecoratorVisitor extends Visitor { - /** - * Visits the given decorator instance - * - * @param $decoratorInstance A decorator instance - * @return void - */ - function visitDecorator (BaseDecorator $decoratorInstance); -} - -// [EOF] -?> diff --git a/application/hub/interfaces/visitor/listener/.htaccess b/application/hub/interfaces/visitor/listener/.htaccess deleted file mode 100644 index 3a4288278..000000000 --- a/application/hub/interfaces/visitor/listener/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/hub/interfaces/visitor/listener/class_ListenerVisitor.php b/application/hub/interfaces/visitor/listener/class_ListenerVisitor.php deleted file mode 100644 index cc42bbd8d..000000000 --- a/application/hub/interfaces/visitor/listener/class_ListenerVisitor.php +++ /dev/null @@ -1,35 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team - * @license GNU GPL 3.0 or any newer version - * @link http://www.shipsimu.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 . - */ -interface ListenerVisitor extends Visitor { - /** - * Visits the given listener instance - * - * @param $listenerInstance A Listenable instance - * @return void - */ - function visitListener (Listenable $listenerInstance); -} - -// [EOF] -?> diff --git a/application/hub/interfaces/visitor/pool/class_PoolVisitor.php b/application/hub/interfaces/visitor/pool/class_PoolVisitor.php deleted file mode 100644 index fd308e2cd..000000000 --- a/application/hub/interfaces/visitor/pool/class_PoolVisitor.php +++ /dev/null @@ -1,35 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team - * @license GNU GPL 3.0 or any newer version - * @link http://www.shipsimu.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 . - */ -interface PoolVisitor extends Visitor { - /** - * Visits the given pool instance - * - * @param $poolInstance A Poolable instance - * @return void - */ - function visitPool (Poolable $poolInstance); -} - -// [EOF] -?> diff --git a/application/hub/interfaces/visitor/tasks/.htaccess b/application/hub/interfaces/visitor/tasks/.htaccess deleted file mode 100644 index 3a4288278..000000000 --- a/application/hub/interfaces/visitor/tasks/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/hub/interfaces/visitor/tasks/class_TaskVisitor.php b/application/hub/interfaces/visitor/tasks/class_TaskVisitor.php deleted file mode 100644 index c1be7769c..000000000 --- a/application/hub/interfaces/visitor/tasks/class_TaskVisitor.php +++ /dev/null @@ -1,35 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team - * @license GNU GPL 3.0 or any newer version - * @link http://www.shipsimu.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 . - */ -interface TaskVisitor extends Visitor { - /** - * Visits the given task instance - * - * @param $taskInstance A Taskable instance - * @return void - */ - function visitTask (Taskable $taskInstance); -} - -// [EOF] -?> diff --git a/application/hub/main/tasks/class_ b/application/hub/main/tasks/class_ deleted file mode 100644 index 89d4fb910..000000000 --- a/application/hub/main/tasks/class_ +++ /dev/null @@ -1,72 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 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 . - */ -class !!!???Task extends BaseTask implements Taskable, Visitable { - /** - * Protected constructor - * - * @return void - */ - protected function __construct () { - // Call parent constructor - parent::__construct(__CLASS__); - } - - /** - * Creates an instance of this class - * - * @return $taskInstance An instance of a Visitable class - */ - public final static function create!!!???Task () { - // Get new instance - $taskInstance = new !!!???Task(); - - // Return the prepared instance - return $taskInstance; - } - - /** - * Accepts the visitor to process the visitor - * - * @param $visitorInstance An instance of a Visitor class - * @return void - * @todo Maybe visit some sub-objects - */ - public function accept (Visitor $visitorInstance) { - // Visit this task - $visitorInstance->visitTask($this); - } - - /** - * Executes the task - * - * @return void - * @todo 0% - */ - public function executeTask () { - $this->partialStub('Unimplemented task.'); - } -} - -// [EOF] -?> diff --git a/application/hub/main/tasks/class_BaseTask.php b/application/hub/main/tasks/class_BaseTask.php deleted file mode 100644 index e85898a86..000000000 --- a/application/hub/main/tasks/class_BaseTask.php +++ /dev/null @@ -1,38 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team - * @license GNU GPL 3.0 or any newer version - * @link http://www.shipsimu.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 . - */ -class BaseTask extends BaseHubSystem { - /** - * Protected constructor - * - * @param $className Name of the class - * @return void - */ - protected function __construct ($className) { - // Call parent constructor - parent::__construct($className); - } -} - -// [EOF] -?> diff --git a/application/hub/main/tasks/idle/.htaccess b/application/hub/main/tasks/idle/.htaccess deleted file mode 100644 index 3a4288278..000000000 --- a/application/hub/main/tasks/idle/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/hub/main/tasks/idle/class_IdleLoopTask.php b/application/hub/main/tasks/idle/class_IdleLoopTask.php deleted file mode 100644 index 30cd722d3..000000000 --- a/application/hub/main/tasks/idle/class_IdleLoopTask.php +++ /dev/null @@ -1,81 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team - * @license GNU GPL 3.0 or any newer version - * @link http://www.shipsimu.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 . - */ -class IdleLoopTask extends BaseTask implements Taskable, Visitable { - /** - * Protected constructor - * - * @return void - */ - protected function __construct () { - // Call parent constructor - parent::__construct(__CLASS__); - } - - /** - * Creates an instance of this class - * - * @return $taskInstance An instance of a Taskable/Visitable class - */ - public static final function createIdleLoopTask () { - // Get new instance - $taskInstance = new IdleLoopTask(); - - // Return the prepared instance - return $taskInstance; - } - - /** - * Accepts the visitor to process the visitor - * - * @param $visitorInstance An instance of a Visitor class - * @return void - */ - public function accept (Visitor $visitorInstance) { - // Visit this task - $visitorInstance->visitTask($this); - } - - /** - * Executes the task - * - * @return void - */ - public function executeTask () { - // Idle here a little (2 milliseconds) - $this->idle(2); - } - - /** - * Shutdown this task, this does nothing here, just supply the method. - * - * @return void - */ - public function doShutdown () { - // Debug message - self::createDebugInstance(__CLASS__)->debugOutput('IDLE-TASK[' . __METHOD__ . ':' . __LINE__ . ']: Shutting down...'); - } -} - -// [EOF] -?> diff --git a/application/hub/main/visitor/class_ b/application/hub/main/visitor/class_ deleted file mode 100644 index f82d77728..000000000 --- a/application/hub/main/visitor/class_ +++ /dev/null @@ -1,53 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 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 . - */ -class ???Visitor extends BaseVisitor implements Visitor { - /** - * Protected constructor - * - * @return void - */ - protected function __construct () { - // Call parent constructor - parent::__construct(__CLASS__); - - // Set visitor mode - $this->setVisitorMode('!!!'); - } - - /** - * Creates an instance of this class - * - * @return $visitorInstance An instance a Visitorable class - */ - public final static function create???Visitor () { - // Get new instance - $visitorInstance = new ???Visitor(); - - // Return the prepared instance - return $visitorInstance; - } -} - -// [EOF] -?> diff --git a/application/hub/main/visitor/class_BaseVisitor.php b/application/hub/main/visitor/class_BaseVisitor.php deleted file mode 100644 index cc39cf748..000000000 --- a/application/hub/main/visitor/class_BaseVisitor.php +++ /dev/null @@ -1,62 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team - * @license GNU GPL 3.0 or any newer version - * @link http://www.shipsimu.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 . - */ -class BaseVisitor extends BaseHubSystem { - /** - * Mode of the visitor (the first word of the concrete class' name) - */ - private $visitorMode = 'invalid'; - - /** - * Protected constructor - * - * @param $className Name of the class - * @return void - */ - protected function __construct ($className) { - // Call parent constructor - parent::__construct($className); - } - - /** - * Setter for visitor mode - * - * @param $visitorMode New visitor mode to set - * @return void - */ - protected final function setVisitorMode ($visitorMode) { - $this->visitorMode = (string) $visitorMode; - } - - /** - * Getter for visitor mode - * - * @return $visitorMode New visitor mode to set - */ - public final function getVisitorMode () { - return $this->visitorMode; - } -} - -// [EOF] -?> diff --git a/application/hub/main/visitor/tasks/.htaccess b/application/hub/main/visitor/tasks/.htaccess deleted file mode 100644 index 3a4288278..000000000 --- a/application/hub/main/visitor/tasks/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/hub/main/visitor/tasks/class_ActiveTaskVisitor.php b/application/hub/main/visitor/tasks/class_ActiveTaskVisitor.php deleted file mode 100644 index 89807543f..000000000 --- a/application/hub/main/visitor/tasks/class_ActiveTaskVisitor.php +++ /dev/null @@ -1,104 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team - * @license GNU GPL 3.0 or any newer version - * @link http://www.shipsimu.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 . - */ -class ActiveTaskVisitor extends BaseVisitor implements TaskVisitor, PoolVisitor, ListenerVisitor, DecoratorVisitor { - /** - * Protected constructor - * - * @return void - */ - protected function __construct () { - // Call parent constructor - parent::__construct(__CLASS__); - - // Set visitor mode - $this->setVisitorMode('task'); - } - - /** - * Creates an instance of this class - * - * @return $visitorInstance An instance a Visitorable class - */ - public static final function createActiveTaskVisitor () { - // Get new instance - $visitorInstance = new ActiveTaskVisitor(); - - // Return the prepared instance - return $visitorInstance; - } - - /** - * Visits the given task instance - * - * @param $taskInstance A Taskable instance - * @return void - */ - public function visitTask (Taskable $taskInstance) { - // Execute the task from this visitor - //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visiting task ' . $taskInstance->__toString() . ' - CALLED!'); - $taskInstance->executeTask(); - //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visiting task ' . $taskInstance->__toString() . ' - EXIT!'); - } - - /** - * Pool visitor method for active tasks - * - * @param $poolInstance A Poolable instance - * @return void - */ - public function visitPool (Poolable $poolInstance) { - /** - * We don't need to visit a pool as an active task because a pool can - * never become a task. Instead e.g. by a listener pool we should visit - * all listeners one by one - */ - } - - /** - * Visits the given listener instance - * - * @param $listenerInstance A Listenable instance - * @return void - */ - public function visitListener (Listenable $listenerInstance) { - // Do "listen" here - //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visiting ' . $listenerInstance->__toString() . ' - CALLED!'); - $listenerInstance->doListen(); - //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visiting ' . $listenerInstance->__toString() . ' - FINISH'); - } - - /** - * Visits the given decorator instance - * - * @param $decoratorInstance A decorator instance - * @return void - */ - public function visitDecorator (BaseDecorator $decoratorInstance) { - // A decorator itself can never become an active task so this method - // remains empty. - } -} - -// [EOF] -?> diff --git a/application/hub/main/visitor/tasks/class_ShutdownTaskVisitor.php b/application/hub/main/visitor/tasks/class_ShutdownTaskVisitor.php deleted file mode 100644 index 2854d08d2..000000000 --- a/application/hub/main/visitor/tasks/class_ShutdownTaskVisitor.php +++ /dev/null @@ -1,97 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team - * @license GNU GPL 3.0 or any newer version - * @link http://www.shipsimu.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 . - */ -class ShutdownTaskVisitor extends BaseVisitor implements TaskVisitor, PoolVisitor, ListenerVisitor, DecoratorVisitor { - /** - * Protected constructor - * - * @return void - */ - protected function __construct () { - // Call parent constructor - parent::__construct(__CLASS__); - - // Set visitor mode - $this->setVisitorMode('task'); - } - - /** - * Creates an instance of this class - * - * @return $visitorInstance An instance a Visitorable class - */ - public static final function createShutdownTaskVisitor () { - // Get new instance - $visitorInstance = new ShutdownTaskVisitor(); - - // Return the prepared instance - return $visitorInstance; - } - - /** - * Visits the given task instance - * - * @param $taskInstance A Taskable instance - * @return void - */ - public function visitTask (Taskable $taskInstance) { - // Shutdown the task instance - $taskInstance->doShutdown(); - } - - /** - * Pool visitor method for active tasks - * - * @param $poolInstance A Poolable instance - * @return void - */ - public function visitPool (Poolable $poolInstance) { - // Shutdown the pool instance - $poolInstance->doShutdown(); - } - - /** - * Visits the given listener instance - * - * @param $listenerInstance A Listenable instance - * @return void - */ - public function visitListener (Listenable $listenerInstance) { - // Shutdown the listener instance - $listenerInstance->doShutdown(); - } - - /** - * Visits the given decorator instance - * - * @param $decoratorInstance A decorator instance - * @return void - */ - public function visitDecorator (BaseDecorator $decoratorInstance) { - // Shutdown the decorator instance - $decoratorInstance->doShutdown(); - } -} - -// [EOF] -?> diff --git a/core b/core index 7384b77ce..10ac8b8c8 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 7384b77cecad873dc0abba61365ed844373a8b51 +Subproject commit 10ac8b8c83a1194031e419c9d0c11326f181c649 -- 2.39.2