3 namespace Org\Mxchange\City\Daemon\Simulation;
5 // Import application-specific stuff
6 use Org\Mxchange\City\Helper\CityHelper;
8 // Import framework stuff
9 use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask;
10 use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
11 use Org\Mxchange\CoreFramework\Registry\Registerable;
12 use Org\Mxchange\CoreFramework\Request\Requestable;
15 * A hub-node class for the '???' mode
17 * @author Roland Haeder <webmaster@ship-simu.org>
19 * @copyright Copyright (c) 2015 - 2023 City Developer Team
20 * @license GNU GPL 3.0 or any newer version
21 * @link http://www.ship-simu.org
23 * This program is free software: you can redistribute it and/or modify
24 * it under the terms of the GNU General Public License as published by
25 * the Free Software Foundation, either version 3 of the License, or
26 * (at your option) any later version.
28 * This program is distributed in the hope that it will be useful,
29 * but WITHOUT ANY WARRANTY; without even the implied warranty of
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 * GNU General Public License for more details.
33 * You should have received a copy of the GNU General Public License
34 * along with this program. If not, see <http://www.gnu.org/licenses/>.
36 class Simulation???CityDaemon extends BaseCity implements CityHelper, Registerable {
38 * Protected constructor
42 protected function __construct () {
43 // Call parent constructor
44 parent::__construct(__CLASS__);
48 * Creates an instance of this hub-node class
50 * @param $requestInstance An instance of a Requestable class
51 * @return $nodeInstance An instance of this hub-node class
53 public final static function createSimulation???CityDaemon (Requestable $requestInstance) {
55 $nodeInstance = new Simulation???CityDaemon();
57 // Set the request instance
58 $nodeInstance->setRequestInstance($requestInstance);
60 // Return the instance
65 * Method to "bootstrap" the node. This step does also apply provided
66 * command-line arguments stored in the request instance. The regular node
67 * should communicate with the bootstrap-nodes at this point.
70 * @todo Implement this method
72 public function doBootstrapping () {
73 // Call generic (parent) bootstrapping method first
74 parent::doGenericBootstrapping();
75 DebugMiddleware::getSelfInstance()->partialStub('Please implement this method.');
79 * Initializes hub-specific queues
82 * @todo Implement this method
84 public function initQueues () {
85 DebugMiddleware::getSelfInstance()->partialStub('Please implement this method.');
89 * Add some node-specific filters
93 public function addExtraCityFilters () {
94 // Add some filters here
98 * Adds extra tasks to the given handler for this node
100 * @param $handlerInstance An instance of a HandleableTask class
104 public function addExtraTasks (HandleableTask $handlerInstance) {
105 DebugMiddleware::getSelfInstance()->partialStub('Please add some tasks or empty this method.');