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