application/hub/interfaces/visitor/class_Visitor.php -text
application/hub/interfaces/visitor/connector/.htaccess -text
application/hub/interfaces/visitor/connector/class_QueryConnectorVisitor.php -text
+application/hub/interfaces/visitor/decorator/.htaccess -text
+application/hub/interfaces/visitor/decorator/class_DecoratorVisitor.php -text
+application/hub/interfaces/visitor/listener/.htaccess -text
+application/hub/interfaces/visitor/listener/class_ListenerVisitor.php -text
application/hub/interfaces/visitor/pool/.htaccess -text
application/hub/interfaces/visitor/pool/class_PoolVisitor.php -text
application/hub/interfaces/visitor/pool/listener/.htaccess -text
application/hub/main/database/wrapper/.htaccess -text
application/hub/main/database/wrapper/class_NodeInformationDatabaseWrapper.php -text
application/hub/main/database/wrapper/class_NodeListDatabaseWrapper.php -text
+application/hub/main/decorators/.htaccess -text
+application/hub/main/decorators/class_BaseDecorator.php -text
application/hub/main/filter/.htaccess -text
application/hub/main/filter/activation/.htaccess -text
application/hub/main/filter/activation/class_HubActivation -text
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * An interface for the visitor implementation for decorators
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 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/>.
+ */
+interface DecoratorVisitor extends Visitor {
+ /**
+ * Visits the given decorator instance
+ *
+ * @param $decoratorInstance A decorator instance
+ * @return void
+ */
+ function visitDecorator (BaseDecorator $decoratorInstance);
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * An interface for the visitor implementation for listeners
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 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/>.
+ */
+interface ListenerVisitor extends Visitor {
+ /**
+ * Visits the given listener instance
+ *
+ * @param $listenerInstance A Listenable instance
+ * @return void
+ */
+ function visitListener (Listenable $listenerInstance);
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A general Decorator
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 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 BaseDecorator extends BaseHubSystem {
+ /**
+ * Protected constructor
+ *
+ * @param $className Name of the class
+ * @return void
+ */
+ protected function __construct ($className) {
+ // Call parent constructor
+ parent::__construct($className);
+ }
+}
+
+// [EOF]
+?>
$updateTask = true;
// Debug message
- $this->debugOutput('TASK-HANDLER: Task ' . $currentTask['id'] . ' started with startup_delay=' . $currentTask['task_startup_delay']);
+ $this->debugOutput('TASK-HANDLER: Task ' . $currentTask['id'] . ' started with startup_delay=' . $currentTask['task_startup_delay'] . 'ms');
} // END - if
// Get time difference from interval delay
* 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 BaseListenerDecorator extends BaseHubSystem implements Visitable {
+class BaseListenerDecorator extends BaseDecorator implements Visitable {
/**
* Protected constructor
*
* @return void
*/
public function accept (Visitor $visitorInstance) {
- // Debug message
- //* DEBUG: */ $this->debugOutput('DECO-LISTENER: ' . $visitorInstance->__toString() . ' has visited - START');
-
// Visit this decorator
$visitorInstance->visitDecorator($this);
// Visit the covered class
$visitorInstance->visitListener($this);
-
- // Debug message
- //* DEBUG: */ $this->debugOutput('DECO-LISTENER: ' . $visitorInstance->__toString() . ' has visited - FINISHED');
}
}
* @return void
*/
public function doListen() {
- // Look for generic packages first
+ // Handle generic UDP packages first
$this->getListenerInstance()->doListen();
// Handle this client UDP package
* @return void
*/
public function doListen() {
- // Handle generic package first
+ // Handle generic UDP package first
$this->getListenerInstance()->doListen();
// Handle hub UDP package
* 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 ActiveTaskVisitor extends BaseVisitor implements TaskVisitor, QueryConnectorVisitor, PoolVisitor {
+class ActiveTaskVisitor extends BaseVisitor implements TaskVisitor, QueryConnectorVisitor, PoolVisitor, ListenerVisitor, DecoratorVisitor {
/**
* Protected constructor
*
}
/**
- * Visits the given pool instance
+ * Visits the given task instance
*
- * @param $poolInstance A Taskable instance
+ * @param $taskInstance A Taskable instance
* @return void
*/
public function visitTask (Taskable $taskInstance) {
public function visitQuery (Queryable $queryInstance) {
// Empty for now...
}
+
+ /**
+ * Visits the given listener instance
+ *
+ * @param $listenerInstance A Listenable instance
+ * @return void
+ */
+ public function visitListener (Listenable $listenerInstance) {
+ // Do "listen" here
+ $listenerInstance->doListen();
+ }
+
+ /**
+ * Visits the given decorator instance
+ *
+ * @param $decoratorInstance A decorator instance
+ * @return void
+ */
+ public function visitDecorator (BaseDecorator $decoratorInstance) {
+ // A decorator itself can never bevome an active task so this method
+ // remains empty.
+ }
}
// [EOF]
NEWS / ChangeLog
================
+[2009-08-19]
+------------
+- These news are not in correct timeline!
+- Task handling added, first idle loop task added
+- Listeners are now visiited by ActiveTaskVisitor
+- Task added for self-tests, if the ports are reachable from public IP
+
[2009-08-03]
------------
- More debugging (and grep-able) output added
OpenOffice:
http://www.openoffice.org
+
+Might Commander:
+http://www.gnu.org/software/mc/
### WARNING: THIS FILE IS AUTO-GENERATED BY ./todo-builder.sh ###
### DO NOT EDIT THIS FILE. ###
./application/hub/interfaces/nodes/class_NodeHelper.php:10: * @todo We need to find a better name for this interface
-./application/hub/main/commands/console/class_HubConsoleMainCommand.php:108: * @todo Should we add some more filters?
-./application/hub/main/commands/console/class_HubConsoleMainCommand.php:91: // @TODO We may have to catch some exceptions here
+./application/hub/main/commands/console/class_HubConsoleMainCommand.php:104: * @todo Should we add some more filters?
+./application/hub/main/connectors/query/local/class_LocalQueryConnector.php:10: * @todo Find an interface for: handleAllQueries()
./application/hub/main/filter/node/class_NodeInitializationFilter.php:54: * @todo 0% done
./application/hub/main/filter/node/class_NodeInitializationFilter.php:87: // @TODO Can we rewrite this to app_die() ?
./application/hub/main/filter/shutdown/class_HubShutdownDeinitQueuesFilter.php:55: * @todo 0% done
./application/hub/main/filter/task/class_TaskHandlerInitializerFilter.php:55: * @todo 0% done
./application/hub/main/handler/network/tcp/class_TcpNetworkPackageHandler.php:61: * @todo 0%
./application/hub/main/handler/network/udp/class_UdpNetworkPackageHandler.php:55: * @todo 0%
+./application/hub/main/handler/tasks/class_TaskHandler.php:140: // @TODO Messurement can be added around this call
./application/hub/main/iterator/network/class_NetworkListenIterator.php:10: * @todo This current implementation is not recommended, use a
./application/hub/main/iterator/network/class_NetworkListenIterator.php:11: * @todo latency-based iteration or similar approaches
./application/hub/main/iterator/pool/handler/class_HandlerPoolIterator.php:10: * @todo This current implementation is not recommended, use a
./application/hub/main/iterator/pool/handler/class_HandlerPoolIterator.php:11: * @todo latency-based iteration or similar approaches
+./application/hub/main/iterator/pool/tasks/class_TaskPoolIterator.php:10: * @todo This current implementation is not recommended, use a
+./application/hub/main/iterator/pool/tasks/class_TaskPoolIterator.php:11: * @todo latency-based iteration or similar approaches
./application/hub/main/listener/tcp/class_TcpListener.php:160: * @todo 0% done
./application/hub/main/listener/udp/class_UdpListener.php:61: * @todo stream_socket_server() was declared slow by some user comments.
./application/hub/main/listener/udp/class_UdpListener.php:62: * @todo Please rewrite it to socket_create() and its brothers.
./application/hub/main/listener/udp/class_UdpListener.php:85: * @todo 0% done
-./application/hub/main/lists/class_BaseList.php:233: // @TODO Extend this somehow?
+./application/hub/main/lists/class_BaseList.php:236: // @TODO Extend this somehow?
./application/hub/main/nodes/boot/class_HubBootNode.php:113: * @todo 0%
./application/hub/main/nodes/boot/class_HubBootNode.php:58: * @todo add some more special bootstrap things for this boot node
./application/hub/main/nodes/boot/class_HubBootNode.php:99: * @todo Unfinished method
./application/hub/main/nodes/regular/class_HubRegularNode.php:68: * @todo Unfinished method
./application/hub/main/nodes/regular/class_HubRegularNode.php:82: * @todo 0%
./application/hub/main/resolver/state/network/class_NetworkStateResolver.php:69: * @todo 0%
-./application/hub/main/visitor/pool/handler/class_HandlerListenerPoolVisitor.php:56: * @todo Find some use of doListen() method in listener pool classes
-./application/hub/main/visitor/pool/handler/class_HandlerListenerPoolVisitor.php:69: * @todo Find some use of doListen() method in listener decorator classes
+./application/hub/main/tasks/hub/class_HubSelfConnectTask.php:53: * @todo 0%
+./application/hub/main/visitor/tasks/class_ActiveTaskVisitor.php:90: * @todo Does a query needs to perform some actions as an active task?
./inc/classes/exceptions/io/class_FileNotFoundException.php:10: * @todo Rename this class to FileIoException
./inc/classes/exceptions/main/class_ClassNotFoundException.php:10: * @todo Rename this class to NoClassException
./inc/classes/exceptions/main/class_ConfigEntryNotFoundException.php:10: * @todo Rename this class to NoFoundEntryException
./inc/classes/exceptions/main/class_MissingMethodException.php:13: * @todo Try to rewrite user/guest login classes and mark this exception as deprecated
./inc/classes/interfaces/class_FrameworkInterface.php:11: * @todo Find a better name for this interface
-./inc/classes/main/class_BaseFrameworkSystem.php:1040: * @todo Write a logging mechanism for productive mode
-./inc/classes/main/class_BaseFrameworkSystem.php:104: // @todo Try to clean these constants up
-./inc/classes/main/class_BaseFrameworkSystem.php:1054: // @TODO Finish this part!
-./inc/classes/main/class_BaseFrameworkSystem.php:185: * @todo This is old code. Do we still need this old lost code?
-./inc/classes/main/class_BaseFrameworkSystem.php:253: * @todo SearchableResult and UpdateableResult shall have a super interface to use here
+./inc/classes/main/class_BaseFrameworkSystem.php:1045: * @todo Write a logging mechanism for productive mode
+./inc/classes/main/class_BaseFrameworkSystem.php:1059: // @TODO Finish this part!
+./inc/classes/main/class_BaseFrameworkSystem.php:109: // @todo Try to clean these constants up
+./inc/classes/main/class_BaseFrameworkSystem.php:190: * @todo This is old code. Do we still need this old lost code?
+./inc/classes/main/class_BaseFrameworkSystem.php:258: * @todo SearchableResult and UpdateableResult shall have a super interface to use here
./inc/classes/main/commands/web/class_WebLoginAreaCommand.php:64: * @todo Add some stuff here: Some personal data, app/game related data
./inc/classes/main/console/class_ConsoleTools.php:41: * @todo We should connect this to a caching class to cache DNS requests
./inc/classes/main/console/class_ConsoleTools.php:54: // @TODO Here should the cacher be implemented