application/hub/main/tasks/idle/class_IdleLoopTask.php svneol=native#text/plain
application/hub/main/tasks/network/.htaccess -text svneol=unset#text/plain
application/hub/main/tasks/network/class_NetworkPackageWriterTask.php svneol=native#text/plain
+application/hub/main/tasks/node/.htaccess -text svneol=unset#text/plain
+application/hub/main/tasks/node/announcement/.htaccess -text svneol=unset#text/plain
+application/hub/main/tasks/node/announcement/class_NodeAnnouncementTask.php -text
+application/hub/main/tasks/node/chunks/.htaccess -text svneol=unset#text/plain
+application/hub/main/tasks/node/chunks/class_NodeChunkAssemblerTask.php -text
+application/hub/main/tasks/node/class_Node svneol=native#text/plain
+application/hub/main/tasks/node/decoder/.htaccess -text svneol=unset#text/plain
+application/hub/main/tasks/node/decoder/class_NodePackageDecoderTask.php -text
+application/hub/main/tasks/node/dht/.htaccess -text svneol=unset#text/plain
+application/hub/main/tasks/node/dht/class_NodeDhtQueryTask.php svneol=native#text/plain
+application/hub/main/tasks/node/listener/.htaccess -text svneol=unset#text/plain
+application/hub/main/tasks/node/ping/.htaccess -text svneol=unset#text/plain
+application/hub/main/tasks/node/ping/class_NodePingTask.php -text
+application/hub/main/tasks/node/self_connect/.htaccess -text svneol=unset#text/plain
+application/hub/main/tasks/node/self_connect/class_NodeSelfConnectTask.php svneol=native#text/plain
+application/hub/main/tasks/node/update/.htaccess -text svneol=unset#text/plain
+application/hub/main/tasks/node/update/class_NodeUpdateCheckTask.php -text
application/hub/main/template/.htaccess -text svneol=unset#text/plain
application/hub/main/template/announcement/.htaccess -text svneol=unset#text/plain
application/hub/main/template/announcement/class_XmlAnnouncementTemplateEngine.php svneol=native#text/plain
// CFG: UDP-LISTENER-CLASS
$cfg->setConfigEntry('udp_listener_class', 'UdpListener');
-// CFG: HUB-TCP-LISTENER-CLASS
-$cfg->setConfigEntry('hub_tcp_listener_class', 'HubTcpListenerDecorator');
+// CFG: NODE-TCP-LISTENER-CLASS
+$cfg->setConfigEntry('node_tcp_listener_class', 'HubTcpListenerDecorator');
-// CFG: HUB-UDP-LISTENER-CLASS
-$cfg->setConfigEntry('hub_udp_listener_class', 'HubUdpListenerDecorator');
+// CFG: NODE-UDP-LISTENER-CLASS
+$cfg->setConfigEntry('node_udp_listener_class', 'HubUdpListenerDecorator');
// CFG: CLIENT-TCP-LISTENER-CLASS
$cfg->setConfigEntry('client_tcp_listener_class', 'ClientTcpListenerDecorator');
// CFG: LIST-GROUP-CLASS
$cfg->setConfigEntry('list_group_class', 'ListGroupList');
-// CFG: HUB-ANNOUNCEMENT-HELPER-CLASS
-$cfg->setConfigEntry('hub_announcement_helper_class', 'HubAnnouncementHelper');
+// CFG: NODE-ANNOUNCEMENT-HELPER-CLASS
+$cfg->setConfigEntry('node_announcement_helper_class', 'HubAnnouncementHelper');
-// CFG: HUB-SELF-CONNECT-HELPER-CLASS
-$cfg->setConfigEntry('hub_self_connect_helper_class', 'HubSelfConnectHelper');
+// CFG: NODE-SELF-CONNECT-HELPER-CLASS
+$cfg->setConfigEntry('node_self_connect_helper_class', 'HubSelfConnectHelper');
// CFG: DEFAULT-CONSOLE-COMMAND
$cfg->setConfigEntry('default_console_command', 'main');
// CFG: IDLE-TASK-CLASS
$cfg->setConfigEntry('idle_task_class', 'IdleLoopTask');
-// CFG: HUB-SELFCONNECT-TASK-CLASS
-$cfg->setConfigEntry('hub_selfconnect_task_class', 'HubSelfConnectTask');
+// CFG: NODE-SELFCONNECT-TASK-CLASS
+$cfg->setConfigEntry('node_selfconnect_task_class', 'NodeSelfConnectTask');
-// CFG: HUB-UPDATE-CHECK-TASK-CLASS
-$cfg->setConfigEntry('hub_update_check_task_class', 'HubUpdateCheckTask');
+// CFG: NODE-UPDATE-CHECK-TASK-CLASS
+$cfg->setConfigEntry('node_update_check_task_class', 'NodeUpdateCheckTask');
-// CFG: HUB-PING-TASK-CLASS
-$cfg->setConfigEntry('hub_ping_task_class', 'HubPingTask');
+// CFG: NODE-PING-TASK-CLASS
+$cfg->setConfigEntry('node_ping_task_class', 'NodePingTask');
-// CFG: HUB-SELF-ANNOUNCEMENT-TASK-CLASS
-$cfg->setConfigEntry('hub_self_announcement_task_class', 'HubSelfAnnouncementTask');
+// CFG: NODE-ANNOUNCEMENT-TASK-CLASS
+$cfg->setConfigEntry('node_announcement_task_class', 'NodeAnnouncementTask');
-// CFG: HUB-PACKAGE-WRITER-TASK-CLASS
-$cfg->setConfigEntry('hub_package_writer_task_class', 'NetworkPackageWriterTask');
+// CFG: NODE-PACKAGE-WRITER-TASK-CLASS
+$cfg->setConfigEntry('node_package_writer_task_class', 'NetworkPackageWriterTask');
-// CFG: HUB-PACKAGE-READER-TASK-CLASS
-$cfg->setConfigEntry('hub_package_reader_task_class', 'NetworkPackageReaderTask');
+// CFG: NODE-PACKAGE-READER-TASK-CLASS
+$cfg->setConfigEntry('node_package_reader_task_class', 'NetworkPackageReaderTask');
-// CFG: HUB-SOCKET-LISTENER-TASK-CLASS
-$cfg->setConfigEntry('hub_socket_listener_task_class', 'HubSocketListenerTask');
+// CFG: NODE-SOCKET-LISTENER-TASK-CLASS
+$cfg->setConfigEntry('node_socket_listener_task_class', 'NodeSocketListenerTask');
-// CFG: HUB-CHUNK-ASSEMBLER-TASK-CLASS
-$cfg->setConfigEntry('hub_chunk_assembler_task_class', 'HubChunkAssemblerTask');
+// CFG: NODE-CHUNK-ASSEMBLER-TASK-CLASS
+$cfg->setConfigEntry('node_chunk_assembler_task_class', 'NodeChunkAssemblerTask');
-// CFG: HUB-PACKAGE-DECODER-TASK-CLASS
-$cfg->setConfigEntry('hub_package_decoder_task_class', 'HubPackageDecoderTask');
+// CFG: NODE-PACKAGE-DECODER-TASK-CLASS
+$cfg->setConfigEntry('node_package_decoder_task_class', 'NodePackageDecoderTask');
+
+// CFG: NODE-DHT-QUERY-TASK-CLASS
+$cfg->setConfigEntry('node_dht_query_task_class', 'NodeDhtQueryTask');
// CFG: TASK-NETWORK-PACKAGE-WRITER-STARTUP-DELAY
$cfg->setConfigEntry('task_network_package_writer_startup_delay', 2500);
// CFG: TASK-SOCKET-LISTENER-MAX-RUNS
$cfg->setConfigEntry('task_socket_listener_max_runs', 0);
-// CFG: TASK-CHUNK-ASSEMBLER-STATUP-DELAY
-$cfg->setConfigEntry('task_chunk_assembler_startup_delay', 1500);
-
// CFG: TASK-PACKAGE-DECODER-STATUP-DELAY
$cfg->setConfigEntry('task_package_decoder_startup_delay', 1300);
-// CFG: TASK-CHUNK-ASSEMBLER-INTERVAL-DELAY
-$cfg->setConfigEntry('task_chunk_assembler_interval_delay', 10);
-
// CFG: TASK-PACKAGE-DECODER-INTERVAL-DELAY
$cfg->setConfigEntry('task_package_decoder_interval_delay', 10);
+// CFG: TASK-PACKAGE-DECODER-MAX-RUNS
+$cfg->setConfigEntry('task_package_decoder_max_runs', 0);
+
+// CFG: TASK-CHUNK-ASSEMBLER-STATUP-DELAY
+$cfg->setConfigEntry('task_chunk_assembler_startup_delay', 1500);
+
+// CFG: TASK-CHUNK-ASSEMBLER-INTERVAL-DELAY
+$cfg->setConfigEntry('task_chunk_assembler_interval_delay', 10);
+
// CFG: TASK-CHUNK-ASSEMBLER-MAX-RUNS
$cfg->setConfigEntry('task_chunk_assembler_max_runs', 0);
-// CFG: TASK-PACKAGE-DECODER-MAX-RUNS
-$cfg->setConfigEntry('task_package_decoder_max_runs', 0);
+// CFG: TASK-DHT-QUERY-STATUP-DELAY
+$cfg->setConfigEntry('task_dht_query_startup_delay', 1400);
+
+// CFG: TASK-DHT-QUERY-INTERVAL-DELAY
+$cfg->setConfigEntry('task_dht_query_interval_delay', 10);
+
+// CFG: TASK-DHT-QUERY-MAX-RUNS
+$cfg->setConfigEntry('task_dht_query_max_runs', 0);
// CFG: TASK-LIST-CLASS
$cfg->setConfigEntry('task_list_class', 'TaskList');
// CFG: QUERY-ITERATOR-CLASS
$cfg->setConfigEntry('query_iterator_class', 'DefaultIterator');
-// CFG: HUB-PING-ITERATOR-CLASS
-$cfg->setConfigEntry('hub_ping_iterator_class', 'HubPingIterator');
+// CFG: NODE-PING-ITERATOR-CLASS
+$cfg->setConfigEntry('node_ping_iterator_class', 'HubPingIterator');
// CFG: LOCAL-QUERY-LIST-CLASS
$cfg->setConfigEntry('local_query_list_class', 'LocalQueryList');
* @return void
* @throws NodeAlreadyAnnouncedException If this hub is already announced
*/
- function announceSelfToUpperNodes (Taskable $taskInstance);
+ function announceToUpperNodes (Taskable $taskInstance);
/**
* Does a self-connect attempt on the public IP address. This should make
$handlerInstance = Registry::getRegistry()->getInstance('task');
// Prepare a self-test task for the listeners
- $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_self_announcement_task_class');
+ $taskInstance = ObjectFactory::createObjectByConfiguredName('node_announcement_task_class');
// Register it
$handlerInstance->registerTask('self_announcement', $taskInstance);
$handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class');
// Generate socket listener task
- $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_socket_listener_task_class');
+ $taskInstance = ObjectFactory::createObjectByConfiguredName('node_socket_listener_task_class');
// Network package reader, needs to be delayed a little
$handlerInstance->registerTask('socket_listener', $taskInstance);
// Generate package reader task
- $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_package_reader_task_class', array($nodeInstance->getListenerPoolInstance()));
+ $taskInstance = ObjectFactory::createObjectByConfiguredName('node_package_reader_task_class', array($nodeInstance->getListenerPoolInstance()));
// Network package reader, needs to be delayed a little
$handlerInstance->registerTask('network_package_reader', $taskInstance);
// Generate package writer task
- $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_package_writer_task_class');
+ $taskInstance = ObjectFactory::createObjectByConfiguredName('node_package_writer_task_class');
// Register it as well
$handlerInstance->registerTask('network_package_writer', $taskInstance);
// Generate chunk assembler task
- $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_chunk_assembler_task_class');
+ $taskInstance = ObjectFactory::createObjectByConfiguredName('node_chunk_assembler_task_class');
// Register it as well
$handlerInstance->registerTask('chunk_assembler', $taskInstance);
// Generate package decoder task
- $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_package_decoder_task_class');
+ $taskInstance = ObjectFactory::createObjectByConfiguredName('node_package_decoder_task_class');
// Register it as well
$handlerInstance->registerTask('package_decoder', $taskInstance);
+ // Generate DHT query task
+ $taskInstance = ObjectFactory::createObjectByConfiguredName('node_dht_query_task_class');
+
+ // Register it as well
+ $handlerInstance->registerTask('dht_query', $taskInstance);
+
// Query handler instance
$handlerInstance->registerTask('query_handler', $nodeInstance->getQueryConnectorInstance());
$handlerInstance->registerTask('queue_handler', $nodeInstance->getQueueConnectorInstance());
// Prepare a self-test task for the listeners
- $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_selfconnect_task_class');
+ $taskInstance = ObjectFactory::createObjectByConfiguredName('node_selfconnect_task_class');
// Register it
$handlerInstance->registerTask('self_connect', $taskInstance);
// Prepare a update-check task
- $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_update_check_task_class');
+ $taskInstance = ObjectFactory::createObjectByConfiguredName('node_update_check_task_class');
// Register it
$handlerInstance->registerTask('update_check', $taskInstance);
$listInstance = $nodeInstance->getListenerPoolInstance()->getPoolEntriesInstance();
// Prepare a ping task
- $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_ping_task_class', array($listInstance));
+ $taskInstance = ObjectFactory::createObjectByConfiguredName('node_ping_task_class', array($listInstance));
// Register it
$handlerInstance->registerTask('ping', $taskInstance);
*/
public function getListIterator () {
// Get the iterator instance from the factory
- $iteratorInstance = ObjectFactory::createObjectByConfiguredName('hub_ping_iterator_class', array($this));
+ $iteratorInstance = ObjectFactory::createObjectByConfiguredName('node_ping_iterator_class', array($this));
// Rewind it
$iteratorInstance->rewind();
* @throws NodeAlreadyAnnouncedException If this hub is already announced
* @todo Change the first if() block to check for a specific state
*/
- public function announceSelfToUpperNodes (Taskable $taskInstance) {
+ public function announceToUpperNodes (Taskable $taskInstance) {
// Is this hub node announced?
if ($this->hubIsAnnounced === true) {
// Already announced!
self::createDebugInstance(__CLASS__)->debugOutput('HUB-Announcement: START (taskInstance=' . $taskInstance->__toString(). ')');
// Get a helper instance
- $helperInstance = ObjectFactory::createObjectByConfiguredName('hub_announcement_helper_class');
+ $helperInstance = ObjectFactory::createObjectByConfiguredName('node_announcement_helper_class');
// Load the announcement descriptor
$helperInstance->loadDescriptorXml($this);
self::createDebugInstance(__CLASS__)->debugOutput('HUB: Self Connection: START (taskInstance=' . $taskInstance->__toString(). ')');
// Get a helper instance
- $helperInstance = ObjectFactory::createObjectByConfiguredName('hub_self_connect_helper_class', array($this));
+ $helperInstance = ObjectFactory::createObjectByConfiguredName('node_self_connect_helper_class', array($this));
// Load the descriptor (XML) file
$helperInstance->loadDescriptorXml($this);
$listenerInstance->initListener();
// Get a decorator class
- $decoratorInstance = ObjectFactory::createObjectByConfiguredName('hub_tcp_listener_class', array($listenerInstance));
+ $decoratorInstance = ObjectFactory::createObjectByConfiguredName('node_tcp_listener_class', array($listenerInstance));
// Add this listener to the pool
$this->getListenerPoolInstance()->addListener($decoratorInstance);
$listenerInstance->initListener();
// Get a decorator class
- $decoratorInstance = ObjectFactory::createObjectByConfiguredName('hub_udp_listener_class', array($listenerInstance));
+ $decoratorInstance = ObjectFactory::createObjectByConfiguredName('node_udp_listener_class', array($listenerInstance));
// Add this listener to the pool
$this->getListenerPoolInstance()->addListener($decoratorInstance);
<?php
-/**
- * A HubSelfAnnouncement task
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 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 HubSelfAnnouncementTask 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 createHubSelfAnnouncementTask () {
- // Get new instance
- $taskInstance = new HubSelfAnnouncementTask();
-
- // Return the prepared instance
- return $taskInstance;
- }
-
- /**
- * Accepts the visitor to process the visit "request"
- *
- * @param $visitorInstance An instance of a Visitor class
- * @return void
- * @todo 0%
- */
- public function accept (Visitor $visitorInstance) {
- // Visit this task
- $visitorInstance->visitTask($this);
- }
-
- /**
- * Executes the task
- *
- * @return void
- */
- public function executeTask () {
- // Get the node instance and announce us
- Registry::getRegistry()->getInstance('node')->announceSelfToUpperNodes($this);
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A ChunkAssembler hub-task
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 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 HubChunkAssemblerTask 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 createHubChunkAssemblerTask () {
- // Get new instance
- $taskInstance = new HubChunkAssemblerTask();
-
- // Get a chunk handler instance
- $handlerInstance = ChunkHandlerFactory::createChunkHandlerInstance();
-
- // And add it to this task instance
- $taskInstance->setHandlerInstance($handlerInstance);
-
- // Return the prepared instance
- return $taskInstance;
- }
-
- /**
- * Accepts the visitor to process the visit "request"
- *
- * @param $visitorInstance An instance of a Visitor class
- * @return void
- * @todo Also visit some sub-objects?
- */
- public function accept (Visitor $visitorInstance) {
- // Visit this task
- $visitorInstance->visitTask($this);
- }
-
- /**
- * Executes the task
- *
- * @return void
- */
- public function executeTask () {
- // Are there chunks to handle or a final array to assemble?
- if ($this->getHandlerInstance()->ifUnassembledChunksAvailable()) {
- /*
- * Then do the final steps:
- *
- * 1) Sort the final array with ksort(). This will bring the "hash
- * chunk" up to the last array index and the EOP chunk to the
- * pre-last array index
- * 2) Assemble all chunks except two last (see above step)
- * 3) While so, do the final check on all hashes
- * 4) If the package is assembled back together, hash it again for
- * the very final verification.
- */
- $this->getHandlerInstance()->assembleChunksFromFinalArray();
- } elseif ($this->getHandlerInstance()->ifUnhandledChunksWithFinalAvailable()) {
- /*
- * Then handle them (not all!). This should push all chunks into a
- * 'final array' for last verification.
- */
- $this->getHandlerInstance()->handleAvailableChunksWithFinal();
- } elseif ($this->getHandlerInstance()->ifRawPackageDataIsAvailable()) {
- /*
- * The final raw package data is back together again. So feed it
- * into the next stack for further decoding/processing
- */
- $this->getHandlerInstance()->handledAssembledRawPackageData();
- }
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A ??? hub-task
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 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 Hub???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 createHub???Task () {
- // Get new instance
- $taskInstance = new Hub???Task();
-
- // Return the prepared instance
- return $taskInstance;
- }
-
- /**
- * Accepts the visitor to process the visit "request"
- *
- * @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]
+// @DEPRECATED
?>
<?php
-/**
- * A HubSelfConnect task
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 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 HubSelfConnectTask 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 createHubSelfConnectTask () {
- // Get new instance
- $taskInstance = new HubSelfConnectTask();
-
- // Return the prepared instance
- return $taskInstance;
- }
-
- /**
- * Accepts the visitor to process the visit "request"
- *
- * @param $visitorInstance An instance of a Visitor class
- * @return void
- * @todo 0%
- */
- public function accept (Visitor $visitorInstance) {
- // Visit this task
- $visitorInstance->visitTask($this);
- }
-
- /**
- * Executes the task
- *
- * @return void
- */
- public function executeTask () {
- // Get the node instance and try it
- Registry::getRegistry()->getInstance('node')->doSelfConnection($this);
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A HubSocketListener task
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 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 HubSocketListenerTask 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 createHubSocketListenerTask () {
- // Get new instance
- $taskInstance = new HubSocketListenerTask();
-
- // Return the prepared instance
- return $taskInstance;
- }
-
- /**
- * Accepts the visitor to process the visit "request"
- *
- * @param $visitorInstance An instance of a Visitor class
- * @return void
- */
- public function accept (Visitor $visitorInstance) {
- // Get the node instance from registry
- $nodeInstance = Registry::getRegistry()->getInstance('node');
-
- // Visit the pool listener task
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('LISTENER-TASK: Going to visit object ' . $nodeInstance->getListenerPoolInstance()->__toString() . ' ...');
- $nodeInstance->getListenerPoolInstance()->accept($visitorInstance);
-
- // Visit this task
- // @TODO Do we need to visit this task? $visitorInstance->visitTask($this);
- }
-
- /**
- * Executes the task
- *
- * @return void
- * @todo 0% done
- */
- public function executeTask () {
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A PackageDecoder hub-task
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 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 HubPackageDecoderTask 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 createHubPackageDecoderTask () {
- // Get new instance
- $taskInstance = new HubPackageDecoderTask();
-
- // Get a chunk handler instance
- $handlerInstance = ChunkHandlerFactory::createChunkHandlerInstance();
-
- // Get the stacker from it, we don't need the handler here
- $stackerInstance = $handlerInstance->getStackerInstance();
-
- // Get a decoder instance
- $decoderInstance = ObjectFactory::createObjectByConfiguredName('package_decoder_class', array($stackerInstance));
-
- // ... and also set the decoder instance here
- $taskInstance->setDecoderInstance($decoderInstance);
-
- // Return the prepared instance
- return $taskInstance;
- }
-
- /**
- * Accepts the visitor to process the visit "request"
- *
- * @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
- */
- public function executeTask () {
- // Check if the stacker has some entries left
- if ($this->getDecoderInstance()->ifUnhandledRawPackageDataLeft()) {
- // Then handle it
- $this->getDecoderInstance()->handleRawPackageData();
- } elseif ($this->getDecoderInstance()->ifDeocedPackagesLeft()) {
- // Some decoded packages have arrived (for this peer)
- $this->getDecoderInstance()->handleDecodedPackage();
- }
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A HubPing task
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 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 HubPingTask extends BaseTask implements Taskable, Visitable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this class
- *
- * @param $listInstance A Listable instance
- * @return $taskInstance An instance of a Taskable/Visitable class
- */
- public static final function createHubPingTask (Listable $listInstance) {
- // Get new instance
- $taskInstance = new HubPingTask();
-
- // Se the list instance in this task
- $taskInstance->setListInstance($listInstance);
-
- // Init ping iterator instance
- $iteratorInstance = $listInstance->getListIterator();
-
- // Set it as well
- $taskInstance->setIteratorInstance($iteratorInstance);
-
- // Return the prepared instance
- return $taskInstance;
- }
-
- /**
- * Accepts the visitor to process the visit "request"
- *
- * @param $visitorInstance An instance of a Visitor class
- * @return void
- * @todo Also visit some sub-objects?
- */
- public function accept (Visitor $visitorInstance) {
- // Visit this task
- $visitorInstance->visitTask($this);
- }
-
- /**
- * Executes the task
- *
- * @return void
- * @todo 0% done
- */
- public function executeTask () {
- $this->partialStub('Unimplemented task.');
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A HubUpdateCheck task
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 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 HubUpdateCheckTask 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 createHubUpdateCheckTask () {
- // Get new instance
- $taskInstance = new HubUpdateCheckTask();
-
- // Return the prepared instance
- return $taskInstance;
- }
-
- /**
- * Accepts the visitor to process the visit "request"
- *
- * @param $visitorInstance An instance of a Visitor class
- * @return void
- * @todo 0%
- */
- public function accept (Visitor $visitorInstance) {
- // Visit this task
- $visitorInstance->visitTask($this);
- }
-
- /**
- * Executes the task
- *
- * @return void
- */
- public function executeTask () {
- $this->partialStub('Unimplemented task.');
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
--- /dev/null
+Deny from all
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A Announcement node-task
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 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 NodeAnnouncementTask 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 createNodeAnnouncementTask () {
+ // Get new instance
+ $taskInstance = new NodeAnnouncementTask();
+
+ // Return the prepared instance
+ return $taskInstance;
+ }
+
+ /**
+ * Accepts the visitor to process the visit "request"
+ *
+ * @param $visitorInstance An instance of a Visitor class
+ * @return void
+ * @todo 0%
+ */
+ public function accept (Visitor $visitorInstance) {
+ // Visit this task
+ $visitorInstance->visitTask($this);
+ }
+
+ /**
+ * Executes the task
+ *
+ * @return void
+ */
+ public function executeTask () {
+ // Get the node instance and announce us
+ Registry::getRegistry()->getInstance('node')->announceToUpperNodes($this);
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A ChunkAssembler node-task
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 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 NodeChunkAssemblerTask 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 createNodeChunkAssemblerTask () {
+ // Get new instance
+ $taskInstance = new NodeChunkAssemblerTask();
+
+ // Get a chunk handler instance
+ $handlerInstance = ChunkHandlerFactory::createChunkHandlerInstance();
+
+ // And add it to this task instance
+ $taskInstance->setHandlerInstance($handlerInstance);
+
+ // Return the prepared instance
+ return $taskInstance;
+ }
+
+ /**
+ * Accepts the visitor to process the visit "request"
+ *
+ * @param $visitorInstance An instance of a Visitor class
+ * @return void
+ * @todo Also visit some sub-objects?
+ */
+ public function accept (Visitor $visitorInstance) {
+ // Visit this task
+ $visitorInstance->visitTask($this);
+ }
+
+ /**
+ * Executes the task
+ *
+ * @return void
+ */
+ public function executeTask () {
+ // Are there chunks to handle or a final array to assemble?
+ if ($this->getHandlerInstance()->ifUnassembledChunksAvailable()) {
+ /*
+ * Then do the final steps:
+ *
+ * 1) Sort the final array with ksort(). This will bring the "hash
+ * chunk" up to the last array index and the EOP chunk to the
+ * pre-last array index
+ * 2) Assemble all chunks except two last (see above step)
+ * 3) While so, do the final check on all hashes
+ * 4) If the package is assembled back together, hash it again for
+ * the very final verification.
+ */
+ $this->getHandlerInstance()->assembleChunksFromFinalArray();
+ } elseif ($this->getHandlerInstance()->ifUnhandledChunksWithFinalAvailable()) {
+ /*
+ * Then handle them (not all!). This should push all chunks into a
+ * 'final array' for last verification.
+ */
+ $this->getHandlerInstance()->handleAvailableChunksWithFinal();
+ } elseif ($this->getHandlerInstance()->ifRawPackageDataIsAvailable()) {
+ /*
+ * The final raw package data is back together again. So feed it
+ * into the next stack for further decoding/processing
+ */
+ $this->getHandlerInstance()->handledAssembledRawPackageData();
+ }
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A ??? node-task
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 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 Node???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 createNode???Task () {
+ // Get new instance
+ $taskInstance = new Node???Task();
+
+ // Return the prepared instance
+ return $taskInstance;
+ }
+
+ /**
+ * Accepts the visitor to process the visit "request"
+ *
+ * @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]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A PackageDecoder node-task
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 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 NodePackageDecoderTask 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 createNodePackageDecoderTask () {
+ // Get new instance
+ $taskInstance = new NodePackageDecoderTask();
+
+ // Get a chunk handler instance
+ $handlerInstance = ChunkHandlerFactory::createChunkHandlerInstance();
+
+ // Get the stacker from it, we don't need the handler here
+ $stackerInstance = $handlerInstance->getStackerInstance();
+
+ // Get a decoder instance
+ $decoderInstance = ObjectFactory::createObjectByConfiguredName('package_decoder_class', array($stackerInstance));
+
+ // ... and also set the decoder instance here
+ $taskInstance->setDecoderInstance($decoderInstance);
+
+ // Return the prepared instance
+ return $taskInstance;
+ }
+
+ /**
+ * Accepts the visitor to process the visit "request"
+ *
+ * @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
+ */
+ public function executeTask () {
+ // Check if the stacker has some entries left
+ if ($this->getDecoderInstance()->ifUnhandledRawPackageDataLeft()) {
+ // Then handle it
+ $this->getDecoderInstance()->handleRawPackageData();
+ } elseif ($this->getDecoderInstance()->ifDeocedPackagesLeft()) {
+ // Some decoded packages have arrived (for this peer)
+ $this->getDecoderInstance()->handleDecodedPackage();
+ }
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A DhtQuery node-task
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 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 NodeDhtQueryTask 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 createNodeDhtQueryTask () {
+ // Get new instance
+ $taskInstance = new NodeDhtQueryTask();
+
+ // Return the prepared instance
+ return $taskInstance;
+ }
+
+ /**
+ * Accepts the visitor to process the visit "request"
+ *
+ * @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]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A HubSocketListener task
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 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 NodeSocketListenerTask 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 createNodeSocketListenerTask () {
+ // Get new instance
+ $taskInstance = new NodeSocketListenerTask();
+
+ // Return the prepared instance
+ return $taskInstance;
+ }
+
+ /**
+ * Accepts the visitor to process the visit "request"
+ *
+ * @param $visitorInstance An instance of a Visitor class
+ * @return void
+ */
+ public function accept (Visitor $visitorInstance) {
+ // Get the node instance from registry
+ $nodeInstance = Registry::getRegistry()->getInstance('node');
+
+ // Visit the pool listener task
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('LISTENER-TASK: Going to visit object ' . $nodeInstance->getListenerPoolInstance()->__toString() . ' ...');
+ $nodeInstance->getListenerPoolInstance()->accept($visitorInstance);
+
+ // Visit this task
+ // @TODO Do we need to visit this task? $visitorInstance->visitTask($this);
+ }
+
+ /**
+ * Executes the task
+ *
+ * @return void
+ * @todo 0% done
+ */
+ public function executeTask () {
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A Ping node-task
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 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 NodePingTask extends BaseTask implements Taskable, Visitable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this class
+ *
+ * @param $listInstance A Listable instance
+ * @return $taskInstance An instance of a Taskable/Visitable class
+ */
+ public static final function createNodePingTask (Listable $listInstance) {
+ // Get new instance
+ $taskInstance = new NodePingTask();
+
+ // Se the list instance in this task
+ $taskInstance->setListInstance($listInstance);
+
+ // Init ping iterator instance
+ $iteratorInstance = $listInstance->getListIterator();
+
+ // Set it as well
+ $taskInstance->setIteratorInstance($iteratorInstance);
+
+ // Return the prepared instance
+ return $taskInstance;
+ }
+
+ /**
+ * Accepts the visitor to process the visit "request"
+ *
+ * @param $visitorInstance An instance of a Visitor class
+ * @return void
+ * @todo Also visit some sub-objects?
+ */
+ public function accept (Visitor $visitorInstance) {
+ // Visit this task
+ $visitorInstance->visitTask($this);
+ }
+
+ /**
+ * Executes the task
+ *
+ * @return void
+ * @todo 0% done
+ */
+ public function executeTask () {
+ $this->partialStub('Unimplemented task.');
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A SelfConnect node-task
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 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 NodeSelfConnectTask 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 createNodeSelfConnectTask () {
+ // Get new instance
+ $taskInstance = new NodeSelfConnectTask();
+
+ // Return the prepared instance
+ return $taskInstance;
+ }
+
+ /**
+ * Accepts the visitor to process the visit "request"
+ *
+ * @param $visitorInstance An instance of a Visitor class
+ * @return void
+ * @todo 0%
+ */
+ public function accept (Visitor $visitorInstance) {
+ // Visit this task
+ $visitorInstance->visitTask($this);
+ }
+
+ /**
+ * Executes the task
+ *
+ * @return void
+ */
+ public function executeTask () {
+ // Get the node instance and try it
+ Registry::getRegistry()->getInstance('node')->doSelfConnection($this);
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A UpdateCheck node-task
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 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 NodeUpdateCheckTask 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 createNodeUpdateCheckTask () {
+ // Get new instance
+ $taskInstance = new NodeUpdateCheckTask();
+
+ // Return the prepared instance
+ return $taskInstance;
+ }
+
+ /**
+ * Accepts the visitor to process the visit "request"
+ *
+ * @param $visitorInstance An instance of a Visitor class
+ * @return void
+ * @todo 0%
+ */
+ public function accept (Visitor $visitorInstance) {
+ // Visit this task
+ $visitorInstance->visitTask($this);
+ }
+
+ /**
+ * Executes the task
+ *
+ * @return void
+ */
+ public function executeTask () {
+ $this->partialStub('Unimplemented task.');
+ }
+}
+
+// [EOF]
+?>
### WARNING: THIS FILE IS AUTO-GENERATED BY ./todo-builder.sh ###
### DO NOT EDIT THIS FILE. ###
-./application/hub/config.php:646:// @TODO This and the next value is very static again
-./application/hub/config.php:710:// @TODO This is very static, rewrite it to more flexible
+./application/hub/config.php:655:// @TODO This and the next value is very static again
+./application/hub/config.php:719:// @TODO This is very static, rewrite it to more flexible
./application/hub/interfaces/apt-proxy/class_AptProxy.php:10: * @todo We need to find a better name for this interface
./application/hub/interfaces/chat/class_Chatter.php:10: * @todo We need to find a better name for this interface
./application/hub/interfaces/cruncher/class_CruncherHelper.php:10: * @todo We need to find a better name for this interface
./application/hub/main/filter/task/cruncher/class_CruncherTaskHandlerInitializerFilter.php:55: * @todo 5% done
./application/hub/main/filter/task/node/class_NodeTaskHandlerInitializerFilter.php:55: * @todo Maybe some more tasks needs to be added?
./application/hub/main/handler/answer-status/announcement/class_AnnouncementAnswerOkayHandler.php:58: * @todo Do some more here: Handle karma, et cetera?
-./application/hub/main/handler/message-types/class_BaseMessageHandler.php:66: * @todo Add something more, e.g. spreading information over DHT
+./application/hub/main/handler/answer-status/announcement/class_AnnouncementAnswerOkayHandler.php:59: * @todo Rewrite this to use DHT
+./application/hub/main/handler/answer-status/class_BaseAnserStatusHandler.php:53: * @todo Rewrite this to use DHT
+./application/hub/main/handler/answer-status/requests/class_RequestNodeListAnswerOkayHandler.php:105: * @todo 0% done
+./application/hub/main/handler/answer-status/requests/class_RequestNodeListAnswerOkayHandler.php:117: * @todo 0% done
+./application/hub/main/handler/answer-status/requests/class_RequestNodeListAnswerOkayHandler.php:58: * @todo Do some more here: Handle karma, et cetera?
+./application/hub/main/handler/answer-status/requests/class_RequestNodeListAnswerOkayHandler.php:59: * @todo Rewrite this to use DHT
+./application/hub/main/handler/message-types/class_BaseMessageHandler.php:66: * @todo Rewrite this to use DHT
./application/hub/main/handler/message-types/self-connect/class_NodeMessageSelfConnectHandler.php:71: // @TODO Throw an exception here instead of dying
./application/hub/main/handler/network/class_BaseRawDataHandler.php:146: * @todo This method will be moved to a better place
./application/hub/main/handler/network/udp/class_UdpRawDataHandler.php:58: * @todo 0%
./application/hub/main/nodes/class_BaseHubNode.php:109: * @todo Make this code more generic and move it to CryptoHelper or
./application/hub/main/nodes/class_BaseHubNode.php:458: * @todo Try to make this method more generic so we can move it in BaseFrameworkSystem
./application/hub/main/nodes/class_BaseHubNode.php:498: * @todo Change the first if() block to check for a specific state
-./application/hub/main/nodes/class_BaseHubNode.php:671: // @TODO Add some criteria, e.g. if the node is active or so
-./application/hub/main/nodes/class_BaseHubNode.php:729: * @todo Add checking if this node has been announced to the sender node
-./application/hub/main/nodes/class_BaseHubNode.php:749: * @todo Add checking if this node has been announced to the sender node
-./application/hub/main/nodes/class_BaseHubNode.php:813: * @todo Find more to do here
-./application/hub/main/nodes/class_BaseHubNode.php:826: * @todo Handle thrown exception
+./application/hub/main/nodes/class_BaseHubNode.php:691: * @todo Add checking if this node has been announced to the sender node
+./application/hub/main/nodes/class_BaseHubNode.php:711: * @todo Add checking if this node has been announced to the sender node
+./application/hub/main/nodes/class_BaseHubNode.php:775: * @todo Find more to do here
+./application/hub/main/nodes/class_BaseHubNode.php:788: * @todo Handle thrown exception
./application/hub/main/nodes/list/class_HubListNode.php:58: * @todo Implement more bootstrap steps
./application/hub/main/nodes/list/class_HubListNode.php:68: * @todo Unfinished method
./application/hub/main/nodes/list/class_HubListNode.php:91: // @TODO Add some filters here
./application/hub/main/nodes/regular/class_HubRegularNode.php:58: * @todo Implement this method
./application/hub/main/nodes/regular/class_HubRegularNode.php:68: * @todo Unfinished method
./application/hub/main/nodes/regular/class_HubRegularNode.php:91: // @TODO Add some filters here
-./application/hub/main/package/class_NetworkPackage.php:1083: * @todo Implement verification of all sent tags here?
+./application/hub/main/package/class_NetworkPackage.php:1087: * @todo Implement verification of all sent tags here?
./application/hub/main/package/class_NetworkPackage.php:23: * @todo Needs to add functionality for handling the object's type
-./application/hub/main/package/class_NetworkPackage.php:304: // @TODO crc32() is very weak, but it needs to be fast
-./application/hub/main/package/class_NetworkPackage.php:375: // @TODO crc32() is very weak, but it needs to be fast
-./application/hub/main/package/class_NetworkPackage.php:532: // @TODO We may want to do somthing more here?
-./application/hub/main/package/class_NetworkPackage.php:570: * @todo Unfinished area, signatures are currently NOT fully supported
-./application/hub/main/package/class_NetworkPackage.php:680: // @TODO Add some logging here
-./application/hub/main/package/class_NetworkPackage.php:812: // @TODO Add some logging here
-./application/hub/main/package/class_NetworkPackage.php:963: * @todo This may be enchanced for outgoing packages?
-./application/hub/main/package/class_NetworkPackage.php:994: * @todo Unsupported feature of "signed" messages commented out
+./application/hub/main/package/class_NetworkPackage.php:308: // @TODO crc32() is very weak, but it needs to be fast
+./application/hub/main/package/class_NetworkPackage.php:379: // @TODO crc32() is very weak, but it needs to be fast
+./application/hub/main/package/class_NetworkPackage.php:536: // @TODO We may want to do somthing more here?
+./application/hub/main/package/class_NetworkPackage.php:574: * @todo Unfinished area, signatures are currently NOT fully supported
+./application/hub/main/package/class_NetworkPackage.php:684: // @TODO Add some logging here
+./application/hub/main/package/class_NetworkPackage.php:816: // @TODO Add some logging here
+./application/hub/main/package/class_NetworkPackage.php:967: * @todo This may be enchanced for outgoing packages?
+./application/hub/main/package/class_NetworkPackage.php:998: * @todo Unsupported feature of "signed" messages commented out
./application/hub/main/package/fragmenter/class_PackageFragmenter.php:275: * @todo Implement a way to send non-announcement packages with extra-salt
./application/hub/main/package/fragmenter/class_PackageFragmenter.php:427: * @todo $helperInstance is unused
./application/hub/main/producer/cruncher/keys/class_CruncherKeyProducer.php:106: // @TODO Send the produced key bundle to the unit producer's input queue
./application/hub/main/tasks/cruncher/class_CruncherKeyProducerTask.php:53: * @todo Maybe visit some sub-objects
./application/hub/main/tasks/cruncher/class_CruncherTestUnitProducerTask.php:53: * @todo Maybe visit some sub-objects
./application/hub/main/tasks/cruncher/class_CruncherWorkUnitFetcherTask.php:54: * @todo Maybe visit some sub-objects
-./application/hub/main/tasks/hub/announcement/class_HubSelfAnnouncementTask.php:53: * @todo 0%
-./application/hub/main/tasks/hub/chunks/class_HubChunkAssemblerTask.php:59: * @todo Also visit some sub-objects?
-./application/hub/main/tasks/hub/class_HubSelfConnectTask.php:53: * @todo 0%
-./application/hub/main/tasks/hub/class_HubSocketListenerTask.php:63: // @TODO Do we need to visit this task? $visitorInstance->visitTask($this);
-./application/hub/main/tasks/hub/class_HubSocketListenerTask.php:70: * @todo 0% done
-./application/hub/main/tasks/hub/decoder/class_HubPackageDecoderTask.php:65: * @todo Maybe visit some sub-objects
-./application/hub/main/tasks/hub/ping/class_HubPingTask.php:63: * @todo Also visit some sub-objects?
-./application/hub/main/tasks/hub/ping/class_HubPingTask.php:74: * @todo 0% done
-./application/hub/main/tasks/hub/update/class_HubUpdateCheckTask.php:53: * @todo 0%
./application/hub/main/tasks/network/class_NetworkPackageReaderTask.php:63: * @todo Also visit some sub-objects?
./application/hub/main/tasks/network/class_NetworkPackageWriterTask.php:59: * @todo Also visit some sub-objects?
+./application/hub/main/tasks/node/announcement/class_NodeAnnouncementTask.php:53: * @todo 0%
+./application/hub/main/tasks/node/chunks/class_NodeChunkAssemblerTask.php:59: * @todo Also visit some sub-objects?
+./application/hub/main/tasks/node/decoder/class_NodePackageDecoderTask.php:65: * @todo Maybe visit some sub-objects
+./application/hub/main/tasks/node/dht/class_NodeDhtQueryTask.php:53: * @todo Maybe visit some sub-objects
+./application/hub/main/tasks/node/dht/class_NodeDhtQueryTask.php:64: * @todo 0%
+./application/hub/main/tasks/node/listener/class_NodeSocketListenerTask.php:63: // @TODO Do we need to visit this task? $visitorInstance->visitTask($this);
+./application/hub/main/tasks/node/listener/class_NodeSocketListenerTask.php:70: * @todo 0% done
+./application/hub/main/tasks/node/ping/class_NodePingTask.php:63: * @todo Also visit some sub-objects?
+./application/hub/main/tasks/node/ping/class_NodePingTask.php:74: * @todo 0% done
+./application/hub/main/tasks/node/self_connect/class_NodeSelfConnectTask.php:53: * @todo 0%
+./application/hub/main/tasks/node/update/class_NodeUpdateCheckTask.php:53: * @todo 0%
./application/hub/main/template/announcement/class_XmlAnnouncementTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType()
./application/hub/main/template/answer/announcement/class_XmlAnnouncementAnswerTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType()
-./application/hub/main/template/answer/announcement/class_XmlAnnouncementAnswerTemplateEngine.php:95: * @todo Find something useful with this!
+./application/hub/main/template/answer/announcement/class_XmlAnnouncementAnswerTemplateEngine.php:94: * @todo Find something useful with this!
+./application/hub/main/template/answer/class_BaseXmlAnswerTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType()
./application/hub/main/template/answer/requests/class_XmlRequestNodeListAnswerTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType()
-./application/hub/main/template/answer/requests/class_XmlRequestNodeListAnswerTemplateEngine.php:78: * @todo Find something useful with this!
+./application/hub/main/template/answer/requests/class_XmlRequestNodeListAnswerTemplateEngine.php:82: * @todo Find something useful with this!
./application/hub/main/template/class_BaseXmlTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType()
./application/hub/main/template/connect/class_XmlSelfConnectTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType()
./application/hub/main/template/connect/class_XmlSelfConnectTemplateEngine.php:77: * @todo Find something useful with this!
./application/hub/main/template/producer/test_units/class_XmlCruncherTestUnitTemplateEngine.php:270: * @todo Handle $keyCount
./application/hub/main/template/requests/class_XmlRequestNodeListTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType()
./application/hub/main/template/requests/class_XmlRequestNodeListTemplateEngine.php:74: * @todo Find something useful with this!
-./application/hub/main/tools/class_HubTools.php:167: // @TODO Please try to encapsulate this PHP call into an own class
+./application/hub/main/tools/class_HubTools.php:119: * @todo Rewrite this to use DHT
+./application/hub/main/tools/class_HubTools.php:169: // @TODO Please try to encapsulate this PHP call into an own class
+./application/hub/main/tools/class_HubTools.php:88: * @todo Rewrite this to use DHT
./application/hub/main/visitor/tasks/class_ActiveTaskVisitor.php:105: * @todo Does a query needs to perform some actions as an active task?
./application/hub/main/visitor/tasks/class_ActiveTaskVisitor.php:116: * @todo Does a queue needs to perform some actions as an active task?
./application/hub/main/visitor/tasks/class_ShutdownTaskVisitor.php:100: * @todo Does a query needs to perform some actions as an active task?
./inc/classes/main/user/class_BaseUser.php:308: * @todo Try to make this method more generic so we can move it in BaseFrameworkSystem
./inc/classes/main/user/class_BaseUser.php:80: * @todo Find a way of casting here. "(int)" might destroy the user id > 32766
./inc/classes/main/user/member/class_Member.php:84: * @todo Add more ways over creating user classes
+./inc/classes/middleware/compressor/class_CompressorChannel.php:100: // @TODO Is there a configurable fall-back compressor needed, or is NullCompressor okay?
./inc/classes/middleware/debug/class_DebugMiddleware.php:113: // @TODO Initialization phase
./inc/classes/middleware/io/class_FileIoHandler.php:133: // @TODO What is this for?
./inc/classes.php:10: * @todo Minimize these includes
./application/hub/exceptions/hub/class_HubAlreadyAnnouncedException.php:2:// @DEPRECATED
./application/hub/interfaces/dht/class_Dht.php:2:// @DEPRECATED
./application/hub/interfaces/nodes/class_NodeHelper.php:2:// @DEPRECATED
+./application/hub/main/database/wrapper/node/class_NodeListDatabaseWrapper.php:2:// @DEPRECATED
+./application/hub/main/filter/bootstrap/node/class_NodeBootstrapRestoreNodeListFilter.php:2:// @DEPRECATED
./application/hub/main/handler/message-types/class_NodeMessageAnnouncementHandler.php:2:// @DEPRECATED
./application/hub/main/helper/hub/announcement/class_HubDescriptorHelper.php:2:// @DEPRECATED
./application/hub/main/nodes/class_BaseHubNode.php:56: * @deprecated
+./application/hub/main/tasks/hub/announcement/class_HubSelfAnnouncementTask.php:2:// @DEPRECATED
+./application/hub/main/tasks/hub/chunks/class_HubChunkAssemblerTask.php:2:// @DEPRECATED
+./application/hub/main/tasks/hub/class_HubSelfConnectTask.php:2:// @DEPRECATED
+./application/hub/main/tasks/hub/class_HubSocketListenerTask.php:2:// @DEPRECATED
+./application/hub/main/tasks/hub/decoder/class_HubPackageDecoderTask.php:2:// @DEPRECATED
+./application/hub/main/tasks/hub/ping/class_HubPingTask.php:2:// @DEPRECATED
+./application/hub/main/tasks/hub/update/class_HubUpdateCheckTask.php:2:// @DEPRECATED
./inc/classes/exceptions/main/class_MissingMethodException.php:14: * @deprecated Please do no longer use this exception
./inc/classes/interfaces/database/backend/class_DatabaseFrontendInterface.php:2:// @DEPRECATED
./inc/classes/interfaces/database/frontend/class_DatabaseFrontendInterface.php:2:// @DEPRECATED