From 1212b8422d9040c36c355c2c81c689dda7fd79ad Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 5 Mar 2011 14:28:14 +0000 Subject: [PATCH] Copyright notice updated, our first hub application introduced (which is incomplete) - First application 'test cruncher' for the hub (better say a cloud) introduced. This test cruncher shall try to find the right key for an encrypted message. It handles all "crunched" keys over work units like dnetc (see http://www.distributed.net for instance) does but instead of a central server it uses the "hub" as a cloud to store settings and work units in. This is, of course, not yet done. More on the wiki: http://wiki.ship-simu.org - Copyright updated - TODOs.txt updated --- .gitattributes | 18 +++ application/hub/class_ApplicationHelper.php | 10 +- application/hub/config.php | 33 ++++- application/hub/data.php | 2 +- application/hub/debug.php | 2 +- application/hub/exceptions.php | 2 +- .../class_HubAlreadyAnnouncedException.php | 2 +- .../ids/class_InvalidSessionIdException.php | 2 +- .../lists/class_InvalidListHashException.php | 2 +- .../class_ListGroupAlreadyAddedException.php | 2 +- .../lists/class_NoListGroupException.php | 2 +- .../class_PeerAlreadyRegisteredException.php | 2 +- .../class_NoValidHostnameException.php | 2 +- .../state/class_InvalidStateException.php | 2 +- .../tags/class_InvalidTagException.php | 2 +- .../tasks/class_InvalidTaskException.php | 2 +- application/hub/init.php | 2 +- .../connectors/class_Connectable.php | 2 +- application/hub/interfaces/cruncher/.htaccess | 1 + .../cruncher/class_CruncherHelper.php | 52 +++++++ .../discovery/class_DiscoverableRecipient.php | 2 +- .../discovery/class_DiscoverableSocket.php | 2 +- .../interfaces/handler/class_Handleable.php | 2 +- .../handler/network/class_Networkable.php | 2 +- .../handler/task/class_HandleableTask.php | 2 +- .../helper/hub/class_HelpableHub.php | 2 +- .../interfaces/listener/class_Listenable.php | 2 +- .../hub/interfaces/lists/class_Listable.php | 2 +- .../interfaces/lookup/class_Lookupable.php | 2 +- .../peer_states/class_LookupablePeerState.php | 2 +- .../hub/interfaces/nodes/class_NodeHelper.php | 9 +- .../interfaces/package/class_Deliverable.php | 2 +- .../package/fragmenter/class_Fragmentable.php | 21 ++- .../hub/interfaces/pool/class_Poolable.php | 2 +- .../pool/listener/class_PoolableListener.php | 2 +- .../pool/peer/class_PoolablePeer.php | 2 +- .../protocol/class_ProtocolHandler.php | 2 +- .../hub/interfaces/query/class_Queryable.php | 2 +- .../hub/interfaces/queues/class_Queueable.php | 2 +- .../hub/interfaces/socket/class_SocketTag.php | 2 +- application/hub/interfaces/states/class_ | 2 +- .../hub/interfaces/states/class_Stateable.php | 2 +- .../states/client/class_ClientStateable.php | 2 +- .../states/hub/class_HubStateable.php | 2 +- .../states/peer/class_PeerStateable.php | 2 +- .../hub/interfaces/tags/class_Tagable.php | 2 +- .../hub/interfaces/tasks/class_Taskable.php | 2 +- .../interfaces/visitor/class_Visitable.php | 2 +- .../hub/interfaces/visitor/class_Visitor.php | 2 +- .../connector/class_QueryConnectorVisitor.php | 2 +- .../connector/class_QueueConnectorVisitor.php | 2 +- .../decorator/class_DecoratorVisitor.php | 2 +- .../listener/class_ListenerVisitor.php | 2 +- .../visitor/pool/class_PoolVisitor.php | 2 +- .../listener/class_ListenerPoolVisitor.php | 2 +- .../visitor/query/class_QueryVisitor.php | 2 +- .../visitor/queue/class_QueueVisitor.php | 2 +- .../visitor/tasks/class_TaskVisitor.php | 2 +- application/hub/loader.php | 2 +- application/hub/main/class_ | 2 +- application/hub/main/class_Base | 2 +- application/hub/main/class_BaseHubSystem.php | 2 +- .../class_HubConsoleCruncherCommand.php | 118 ++++++++++++++++ .../console/class_HubConsoleMainCommand.php | 4 +- ...lass_NetworkPackageCompressorDecorator.php | 2 +- .../main/connectors/class_BaseConnector.php | 2 +- application/hub/main/connectors/query/class_ | 2 +- .../query/class_BaseQueryConnector.php | 2 +- .../query/local/class_LocalQueryConnector.php | 2 +- application/hub/main/connectors/queues/class_ | 2 +- .../queues/class_BaseQueueConnector.php | 2 +- .../local/class_LocalQueueConnector.php | 2 +- .../class_HubConsoleCruncherController.php | 132 ++++++++++++++++++ .../class_HubConsoleDefaultNewsController.php | 2 +- application/hub/main/cruncher/.htaccess | 1 + application/hub/main/cruncher/class_ | 87 ++++++++++++ .../main/cruncher/class_BaseHubCruncher.php | 53 +++++++ application/hub/main/cruncher/test/.htaccess | 1 + .../cruncher/test/class_HubTestCruncher.php | 87 ++++++++++++ .../class_NodeInformationDatabaseWrapper.php | 2 +- .../wrapper/class_NodeListDatabaseWrapper.php | 2 +- .../class_PeerStateLookupDatabaseWrapper.php | 2 +- .../main/decorators/class_BaseDecorator.php | 2 +- .../main/discovery/class_BaseHubDiscovery.php | 2 +- .../class_PackageRecipientDiscovery.php | 2 +- .../socket/class_PackageSocketDiscovery.php | 2 +- .../class_PackageDiscoveryFactory.php | 2 +- .../class_SocketDiscoveryFactory.php | 2 +- .../lists/class_RecipientListFactory.php | 2 +- .../package/class_NetworkPackageFactory.php | 2 +- .../factories/socket/class_SocketFactory.php | 2 +- .../factories/states/class_StateFactory.php | 2 +- .../states/peer/class_PeerStateFactory.php | 2 +- .../tags/class_PackageTagsFactory.php | 2 +- .../filter/activation/class_HubActivation | 2 +- ...ss_HubActivationSelfAnnouncementFilter.php | 2 +- .../main/filter/bootstrap/class_HubBootstrap | 2 +- ...s_HubBootstrapExtraBootstrappingFilter.php | 2 +- .../class_HubBootstrapGenerateHubIdFilter.php | 2 +- ...ss_HubBootstrapGenerateSessionIdFilter.php | 2 +- .../class_HubBootstrapInitQueuesFilter.php | 2 +- .../class_HubBootstrapListenerPoolFilter.php | 2 +- ...lass_HubBootstrapRestoreNodeListFilter.php | 2 +- application/hub/main/filter/class_ | 2 +- .../hub/main/filter/console/class_Console | 66 +-------- .../class_ConsoleWelcomeTeaserFilter.php | 65 +-------- .../hub/main/filter/cruncher/.htaccess | 1 + .../hub/main/filter/cruncher/class_Cruncher | 63 +++++++++ .../class_CruncherInitializationFilter.php | 97 +++++++++++++ .../class_CruncherPhpRequirementsFilter.php | 78 +++++++++++ .../class_CruncherWelcomeTeaserFilter.php | 67 +++++++++ application/hub/main/filter/node/class_Node | 2 +- .../node/class_NodeInitializationFilter.php | 4 +- .../node/class_NodePhpRequirementsFilter.php | 2 +- .../node/class_NodeWelcomeTeaserFilter.php | 67 +++++++++ .../hub/main/filter/shutdown/.htaccess | 1 - .../main/filter/shutdown/class_HubShutdown | 2 +- .../class_HubShutdownCruncherFilter.php | 68 +++++++++ .../class_HubShutdownDeinitQueuesFilter.php | 2 +- .../class_HubShutdownFlushNodeListFilter.php | 2 +- .../shutdown/class_HubShutdownNodeFilter.php | 2 +- .../class_HubShutdownTaskHandlerFilter.php | 2 +- ...s_CruncherTaskHandlerInitializerFilter.php | 70 ++++++++++ .../class_HubTaskHandlerInitializerFilter.php | 112 +++++++++++++++ .../class_TaskHandlerInitializerFilter.php | 111 +-------------- application/hub/main/handler/class_ | 2 +- .../hub/main/handler/class_BaseHandler.php | 2 +- application/hub/main/handler/network/class_ | 2 +- .../class_BaseNetworkPackageHandler.php | 2 +- .../hub/main/handler/network/tcp/class_ | 2 +- .../tcp/class_TcpNetworkPackageHandler.php | 2 +- .../udp/class_UdpNetworkPackageHandler.php | 2 +- .../main/handler/tasks/class_TaskHandler.php | 2 +- .../connection/class_BaseConnectionHelper.php | 25 +++- .../tcp/class_TcpConnectionHelper.php | 2 +- .../udp/class_UdpConnectionHelper.php | 2 +- .../class_HubDescriptorHelper.php | 2 +- application/hub/main/helper/hub/class_ | 2 +- .../main/helper/hub/class_BaseHubHelper.php | 2 +- .../connection/class_HubSelfConnectHelper.php | 2 +- application/hub/main/iterator/class_ | 2 +- .../hub/main/iterator/class_BaseIterator.php | 2 +- .../iterator/hub/class_HubPingIterator.php | 2 +- .../network/class_NetworkListenIterator.php | 2 +- .../iterator/pool/class_DefaultIterator.php | 2 +- .../main/iterator/pool/handler/class_Handler | 2 +- .../handler/class_HandlerPoolIterator.php | 2 +- .../iterator/pool/shutdown/class_Shutdown | 2 +- .../shutdown/class_ShutdownPoolIterator.php | 2 +- .../pool/tasks/class_TaskPoolIterator.php | 2 +- application/hub/main/listener/class_ | 2 +- .../hub/main/listener/class_BaseListener.php | 2 +- .../listener/class_BaseListenerDecorator.php | 2 +- application/hub/main/listener/tcp/class_ | 2 +- .../main/listener/tcp/class_TcpListener.php | 2 +- .../class_HubTcpListenerDecorator.php | 2 +- .../class_PeerTcpListenerDecorator.php | 2 +- application/hub/main/listener/udp/class_ | 2 +- .../main/listener/udp/class_UdpListener.php | 2 +- .../class_HubUdpListenerDecorator.php | 2 +- .../class_PeerUdpListenerDecorator.php | 2 +- application/hub/main/lists/class_ | 2 +- application/hub/main/lists/class_BaseList.php | 2 +- .../main/lists/groups/class_ListGroupList.php | 2 +- .../hub/main/lists/hub/class_HubList.php | 2 +- .../main/lists/pool/class_PoolEntriesList.php | 2 +- .../query/local/class_LocalQueryList.php | 2 +- .../lists/recipient/class_RecipientList.php | 2 +- .../hub/main/lists/tasks/class_TaskList.php | 2 +- application/hub/main/lookup/class_ | 2 +- .../hub/main/lookup/class_BaseLookupTable.php | 2 +- .../peer/class_PeerStateLookupTable.php | 2 +- .../hub/main/nodes/boot/class_HubBootNode.php | 4 +- application/hub/main/nodes/class_ | 4 +- .../hub/main/nodes/class_BaseHubNode.php | 4 +- .../hub/main/nodes/list/class_HubListNode.php | 4 +- .../main/nodes/master/class_HubMasterNode.php | 4 +- .../nodes/regular/class_HubRegularNode.php | 4 +- .../hub/main/package/class_NetworkPackage.php | 2 +- .../fragmenter/class_PackageFragmenter.php | 24 +++- application/hub/main/pools/class_ | 2 +- application/hub/main/pools/class_BasePool.php | 2 +- .../listener/class_DefaultListenerPool.php | 2 +- .../main/pools/peer/class_DefaultPeerPool.php | 2 +- application/hub/main/queries/class_ | 2 +- .../hub/main/queries/class_BaseQuery.php | 2 +- .../main/queries/local/class_LocalQuery.php | 2 +- application/hub/main/queues/class_ | 2 +- .../hub/main/queues/class_BaseQueue.php | 2 +- .../main/queues/peer/class_LocalPeerQueue.php | 2 +- .../objects/class_ObjectTypeRegistry.php | 2 +- .../registry/socket/class_SocketRegistry.php | 2 +- .../class_HubConsoleCommandResolver.php | 11 +- .../class_HubConsoleControllerResolver.php | 16 +-- .../state/class_BaseStateResolver.php | 2 +- .../network/class_NetworkStateResolver.php | 2 +- application/hub/main/states/class_ | 2 +- .../hub/main/states/class_BaseState.php | 2 +- .../main/states/hub/class_BaseHubState.php | 2 +- .../node/active/class_NodeActiveState.php | 2 +- .../announced/class_NodeAnnouncedState.php | 2 +- application/hub/main/states/node/class_ | 2 +- .../main/states/node/class_BaseNodeState.php | 2 +- .../states/node/init/class_NodeInitState.php | 2 +- .../node/virgin/class_NodeVirginState.php | 2 +- application/hub/main/states/peer/class_ | 2 +- .../main/states/peer/class_BasePeerState.php | 2 +- .../peer/new/class_NewConnectionPeerState.php | 2 +- application/hub/main/tags/class_ | 2 +- application/hub/main/tags/class_BaseTags.php | 2 +- .../main/tags/package/class_PackageTags.php | 2 +- application/hub/main/tasks/class_ | 2 +- application/hub/main/tasks/class_BaseTask.php | 2 +- .../class_HubSelfAnnouncementTask.php | 2 +- .../tasks/hub/class_HubSelfConnectTask.php | 2 +- .../main/tasks/hub/ping/class_HubPingTask.php | 2 +- .../hub/update/class_HubUpdateCheckTask.php | 2 +- .../main/tasks/idle/class_IdleLoopTask.php | 2 +- .../class_NetworkPackageWriterTask.php | 2 +- .../class_AnnouncementTemplateEngine.php | 2 +- .../class_SelfConnectTemplateEngine.php | 2 +- .../class_ObjectRegistryTemplateEngine.php | 2 +- application/hub/main/tools/class_HubTools.php | 2 +- application/hub/main/visitor/class_ | 2 +- .../hub/main/visitor/class_BaseVisitor.php | 2 +- application/hub/main/visitor/pool/class_ | 2 +- .../main/visitor/pool/handler/class_Handler | 2 +- .../main/visitor/pool/shutdown/class_Shutdown | 2 +- .../class_ShutdownListenerPoolVisitor.php | 2 +- .../socket/class_ShutdownSocketVisitor.php | 2 +- .../visitor/tasks/class_ActiveTaskVisitor.php | 2 +- .../tasks/class_ShutdownTaskVisitor.php | 2 +- application/hub/starter.php | 2 +- .../xml/object_registry/object_registry.xml | 16 +-- docs/TODOs.txt | 36 +++-- index.php | 2 +- 236 files changed, 1528 insertions(+), 511 deletions(-) create mode 100644 application/hub/interfaces/cruncher/.htaccess create mode 100644 application/hub/interfaces/cruncher/class_CruncherHelper.php create mode 100644 application/hub/main/commands/console/class_HubConsoleCruncherCommand.php create mode 100644 application/hub/main/controller/console/class_HubConsoleCruncherController.php create mode 100644 application/hub/main/cruncher/.htaccess create mode 100644 application/hub/main/cruncher/class_ create mode 100644 application/hub/main/cruncher/class_BaseHubCruncher.php create mode 100644 application/hub/main/cruncher/test/.htaccess create mode 100644 application/hub/main/cruncher/test/class_HubTestCruncher.php create mode 100644 application/hub/main/filter/cruncher/.htaccess create mode 100644 application/hub/main/filter/cruncher/class_Cruncher create mode 100644 application/hub/main/filter/cruncher/class_CruncherInitializationFilter.php create mode 100644 application/hub/main/filter/cruncher/class_CruncherPhpRequirementsFilter.php create mode 100644 application/hub/main/filter/cruncher/class_CruncherWelcomeTeaserFilter.php create mode 100644 application/hub/main/filter/node/class_NodeWelcomeTeaserFilter.php create mode 100644 application/hub/main/filter/shutdown/class_HubShutdownCruncherFilter.php create mode 100644 application/hub/main/filter/task/class_CruncherTaskHandlerInitializerFilter.php create mode 100644 application/hub/main/filter/task/class_HubTaskHandlerInitializerFilter.php diff --git a/.gitattributes b/.gitattributes index 076f1835d..bba3e9157 100644 --- a/.gitattributes +++ b/.gitattributes @@ -30,6 +30,8 @@ application/hub/init.php -text svneol=unset#text/plain application/hub/interfaces/.htaccess -text svneol=unset#text/plain application/hub/interfaces/connectors/.htaccess -text svneol=unset#text/plain application/hub/interfaces/connectors/class_Connectable.php -text svneol=unset#text/plain +application/hub/interfaces/cruncher/.htaccess svneol=native#text/plain +application/hub/interfaces/cruncher/class_CruncherHelper.php svneol=native#text/plain application/hub/interfaces/discovery/.htaccess -text svneol=unset#text/plain application/hub/interfaces/discovery/class_DiscoverableRecipient.php svneol=native#text/plain application/hub/interfaces/discovery/class_DiscoverableSocket.php svneol=native#text/plain @@ -112,6 +114,7 @@ application/hub/main/class_Base -text application/hub/main/class_BaseHubSystem.php -text svneol=unset#text/plain application/hub/main/commands/.htaccess -text svneol=unset#text/plain application/hub/main/commands/console/.htaccess -text svneol=unset#text/plain +application/hub/main/commands/console/class_HubConsoleCruncherCommand.php svneol=native#text/plain application/hub/main/commands/console/class_HubConsoleMainCommand.php -text svneol=unset#text/plain application/hub/main/compressor/.htaccess -text svneol=unset#text/plain application/hub/main/compressor/decorator/.htaccess -text svneol=unset#text/plain @@ -130,7 +133,13 @@ application/hub/main/connectors/queues/local/.htaccess -text svneol=unset#text/p application/hub/main/connectors/queues/local/class_LocalQueueConnector.php -text svneol=unset#text/plain application/hub/main/controller/.htaccess -text svneol=unset#text/plain application/hub/main/controller/console/.htaccess -text svneol=unset#text/plain +application/hub/main/controller/console/class_HubConsoleCruncherController.php svneol=native#text/plain application/hub/main/controller/console/class_HubConsoleDefaultNewsController.php -text svneol=unset#text/plain +application/hub/main/cruncher/.htaccess svneol=native#text/plain +application/hub/main/cruncher/class_ -text +application/hub/main/cruncher/class_BaseHubCruncher.php svneol=native#text/plain +application/hub/main/cruncher/test/.htaccess svneol=native#text/plain +application/hub/main/cruncher/test/class_HubTestCruncher.php svneol=native#text/plain application/hub/main/database/.htaccess -text svneol=unset#text/plain application/hub/main/database/wrapper/.htaccess -text svneol=unset#text/plain application/hub/main/database/wrapper/class_NodeInformationDatabaseWrapper.php -text svneol=unset#text/plain @@ -178,18 +187,27 @@ application/hub/main/filter/class_ -text svneol=unset#text/plain application/hub/main/filter/console/.htaccess -text svneol=unset#text/plain application/hub/main/filter/console/class_Console -text application/hub/main/filter/console/class_ConsoleWelcomeTeaserFilter.php -text svneol=unset#text/plain +application/hub/main/filter/cruncher/.htaccess svneol=native#text/plain +application/hub/main/filter/cruncher/class_Cruncher -text +application/hub/main/filter/cruncher/class_CruncherInitializationFilter.php svneol=native#text/plain +application/hub/main/filter/cruncher/class_CruncherPhpRequirementsFilter.php svneol=native#text/plain +application/hub/main/filter/cruncher/class_CruncherWelcomeTeaserFilter.php svneol=native#text/plain application/hub/main/filter/node/.htaccess -text svneol=unset#text/plain application/hub/main/filter/node/class_Node -text application/hub/main/filter/node/class_NodeInitializationFilter.php -text svneol=unset#text/plain application/hub/main/filter/node/class_NodePhpRequirementsFilter.php -text svneol=unset#text/plain +application/hub/main/filter/node/class_NodeWelcomeTeaserFilter.php svneol=native#text/plain application/hub/main/filter/shutdown/.htaccess -text svneol=unset#text/plain application/hub/main/filter/shutdown/class_HubShutdown -text +application/hub/main/filter/shutdown/class_HubShutdownCruncherFilter.php svneol=native#text/plain application/hub/main/filter/shutdown/class_HubShutdownDeinitQueuesFilter.php -text svneol=unset#text/plain application/hub/main/filter/shutdown/class_HubShutdownFlushNodeListFilter.php -text svneol=unset#text/plain application/hub/main/filter/shutdown/class_HubShutdownListenerPoolFilter.php -text svneol=unset#text/plain application/hub/main/filter/shutdown/class_HubShutdownNodeFilter.php -text svneol=unset#text/plain application/hub/main/filter/shutdown/class_HubShutdownTaskHandlerFilter.php -text svneol=unset#text/plain application/hub/main/filter/task/.htaccess -text svneol=unset#text/plain +application/hub/main/filter/task/class_CruncherTaskHandlerInitializerFilter.php svneol=native#text/plain +application/hub/main/filter/task/class_HubTaskHandlerInitializerFilter.php -text svneol=unset#text/plain application/hub/main/filter/task/class_TaskHandlerInitializerFilter.php -text svneol=unset#text/plain application/hub/main/handler/.htaccess -text svneol=unset#text/plain application/hub/main/handler/class_ -text svneol=unset#text/plain diff --git a/application/hub/class_ApplicationHelper.php b/application/hub/class_ApplicationHelper.php index c2ee62694..b89ec49cb 100644 --- a/application/hub/class_ApplicationHelper.php +++ b/application/hub/class_ApplicationHelper.php @@ -22,7 +22,7 @@ * * @author Roland Haeder * @version 0.0 - * @copyright Copyright (c) 2007 - 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * * This program is free software: you can redistribute it and/or modify @@ -159,9 +159,15 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica $response = 'console'; $responseType = 'console'; + // Do we have a 'client' parameter set? + if ($requestInstance->isRequestElementSet('client')) { + // Extend the response type + $responseType = 'client_' . $responseType; + } // END - if + // Do we have another response? if ($requestInstance->isRequestElementSet('request')) { - // Then use it + // Then use it, this does override above 'client'! $response = strtolower($requestInstance->getRequestElement('request')); $responseType = $response; } // END - if diff --git a/application/hub/config.php b/application/hub/config.php index 8260f52cf..e8c9ac6b6 100644 --- a/application/hub/config.php +++ b/application/hub/config.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0 - * @copyright Copyright (c) 2007 - 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * * This program is free software: you can redistribute it and/or modify @@ -39,8 +39,11 @@ $cfg->setConfigEntry('boot_node_tcp_listen_port', 9061); // CFG: BOOT-NODE-UDP-LISTEN-PORT $cfg->setConfigEntry('boot_node_udp_listen_port', 9061); -// CFG: NODE-MODE (can be 'regular', 'list', 'master' or 'boot', default is 'regular') -$cfg->setConfigEntry('node_mode', 'regular'); +// CFG: NODE-DEFAULT-MODE (can be 'regular', 'list', 'master' or 'boot', default is 'regular') +$cfg->setConfigEntry('node_default_mode', 'regular'); + +// CFG: CRUNCHER-DEFAULT-MODE (can be 'test' at the moment) +$cfg->setConfigEntry('cruncher_default_mode', 'test'); // CFG: TEMPLATE-ENGINE $cfg->setConfigEntry('tpl_engine', 'ConsoleOutput'); @@ -138,6 +141,9 @@ $cfg->setConfigEntry('default_hubconsole_command', 'main'); // CFG: HUBCONSOLE-CMD-MAIN-RESOLVER-CLASS $cfg->setConfigEntry('hubconsole_cmd_main_resolver_class', 'HubConsoleCommandResolver'); +// CFG: HUBCONSOLE-CMD-CRUNCHER-RESOLVER-CLASS +$cfg->setConfigEntry('hubconsole_cmd_cruncher_resolver_class', 'HubConsoleCommandResolver'); + // CFG: NETWORK-STATE-RESOLVER-CLASS $cfg->setConfigEntry('network_state_resolver_class', 'NetworkStateResolver'); @@ -150,17 +156,29 @@ $cfg->setConfigEntry('news_process_filter', 'NewsProcessFilter'); // CFG: NODE-PHP-REQUIREMENTS-FILTER $cfg->setConfigEntry('node_php_requirements_filter', 'NodePhpRequirementsFilter'); +// CFG: CRUNCHER-PHP-REQUIREMENTS-FILTER +$cfg->setConfigEntry('cruncher_php_requirements_filter', 'CruncherPhpRequirementsFilter'); + // CFG: NODE-INITIALIZER-FILTER $cfg->setConfigEntry('node_initializer_filter', 'NodeInitializationFilter'); +// CFG: CRUNCHER-INITIALIZER-FILTER +$cfg->setConfigEntry('cruncher_initializer_filter', 'CruncherInitializationFilter'); + // CFG: HUB-ACTIVATION-TASK-HANDLER-INITIALIZER-FILTER -$cfg->setConfigEntry('hub_activation_task_handler_initializer_filter', 'TaskHandlerInitializerFilter'); +$cfg->setConfigEntry('hub_activation_task_handler_initializer_filter', 'HubTaskHandlerInitializerFilter'); + +// CFG: CRUNCHER-BOOTSTRAP-TASK-HANDLER-INITIALIZER-FILTER +$cfg->setConfigEntry('cruncher_bootstrap_task_handler_initializer_filter', 'CruncherTaskHandlerInitializerFilter'); // CFG: HUB-ACTIVATION-SELF-ANNOUNCEMENT-TASK-FILTER $cfg->setConfigEntry('hub_activation_self_announcement_task_filter', 'HubActivationSelfAnnouncementFilter'); -// CFG: CONSOLE-WELCOME-TEASER-FILTER -$cfg->setConfigEntry('console_welcome_teaser_filter', 'ConsoleWelcomeTeaserFilter'); +// CFG: NODE-WELCOME-TEASER-FILTER +$cfg->setConfigEntry('node_welcome_teaser_filter', 'NodeWelcomeTeaserFilter'); + +// CFG: CRUNCHER-WELCOME-TEASER-FILTER +$cfg->setConfigEntry('cruncher_welcome_teaser_filter', 'CruncherWelcomeTeaserFilter'); // CFG: HUB-BOOTSTRAP-GENERATE-HUBID-FILTER $cfg->setConfigEntry('hub_bootstrap_generate_hubid_filter', 'HubBootstrapGenerateHubIdFilter'); @@ -192,6 +210,9 @@ $cfg->setConfigEntry('hub_shutdown_task_handler_filter', 'HubShutdownTaskHandler // CFG: HUB-SHUTDOWN-NODE-FILTER $cfg->setConfigEntry('hub_shutdown_node_filter', 'HubShutdownNodeFilter'); +// CFG: HUB-SHUTDOWN-CRUNCHER-FILTER +$cfg->setConfigEntry('hub_shutdown_cruncher_filter', 'HubShutdownCruncherFilter'); + // CFG: NEWS-READER-CLASS $cfg->setConfigEntry('news_reader_class', 'ConsoleNewsReader'); diff --git a/application/hub/data.php b/application/hub/data.php index e469cca62..be91c6659 100644 --- a/application/hub/data.php +++ b/application/hub/data.php @@ -15,7 +15,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/debug.php b/application/hub/debug.php index 06b28e27e..92031bb7b 100644 --- a/application/hub/debug.php +++ b/application/hub/debug.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0 - * @copyright Copyright (c) 2007 - 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * * This program is free software: you can redistribute it and/or modify diff --git a/application/hub/exceptions.php b/application/hub/exceptions.php index 62fb49cb9..05a27767b 100644 --- a/application/hub/exceptions.php +++ b/application/hub/exceptions.php @@ -5,7 +5,7 @@ * * @author Roland Haeder * @version 0.0 - * @copyright Copyright (c) 2007 - 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * * This program is free software: you can redistribute it and/or modify diff --git a/application/hub/exceptions/hub/class_HubAlreadyAnnouncedException.php b/application/hub/exceptions/hub/class_HubAlreadyAnnouncedException.php index 326047a40..481e8c229 100644 --- a/application/hub/exceptions/hub/class_HubAlreadyAnnouncedException.php +++ b/application/hub/exceptions/hub/class_HubAlreadyAnnouncedException.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/exceptions/ids/class_InvalidSessionIdException.php b/application/hub/exceptions/ids/class_InvalidSessionIdException.php index e686d3e6f..73a65dd26 100644 --- a/application/hub/exceptions/ids/class_InvalidSessionIdException.php +++ b/application/hub/exceptions/ids/class_InvalidSessionIdException.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/exceptions/lists/class_InvalidListHashException.php b/application/hub/exceptions/lists/class_InvalidListHashException.php index 5759bab5c..9b48ec464 100644 --- a/application/hub/exceptions/lists/class_InvalidListHashException.php +++ b/application/hub/exceptions/lists/class_InvalidListHashException.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/exceptions/lists/class_ListGroupAlreadyAddedException.php b/application/hub/exceptions/lists/class_ListGroupAlreadyAddedException.php index 13f39e80e..d47ef3571 100644 --- a/application/hub/exceptions/lists/class_ListGroupAlreadyAddedException.php +++ b/application/hub/exceptions/lists/class_ListGroupAlreadyAddedException.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/exceptions/lists/class_NoListGroupException.php b/application/hub/exceptions/lists/class_NoListGroupException.php index 18ea626da..db33a0800 100644 --- a/application/hub/exceptions/lists/class_NoListGroupException.php +++ b/application/hub/exceptions/lists/class_NoListGroupException.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/exceptions/peer/class_PeerAlreadyRegisteredException.php b/application/hub/exceptions/peer/class_PeerAlreadyRegisteredException.php index 2b2315074..55d7df8d2 100644 --- a/application/hub/exceptions/peer/class_PeerAlreadyRegisteredException.php +++ b/application/hub/exceptions/peer/class_PeerAlreadyRegisteredException.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/exceptions/resolver/class_NoValidHostnameException.php b/application/hub/exceptions/resolver/class_NoValidHostnameException.php index a6af1e56e..f86bbde65 100644 --- a/application/hub/exceptions/resolver/class_NoValidHostnameException.php +++ b/application/hub/exceptions/resolver/class_NoValidHostnameException.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/exceptions/state/class_InvalidStateException.php b/application/hub/exceptions/state/class_InvalidStateException.php index 9562c8666..8e0a33936 100644 --- a/application/hub/exceptions/state/class_InvalidStateException.php +++ b/application/hub/exceptions/state/class_InvalidStateException.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/exceptions/tags/class_InvalidTagException.php b/application/hub/exceptions/tags/class_InvalidTagException.php index 258120d11..6a1237440 100644 --- a/application/hub/exceptions/tags/class_InvalidTagException.php +++ b/application/hub/exceptions/tags/class_InvalidTagException.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/exceptions/tasks/class_InvalidTaskException.php b/application/hub/exceptions/tasks/class_InvalidTaskException.php index 45bdc7846..5725e7340 100644 --- a/application/hub/exceptions/tasks/class_InvalidTaskException.php +++ b/application/hub/exceptions/tasks/class_InvalidTaskException.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/init.php b/application/hub/init.php index 96eecc494..b3cd98935 100644 --- a/application/hub/init.php +++ b/application/hub/init.php @@ -15,7 +15,7 @@ * * @author Roland Haeder * @version 0.0 - * @copyright Copyright (c) 2007 - 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * * This program is free software: you can redistribute it and/or modify diff --git a/application/hub/interfaces/connectors/class_Connectable.php b/application/hub/interfaces/connectors/class_Connectable.php index cbce5c9de..4a734ce1d 100644 --- a/application/hub/interfaces/connectors/class_Connectable.php +++ b/application/hub/interfaces/connectors/class_Connectable.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/cruncher/.htaccess b/application/hub/interfaces/cruncher/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/application/hub/interfaces/cruncher/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/hub/interfaces/cruncher/class_CruncherHelper.php b/application/hub/interfaces/cruncher/class_CruncherHelper.php new file mode 100644 index 000000000..e95431a29 --- /dev/null +++ b/application/hub/interfaces/cruncher/class_CruncherHelper.php @@ -0,0 +1,52 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * @todo We need to find a better name for this interface + * + * 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 CruncherHelper extends FrameworkInterface { + /** + * Method to "bootstrap" the node. This step does also apply provided + * command-line arguments stored in the request instance. You should now + * get it from calling $this->getRequestInstance(). + * + * @return void + */ + function doBootstrapping (); + + /** + * Outputs the console teaser. This should only be executed on startup or + * full restarts. This method generates some space around the teaser. + * + * @return void + */ + function outputConsoleTeaser (); + + /** + * Add some cruncher-specific filters + * + * @return void + */ + function addExtraHubFilters (); +} + +// [EOF] +?> diff --git a/application/hub/interfaces/discovery/class_DiscoverableRecipient.php b/application/hub/interfaces/discovery/class_DiscoverableRecipient.php index 5badfb48a..d452311c3 100644 --- a/application/hub/interfaces/discovery/class_DiscoverableRecipient.php +++ b/application/hub/interfaces/discovery/class_DiscoverableRecipient.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/discovery/class_DiscoverableSocket.php b/application/hub/interfaces/discovery/class_DiscoverableSocket.php index 3c589c9c4..65e4df2c6 100644 --- a/application/hub/interfaces/discovery/class_DiscoverableSocket.php +++ b/application/hub/interfaces/discovery/class_DiscoverableSocket.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/handler/class_Handleable.php b/application/hub/interfaces/handler/class_Handleable.php index 55f100d49..074157e70 100644 --- a/application/hub/interfaces/handler/class_Handleable.php +++ b/application/hub/interfaces/handler/class_Handleable.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/handler/network/class_Networkable.php b/application/hub/interfaces/handler/network/class_Networkable.php index aa6b4d5b3..f3611a069 100644 --- a/application/hub/interfaces/handler/network/class_Networkable.php +++ b/application/hub/interfaces/handler/network/class_Networkable.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/handler/task/class_HandleableTask.php b/application/hub/interfaces/handler/task/class_HandleableTask.php index 4aaceba71..3fb432dd0 100644 --- a/application/hub/interfaces/handler/task/class_HandleableTask.php +++ b/application/hub/interfaces/handler/task/class_HandleableTask.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/helper/hub/class_HelpableHub.php b/application/hub/interfaces/helper/hub/class_HelpableHub.php index 4a0d9482d..5ee605b3c 100644 --- a/application/hub/interfaces/helper/hub/class_HelpableHub.php +++ b/application/hub/interfaces/helper/hub/class_HelpableHub.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/listener/class_Listenable.php b/application/hub/interfaces/listener/class_Listenable.php index f299712d1..c32a2d8b6 100644 --- a/application/hub/interfaces/listener/class_Listenable.php +++ b/application/hub/interfaces/listener/class_Listenable.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/lists/class_Listable.php b/application/hub/interfaces/lists/class_Listable.php index 2bc636a79..eb570137c 100644 --- a/application/hub/interfaces/lists/class_Listable.php +++ b/application/hub/interfaces/lists/class_Listable.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/lookup/class_Lookupable.php b/application/hub/interfaces/lookup/class_Lookupable.php index ccaf19cd3..be4e60473 100644 --- a/application/hub/interfaces/lookup/class_Lookupable.php +++ b/application/hub/interfaces/lookup/class_Lookupable.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/lookup/peer_states/class_LookupablePeerState.php b/application/hub/interfaces/lookup/peer_states/class_LookupablePeerState.php index d31521715..aadff2e53 100644 --- a/application/hub/interfaces/lookup/peer_states/class_LookupablePeerState.php +++ b/application/hub/interfaces/lookup/peer_states/class_LookupablePeerState.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/nodes/class_NodeHelper.php b/application/hub/interfaces/nodes/class_NodeHelper.php index f023f6e32..c90d2c918 100644 --- a/application/hub/interfaces/nodes/class_NodeHelper.php +++ b/application/hub/interfaces/nodes/class_NodeHelper.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @todo We need to find a better name for this interface @@ -47,6 +47,13 @@ interface NodeHelper extends FrameworkInterface { */ function outputConsoleTeaser (); + /** + * Add some node-specific filters + * + * @return void + */ + function addExtraHubFilters (); + /** * Generic method to acquire a hub-id. On first run this generates a new one * based on many pseudo-random data. On any later run, unless the id diff --git a/application/hub/interfaces/package/class_Deliverable.php b/application/hub/interfaces/package/class_Deliverable.php index 65c70c4ae..30ee1b57c 100644 --- a/application/hub/interfaces/package/class_Deliverable.php +++ b/application/hub/interfaces/package/class_Deliverable.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/package/fragmenter/class_Fragmentable.php b/application/hub/interfaces/package/fragmenter/class_Fragmentable.php index 2b72b3a05..e2336c4c3 100644 --- a/application/hub/interfaces/package/fragmenter/class_Fragmentable.php +++ b/application/hub/interfaces/package/fragmenter/class_Fragmentable.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -22,6 +22,25 @@ * along with this program. If not, see . */ interface Fragmentable extends FrameworkInterface { + /** + * This method does "implode" the given package data array into one long + * string, splits it into small chunks, adds a serial number and checksum + * to all chunks and prepends a final hashsum chunk. + * + * @param $packageData Raw package data array + * @param $connectionInstance A helper instance for connections + * @return void + */ + function fragmentPackageArray (array $packageData, BaseconnectionInstance $connectionInstance); + + /** + * This method gets the next chunk from the internal FIFO which should be + * sent to the given recipient. + * + * @param $packageData Raw package data array + * @return $rawDataChunk Raw package data chunk + */ + function getNextRawDataChunk (array $packageData); } // [EOF] diff --git a/application/hub/interfaces/pool/class_Poolable.php b/application/hub/interfaces/pool/class_Poolable.php index d9ca89bf3..2f46bc28f 100644 --- a/application/hub/interfaces/pool/class_Poolable.php +++ b/application/hub/interfaces/pool/class_Poolable.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/pool/listener/class_PoolableListener.php b/application/hub/interfaces/pool/listener/class_PoolableListener.php index 12d0b558f..091bc0a12 100644 --- a/application/hub/interfaces/pool/listener/class_PoolableListener.php +++ b/application/hub/interfaces/pool/listener/class_PoolableListener.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/pool/peer/class_PoolablePeer.php b/application/hub/interfaces/pool/peer/class_PoolablePeer.php index 356dde94b..c72052644 100644 --- a/application/hub/interfaces/pool/peer/class_PoolablePeer.php +++ b/application/hub/interfaces/pool/peer/class_PoolablePeer.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/protocol/class_ProtocolHandler.php b/application/hub/interfaces/protocol/class_ProtocolHandler.php index dd4c472c2..f91c406d4 100644 --- a/application/hub/interfaces/protocol/class_ProtocolHandler.php +++ b/application/hub/interfaces/protocol/class_ProtocolHandler.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/query/class_Queryable.php b/application/hub/interfaces/query/class_Queryable.php index e0917f1c1..2bad9c436 100644 --- a/application/hub/interfaces/query/class_Queryable.php +++ b/application/hub/interfaces/query/class_Queryable.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/queues/class_Queueable.php b/application/hub/interfaces/queues/class_Queueable.php index 9e14b2075..168642a8b 100644 --- a/application/hub/interfaces/queues/class_Queueable.php +++ b/application/hub/interfaces/queues/class_Queueable.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/socket/class_SocketTag.php b/application/hub/interfaces/socket/class_SocketTag.php index 5565d4eb6..99bd6d552 100644 --- a/application/hub/interfaces/socket/class_SocketTag.php +++ b/application/hub/interfaces/socket/class_SocketTag.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/states/class_ b/application/hub/interfaces/states/class_ index fa5569358..055923ff7 100644 --- a/application/hub/interfaces/states/class_ +++ b/application/hub/interfaces/states/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/states/class_Stateable.php b/application/hub/interfaces/states/class_Stateable.php index 599cbda73..7347e605b 100644 --- a/application/hub/interfaces/states/class_Stateable.php +++ b/application/hub/interfaces/states/class_Stateable.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/states/client/class_ClientStateable.php b/application/hub/interfaces/states/client/class_ClientStateable.php index 9ec1c39b7..3550ef0f9 100644 --- a/application/hub/interfaces/states/client/class_ClientStateable.php +++ b/application/hub/interfaces/states/client/class_ClientStateable.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/states/hub/class_HubStateable.php b/application/hub/interfaces/states/hub/class_HubStateable.php index d1ff9feec..441c5bdb2 100644 --- a/application/hub/interfaces/states/hub/class_HubStateable.php +++ b/application/hub/interfaces/states/hub/class_HubStateable.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/states/peer/class_PeerStateable.php b/application/hub/interfaces/states/peer/class_PeerStateable.php index c2b6ac2d0..ca2f2b481 100644 --- a/application/hub/interfaces/states/peer/class_PeerStateable.php +++ b/application/hub/interfaces/states/peer/class_PeerStateable.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/tags/class_Tagable.php b/application/hub/interfaces/tags/class_Tagable.php index c87c42967..9fd39c39c 100644 --- a/application/hub/interfaces/tags/class_Tagable.php +++ b/application/hub/interfaces/tags/class_Tagable.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/tasks/class_Taskable.php b/application/hub/interfaces/tasks/class_Taskable.php index 0386ff1bc..fdfb19e4a 100644 --- a/application/hub/interfaces/tasks/class_Taskable.php +++ b/application/hub/interfaces/tasks/class_Taskable.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/visitor/class_Visitable.php b/application/hub/interfaces/visitor/class_Visitable.php index 159bcc517..44c503d9f 100644 --- a/application/hub/interfaces/visitor/class_Visitable.php +++ b/application/hub/interfaces/visitor/class_Visitable.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/visitor/class_Visitor.php b/application/hub/interfaces/visitor/class_Visitor.php index 328babd94..fac9fca97 100644 --- a/application/hub/interfaces/visitor/class_Visitor.php +++ b/application/hub/interfaces/visitor/class_Visitor.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/visitor/connector/class_QueryConnectorVisitor.php b/application/hub/interfaces/visitor/connector/class_QueryConnectorVisitor.php index 78fcc2ef9..3e9db0780 100644 --- a/application/hub/interfaces/visitor/connector/class_QueryConnectorVisitor.php +++ b/application/hub/interfaces/visitor/connector/class_QueryConnectorVisitor.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/visitor/connector/class_QueueConnectorVisitor.php b/application/hub/interfaces/visitor/connector/class_QueueConnectorVisitor.php index f4fb4d9d4..f81e10ca4 100644 --- a/application/hub/interfaces/visitor/connector/class_QueueConnectorVisitor.php +++ b/application/hub/interfaces/visitor/connector/class_QueueConnectorVisitor.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/visitor/decorator/class_DecoratorVisitor.php b/application/hub/interfaces/visitor/decorator/class_DecoratorVisitor.php index 69041868e..3eea54a8d 100644 --- a/application/hub/interfaces/visitor/decorator/class_DecoratorVisitor.php +++ b/application/hub/interfaces/visitor/decorator/class_DecoratorVisitor.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/visitor/listener/class_ListenerVisitor.php b/application/hub/interfaces/visitor/listener/class_ListenerVisitor.php index fdd27bb94..086149501 100644 --- a/application/hub/interfaces/visitor/listener/class_ListenerVisitor.php +++ b/application/hub/interfaces/visitor/listener/class_ListenerVisitor.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/visitor/pool/class_PoolVisitor.php b/application/hub/interfaces/visitor/pool/class_PoolVisitor.php index 970d3fd75..094bf249e 100644 --- a/application/hub/interfaces/visitor/pool/class_PoolVisitor.php +++ b/application/hub/interfaces/visitor/pool/class_PoolVisitor.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/visitor/pool/listener/class_ListenerPoolVisitor.php b/application/hub/interfaces/visitor/pool/listener/class_ListenerPoolVisitor.php index 5f17c97b8..34141f2cf 100644 --- a/application/hub/interfaces/visitor/pool/listener/class_ListenerPoolVisitor.php +++ b/application/hub/interfaces/visitor/pool/listener/class_ListenerPoolVisitor.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/visitor/query/class_QueryVisitor.php b/application/hub/interfaces/visitor/query/class_QueryVisitor.php index d88106b0b..3a2dfaa71 100644 --- a/application/hub/interfaces/visitor/query/class_QueryVisitor.php +++ b/application/hub/interfaces/visitor/query/class_QueryVisitor.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/visitor/queue/class_QueueVisitor.php b/application/hub/interfaces/visitor/queue/class_QueueVisitor.php index 10bf7b43d..921b88d10 100644 --- a/application/hub/interfaces/visitor/queue/class_QueueVisitor.php +++ b/application/hub/interfaces/visitor/queue/class_QueueVisitor.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/interfaces/visitor/tasks/class_TaskVisitor.php b/application/hub/interfaces/visitor/tasks/class_TaskVisitor.php index cb3523c72..570b708a2 100644 --- a/application/hub/interfaces/visitor/tasks/class_TaskVisitor.php +++ b/application/hub/interfaces/visitor/tasks/class_TaskVisitor.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/loader.php b/application/hub/loader.php index 3fa42e466..9da056b8e 100644 --- a/application/hub/loader.php +++ b/application/hub/loader.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0 - * @copyright Copyright (c) 2007 - 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * * This program is free software: you can redistribute it and/or modify diff --git a/application/hub/main/class_ b/application/hub/main/class_ index 698f097af..b49de4af5 100644 --- a/application/hub/main/class_ +++ b/application/hub/main/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/class_Base b/application/hub/main/class_Base index 8a2710e02..37ceadce5 100644 --- a/application/hub/main/class_Base +++ b/application/hub/main/class_Base @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/class_BaseHubSystem.php b/application/hub/main/class_BaseHubSystem.php index f1595d161..62eb1304b 100644 --- a/application/hub/main/class_BaseHubSystem.php +++ b/application/hub/main/class_BaseHubSystem.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/commands/console/class_HubConsoleCruncherCommand.php b/application/hub/main/commands/console/class_HubConsoleCruncherCommand.php new file mode 100644 index 000000000..6c7d779c8 --- /dev/null +++ b/application/hub/main/commands/console/class_HubConsoleCruncherCommand.php @@ -0,0 +1,118 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 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 HubConsoleCruncherCommand extends BaseCommand implements Commandable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this class + * + * @param $resolverInstance An instance of a command resolver class + * @return $commandInstance An instance a prepared command class + */ + public static final function createHubConsoleCruncherCommand (CommandResolver $resolverInstance) { + // Get new instance + $commandInstance = new HubConsoleCruncherCommand(); + + // Set the application instance + $commandInstance->setResolverInstance($resolverInstance); + + // Return the prepared instance + return $commandInstance; + } + + /** + * Executes the given command with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @todo Try to create a CruncherActivationTask or so + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // Get a registry and the application instance from it + $applicationInstance = Registry::getRegistry()->getInstance('app'); + + // ----------------------- Bootstrapping phase ------------------------ + // Try to bootstrap the node and pass the request instance to it for + // extra arguments which mostly override config entries or enable special + // features within the hub (none is ready at this development stage) + $this->debugOutput('BOOTSTRAP: Beginning with bootstrap...'); + $applicationInstance->getControllerInstance()->executeBootstrapFilters($requestInstance, $responseInstance); + $this->debugOutput('BOOTSTRAP: Bootstrap finished.'); + + // Get task handler instance + $handlerInstance = Registry::getRegistry()->getInstance('task'); + + // Debug message + $this->debugOutput('MAIN: --- Entering main loop. ---'); + + // ----------------------------- Main loop ---------------------------- + // This is the main loop. Queried calls should come back here very fast + // so the whole application runs on nice speed. This while-loop goes + // until the cruncher is no longer active or all tasks are killed. + while ($handlerInstance->hasTasksLeft()) { + // Handle all tasks here + $handlerInstance->handleTasks(); + } // END - while + + // Debug message + $this->debugOutput('MAIN: --- Leaving main loop. ---'); + } + + /** + * Adds extra filters to the given controller instance + * + * @param $controllerInstance A controller instance + * @param $requestInstance An instance of a class with an Requestable interface + * @return void + * @todo Should we add some more filters? + */ + public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) { + // Add pre filters + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('cruncher_php_requirements_filter')); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('cruncher_initializer_filter')); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('cruncher_welcome_teaser_filter')); + + // Add bootstrap filters + $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('cruncher_bootstrap_task_handler_initializer_filter')); + //$controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('hub_bootstrap_generate_hubid_filter')); + + // Add shutdown filters + //$controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('hub_shutdown_task_handler_filter')); + + // This is the last generic filter + $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('hub_shutdown_cruncher_filter')); + } +} + +// [EOF] +?> diff --git a/application/hub/main/commands/console/class_HubConsoleMainCommand.php b/application/hub/main/commands/console/class_HubConsoleMainCommand.php index f0c19d777..cb0e46358 100644 --- a/application/hub/main/commands/console/class_HubConsoleMainCommand.php +++ b/application/hub/main/commands/console/class_HubConsoleMainCommand.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -111,7 +111,7 @@ class HubConsoleMainCommand extends BaseCommand implements Commandable { // Add pre filters $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('node_php_requirements_filter')); $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('node_initializer_filter')); - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('console_welcome_teaser_filter')); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('node_welcome_teaser_filter')); // Add bootstrap filters $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('hub_bootstrap_generate_hubid_filter')); diff --git a/application/hub/main/compressor/decorator/class_NetworkPackageCompressorDecorator.php b/application/hub/main/compressor/decorator/class_NetworkPackageCompressorDecorator.php index 6c58ca09b..04c2a8ab4 100644 --- a/application/hub/main/compressor/decorator/class_NetworkPackageCompressorDecorator.php +++ b/application/hub/main/compressor/decorator/class_NetworkPackageCompressorDecorator.php @@ -5,7 +5,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/connectors/class_BaseConnector.php b/application/hub/main/connectors/class_BaseConnector.php index 304a1e37f..aee8876f3 100644 --- a/application/hub/main/connectors/class_BaseConnector.php +++ b/application/hub/main/connectors/class_BaseConnector.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/connectors/query/class_ b/application/hub/main/connectors/query/class_ index c0bb530eb..3e1e7dbef 100644 --- a/application/hub/main/connectors/query/class_ +++ b/application/hub/main/connectors/query/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @todo Find an interface for: handleAllQueries() diff --git a/application/hub/main/connectors/query/class_BaseQueryConnector.php b/application/hub/main/connectors/query/class_BaseQueryConnector.php index e7ff1cac3..bb2c61ea7 100644 --- a/application/hub/main/connectors/query/class_BaseQueryConnector.php +++ b/application/hub/main/connectors/query/class_BaseQueryConnector.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/connectors/query/local/class_LocalQueryConnector.php b/application/hub/main/connectors/query/local/class_LocalQueryConnector.php index e0a003f3d..b44b560ac 100644 --- a/application/hub/main/connectors/query/local/class_LocalQueryConnector.php +++ b/application/hub/main/connectors/query/local/class_LocalQueryConnector.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @todo Find an interface for: handleAllQueries() diff --git a/application/hub/main/connectors/queues/class_ b/application/hub/main/connectors/queues/class_ index e71fa1e45..a25124998 100644 --- a/application/hub/main/connectors/queues/class_ +++ b/application/hub/main/connectors/queues/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/connectors/queues/class_BaseQueueConnector.php b/application/hub/main/connectors/queues/class_BaseQueueConnector.php index bb1177c46..8c7ef9c3e 100644 --- a/application/hub/main/connectors/queues/class_BaseQueueConnector.php +++ b/application/hub/main/connectors/queues/class_BaseQueueConnector.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/connectors/queues/local/class_LocalQueueConnector.php b/application/hub/main/connectors/queues/local/class_LocalQueueConnector.php index 8869f6284..f8cd16ddf 100644 --- a/application/hub/main/connectors/queues/local/class_LocalQueueConnector.php +++ b/application/hub/main/connectors/queues/local/class_LocalQueueConnector.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/controller/console/class_HubConsoleCruncherController.php b/application/hub/main/controller/console/class_HubConsoleCruncherController.php new file mode 100644 index 000000000..508e50b29 --- /dev/null +++ b/application/hub/main/controller/console/class_HubConsoleCruncherController.php @@ -0,0 +1,132 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 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 HubConsoleCruncherController extends BaseController implements Controller { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + + // Init additional filter chains + foreach (array('bootstrap','shutdown') as $filterChain) { + $this->initFilterChain($filterChain); + } // END - foreach + } + + /** + * Creates an instance of this class + * + * @param $resolverInstance An instance of a command resolver class + * @return $controllerInstance A prepared instance of this class + */ + public static final function createHubConsoleCruncherController (CommandResolver $resolverInstance) { + // Create the instance + $controllerInstance = new HubConsoleCruncherController(); + + // Set the command resolver + $controllerInstance->setResolverInstance($resolverInstance); + + // Return the prepared instance + return $controllerInstance; + } + + /** + * Handles the given request and response + * + * @param $requestInstance An instance of a request class + * @param $responseInstance An instance of a response class + * @return void + */ + public function handleRequest (Requestable $requestInstance, Responseable $responseInstance) { + // Get the command instance from the resolver by sending a request instance to the resolver + $commandInstance = $this->getResolverInstance()->resolveCommandByRequest($requestInstance); + + // Add more filters by the command + $commandInstance->addExtraFilters($this, $requestInstance); + + // Run the pre filters + $this->executePreFilters($requestInstance, $responseInstance); + + // This request was valid! :-D + $requestInstance->requestIsValid(); + + // Execute the command + $commandInstance->execute($requestInstance, $responseInstance); + + // Run the pre filters + $this->executePostFilters($requestInstance, $responseInstance); + + // Flush the response out + $responseInstance->flushBuffer(); + } + + /** + * Add a bootstrap filter + * + * @param $filterInstance A Filterable class + * @return void + */ + public function addBootstrapFilter (Filterable $filterInstance) { + $this->addFilter('bootstrap', $filterInstance); + } + + /** + * Executes all bootstrap filters + * + * @param $requestInstance A Requestable class + * @param $responseInstance A Responseable class + * @return void + */ + public function executeBootstrapFilters (Requestable $requestInstance, Responseable $responseInstance) { + $this->executeFilters('bootstrap', $requestInstance, $responseInstance); + } + + /** + * Add a shutdown filter + * + * @param $filterInstance A Filterable class + * @return void + */ + public function addShutdownFilter (Filterable $filterInstance) { + $this->addFilter('shutdown', $filterInstance); + } + + /** + * Executes all shutdown filters + * + * @param $requestInstance A Requestable class + * @param $responseInstance A Responseable class + * @return void + */ + public function executeShutdownFilters (Requestable $requestInstance, Responseable $responseInstance) { + $this->executeFilters('shutdown', $requestInstance, $responseInstance); + } +} + +// [EOF] +?> diff --git a/application/hub/main/controller/console/class_HubConsoleDefaultNewsController.php b/application/hub/main/controller/console/class_HubConsoleDefaultNewsController.php index 65656ce7e..db6dee528 100644 --- a/application/hub/main/controller/console/class_HubConsoleDefaultNewsController.php +++ b/application/hub/main/controller/console/class_HubConsoleDefaultNewsController.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/cruncher/.htaccess b/application/hub/main/cruncher/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/application/hub/main/cruncher/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/hub/main/cruncher/class_ b/application/hub/main/cruncher/class_ new file mode 100644 index 000000000..a9946b1df --- /dev/null +++ b/application/hub/main/cruncher/class_ @@ -0,0 +1,87 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 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 Hub???Cruncher extends BaseHubCruncher implements CruncherHelper, Registerable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this hub-cruncher class + * + * @param $requestInstance An instance of a Requestable class + * @return $cruncherInstance An instance of this hub-cruncher class + */ + public final static function createHub???Cruncher (Requestable $requestInstance) { + // Get a new instance + $cruncherInstance = new Hub???Cruncher(); + + // Set the request instance + $cruncherInstance->setRequestInstance($requestInstance); + + // Return the instance + return $cruncherInstance; + } + + /** + * Method to "bootstrap" the cruncher. This step does also apply provided + * command-line arguments stored in the request instance. The regular cruncher + * should communicate with the bootstrap-crunchers at this point. + * + * @return void + * @todo Implement this method + */ + public function doBootstrapping () { + // Call generic (parent) bootstrapping method first + parent::doGenericBootstrapping(); + $this->partialStub('Please implement this method.'); + } + + /** + * Outputs the console teaser. This should only be executed on startup or + * full restarts. This method generates some space around the teaser. + * + * @return void + */ + public function outputConsoleTeaser () { + $this->partialStub('Please implement this method.'); + } + + /** + * Add some cruncher-specific filters + * + * @return void + */ + public function addExtraHubFilters () { + // Add some filters here + } +} + +// [EOF] +?> diff --git a/application/hub/main/cruncher/class_BaseHubCruncher.php b/application/hub/main/cruncher/class_BaseHubCruncher.php new file mode 100644 index 000000000..f552a19aa --- /dev/null +++ b/application/hub/main/cruncher/class_BaseHubCruncher.php @@ -0,0 +1,53 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 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 BaseHubCruncher extends BaseHubSystem implements Updateable { + /** + * Protected constructor + * + * @param $className Name of the class + * @return void + */ + protected function __construct ($className) { + // Call parent constructor + parent::__construct($className); + } + + /** + * Updates a given field with new value + * + * @param $fieldName Field to update + * @param $fieldValue New value to store + * @return void + * @throws DatabaseUpdateSupportException If this class does not support database updates + * @todo Try to make this method more generic so we can move it in BaseFrameworkSystem + */ + public function updateDatabaseField ($fieldName, $fieldValue) { + // Unfinished + $this->partialStub('Unfinished!'); + return; + } +} + +// [EOF] +?> diff --git a/application/hub/main/cruncher/test/.htaccess b/application/hub/main/cruncher/test/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/application/hub/main/cruncher/test/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/hub/main/cruncher/test/class_HubTestCruncher.php b/application/hub/main/cruncher/test/class_HubTestCruncher.php new file mode 100644 index 000000000..e9929fed8 --- /dev/null +++ b/application/hub/main/cruncher/test/class_HubTestCruncher.php @@ -0,0 +1,87 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 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 HubTestCruncher extends BaseHubCruncher implements CruncherHelper, Registerable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this hub-cruncher class + * + * @param $requestInstance An instance of a Requestable class + * @return $cruncherInstance An instance of this hub-cruncher class + */ + public final static function createHubTestCruncher (Requestable $requestInstance) { + // Get a new instance + $cruncherInstance = new HubTestCruncher(); + + // Set the request instance + $cruncherInstance->setRequestInstance($requestInstance); + + // Return the instance + return $cruncherInstance; + } + + /** + * Method to "bootstrap" the cruncher. This step does also apply provided + * command-line arguments stored in the request instance. The regular cruncher + * should communicate with the bootstrap-crunchers at this point. + * + * @return void + * @todo Implement this method + */ + public function doBootstrapping () { + // Call generic (parent) bootstrapping method first + parent::doGenericBootstrapping(); + $this->partialStub('Please implement this method.'); + } + + /** + * Outputs the console teaser. This should only be executed on startup or + * full restarts. This method generates some space around the teaser. + * + * @return void + */ + public function outputConsoleTeaser () { + $this->partialStub('Please implement this method.'); + } + + /** + * Add some cruncher-specific filters + * + * @return void + */ + public function addExtraHubFilters () { + // Add some filters here + } +} + +// [EOF] +?> diff --git a/application/hub/main/database/wrapper/class_NodeInformationDatabaseWrapper.php b/application/hub/main/database/wrapper/class_NodeInformationDatabaseWrapper.php index 31e85340b..52dc0ff13 100644 --- a/application/hub/main/database/wrapper/class_NodeInformationDatabaseWrapper.php +++ b/application/hub/main/database/wrapper/class_NodeInformationDatabaseWrapper.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/database/wrapper/class_NodeListDatabaseWrapper.php b/application/hub/main/database/wrapper/class_NodeListDatabaseWrapper.php index 3e283ac41..262ced5de 100644 --- a/application/hub/main/database/wrapper/class_NodeListDatabaseWrapper.php +++ b/application/hub/main/database/wrapper/class_NodeListDatabaseWrapper.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/database/wrapper/class_PeerStateLookupDatabaseWrapper.php b/application/hub/main/database/wrapper/class_PeerStateLookupDatabaseWrapper.php index cf27c7844..86d452867 100644 --- a/application/hub/main/database/wrapper/class_PeerStateLookupDatabaseWrapper.php +++ b/application/hub/main/database/wrapper/class_PeerStateLookupDatabaseWrapper.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/decorators/class_BaseDecorator.php b/application/hub/main/decorators/class_BaseDecorator.php index c83722916..0e70696bd 100644 --- a/application/hub/main/decorators/class_BaseDecorator.php +++ b/application/hub/main/decorators/class_BaseDecorator.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/discovery/class_BaseHubDiscovery.php b/application/hub/main/discovery/class_BaseHubDiscovery.php index 2706b4aad..12e5988b0 100644 --- a/application/hub/main/discovery/class_BaseHubDiscovery.php +++ b/application/hub/main/discovery/class_BaseHubDiscovery.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php b/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php index 45e17fa18..85033220f 100644 --- a/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php +++ b/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/discovery/socket/class_PackageSocketDiscovery.php b/application/hub/main/discovery/socket/class_PackageSocketDiscovery.php index e1afb6925..790b5ed50 100644 --- a/application/hub/main/discovery/socket/class_PackageSocketDiscovery.php +++ b/application/hub/main/discovery/socket/class_PackageSocketDiscovery.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/factories/discovery/class_PackageDiscoveryFactory.php b/application/hub/main/factories/discovery/class_PackageDiscoveryFactory.php index c9e653623..644fe28a9 100644 --- a/application/hub/main/factories/discovery/class_PackageDiscoveryFactory.php +++ b/application/hub/main/factories/discovery/class_PackageDiscoveryFactory.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/factories/discovery/class_SocketDiscoveryFactory.php b/application/hub/main/factories/discovery/class_SocketDiscoveryFactory.php index 1a0663fc2..10c2f8cd4 100644 --- a/application/hub/main/factories/discovery/class_SocketDiscoveryFactory.php +++ b/application/hub/main/factories/discovery/class_SocketDiscoveryFactory.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/factories/lists/class_RecipientListFactory.php b/application/hub/main/factories/lists/class_RecipientListFactory.php index 9b589fad2..873e771f3 100644 --- a/application/hub/main/factories/lists/class_RecipientListFactory.php +++ b/application/hub/main/factories/lists/class_RecipientListFactory.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/factories/package/class_NetworkPackageFactory.php b/application/hub/main/factories/package/class_NetworkPackageFactory.php index 9d6bd30eb..d4d5b380a 100644 --- a/application/hub/main/factories/package/class_NetworkPackageFactory.php +++ b/application/hub/main/factories/package/class_NetworkPackageFactory.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/factories/socket/class_SocketFactory.php b/application/hub/main/factories/socket/class_SocketFactory.php index 42a82da7e..acb20afe2 100644 --- a/application/hub/main/factories/socket/class_SocketFactory.php +++ b/application/hub/main/factories/socket/class_SocketFactory.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @todo Find an interface for hub helper diff --git a/application/hub/main/factories/states/class_StateFactory.php b/application/hub/main/factories/states/class_StateFactory.php index 876e1d0f4..66825162b 100644 --- a/application/hub/main/factories/states/class_StateFactory.php +++ b/application/hub/main/factories/states/class_StateFactory.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/factories/states/peer/class_PeerStateFactory.php b/application/hub/main/factories/states/peer/class_PeerStateFactory.php index 7153d4c42..a8db17ac6 100644 --- a/application/hub/main/factories/states/peer/class_PeerStateFactory.php +++ b/application/hub/main/factories/states/peer/class_PeerStateFactory.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/factories/tags/class_PackageTagsFactory.php b/application/hub/main/factories/tags/class_PackageTagsFactory.php index 4d3a80a2e..e39835931 100644 --- a/application/hub/main/factories/tags/class_PackageTagsFactory.php +++ b/application/hub/main/factories/tags/class_PackageTagsFactory.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/activation/class_HubActivation b/application/hub/main/filter/activation/class_HubActivation index 67db3954c..518730959 100644 --- a/application/hub/main/filter/activation/class_HubActivation +++ b/application/hub/main/filter/activation/class_HubActivation @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/activation/class_HubActivationSelfAnnouncementFilter.php b/application/hub/main/filter/activation/class_HubActivationSelfAnnouncementFilter.php index 0f448ff77..4b701ec49 100644 --- a/application/hub/main/filter/activation/class_HubActivationSelfAnnouncementFilter.php +++ b/application/hub/main/filter/activation/class_HubActivationSelfAnnouncementFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/bootstrap/class_HubBootstrap b/application/hub/main/filter/bootstrap/class_HubBootstrap index 5290fe48e..4919c6bc1 100644 --- a/application/hub/main/filter/bootstrap/class_HubBootstrap +++ b/application/hub/main/filter/bootstrap/class_HubBootstrap @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/bootstrap/class_HubBootstrapExtraBootstrappingFilter.php b/application/hub/main/filter/bootstrap/class_HubBootstrapExtraBootstrappingFilter.php index d95c6b988..306a62228 100644 --- a/application/hub/main/filter/bootstrap/class_HubBootstrapExtraBootstrappingFilter.php +++ b/application/hub/main/filter/bootstrap/class_HubBootstrapExtraBootstrappingFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/bootstrap/class_HubBootstrapGenerateHubIdFilter.php b/application/hub/main/filter/bootstrap/class_HubBootstrapGenerateHubIdFilter.php index 9a3f97170..5e62bb1ca 100644 --- a/application/hub/main/filter/bootstrap/class_HubBootstrapGenerateHubIdFilter.php +++ b/application/hub/main/filter/bootstrap/class_HubBootstrapGenerateHubIdFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/bootstrap/class_HubBootstrapGenerateSessionIdFilter.php b/application/hub/main/filter/bootstrap/class_HubBootstrapGenerateSessionIdFilter.php index 9bb32ca9e..53ccfb379 100644 --- a/application/hub/main/filter/bootstrap/class_HubBootstrapGenerateSessionIdFilter.php +++ b/application/hub/main/filter/bootstrap/class_HubBootstrapGenerateSessionIdFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/bootstrap/class_HubBootstrapInitQueuesFilter.php b/application/hub/main/filter/bootstrap/class_HubBootstrapInitQueuesFilter.php index 9ae46cafa..6ea4b86ab 100644 --- a/application/hub/main/filter/bootstrap/class_HubBootstrapInitQueuesFilter.php +++ b/application/hub/main/filter/bootstrap/class_HubBootstrapInitQueuesFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/bootstrap/class_HubBootstrapListenerPoolFilter.php b/application/hub/main/filter/bootstrap/class_HubBootstrapListenerPoolFilter.php index 18cff0718..8000a78ef 100644 --- a/application/hub/main/filter/bootstrap/class_HubBootstrapListenerPoolFilter.php +++ b/application/hub/main/filter/bootstrap/class_HubBootstrapListenerPoolFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/bootstrap/class_HubBootstrapRestoreNodeListFilter.php b/application/hub/main/filter/bootstrap/class_HubBootstrapRestoreNodeListFilter.php index 9270fdbac..a634e0abd 100644 --- a/application/hub/main/filter/bootstrap/class_HubBootstrapRestoreNodeListFilter.php +++ b/application/hub/main/filter/bootstrap/class_HubBootstrapRestoreNodeListFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/class_ b/application/hub/main/filter/class_ index 1c71f95b4..1e190c22d 100644 --- a/application/hub/main/filter/class_ +++ b/application/hub/main/filter/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/console/class_Console b/application/hub/main/filter/console/class_Console index 632d3280a..f551ef47b 100644 --- a/application/hub/main/filter/console/class_Console +++ b/application/hub/main/filter/console/class_Console @@ -1,67 +1,3 @@ - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 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 Console???Filter extends BaseFilter implements Filterable { - /** - * Protected constructor - * - * @return void - */ - protected function __construct () { - // Call parent constructor - parent::__construct(__CLASS__); - } - - /** - * Creates an instance of this filter class - * - * @return $filterInstance An instance of this filter class - */ - public final static function createConsole???Filter () { - // Get a new instance - $filterInstance = new Console???Filter(); - - // Return the instance - return $filterInstance; - } - - /** - * Executes the filter with given request and response objects - * - * @param $requestInstance An instance of a class with an Requestable interface - * @param $responseInstance An instance of a class with an Responseable interface - * @return void - * @throws FilterChainException If $nodeInstance is null (no NullPointerException here) - * @todo 0% done - */ - public function execute (Requestable $requestInstance, Responseable $responseInstance) { - // Get node instance - $nodeInstance = Registry::getRegistry()->getInstance('node'); - - // Implement this! - $this->partialStub('Please implement this method.'); - } -} - -// [EOF] +// @DEPRECATED ?> diff --git a/application/hub/main/filter/console/class_ConsoleWelcomeTeaserFilter.php b/application/hub/main/filter/console/class_ConsoleWelcomeTeaserFilter.php index 34fbfcd80..f551ef47b 100644 --- a/application/hub/main/filter/console/class_ConsoleWelcomeTeaserFilter.php +++ b/application/hub/main/filter/console/class_ConsoleWelcomeTeaserFilter.php @@ -1,66 +1,3 @@ - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 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 ConsoleWelcomeTeaserFilter extends BaseFilter implements Filterable { - /** - * Protected constructor - * - * @return void - */ - protected function __construct () { - // Call parent constructor - parent::__construct(__CLASS__); - } - - /** - * Creates an instance of this filter class - * - * @return $filterInstance An instance of this filter class - */ - public static final function createConsoleWelcomeTeaserFilter () { - // Get a new instance - $filterInstance = new ConsoleWelcomeTeaserFilter(); - - // Return the instance - return $filterInstance; - } - - /** - * Executes the filter with given request and response objects - * - * @param $requestInstance An instance of a class with an Requestable interface - * @param $responseInstance An instance of a class with an Responseable interface - * @return void - * @throws FilterChainException If $nodeInstance is null (no NullPointerException here) - */ - public function execute (Requestable $requestInstance, Responseable $responseInstance) { - // Get node instance - $nodeInstance = Registry::getRegistry()->getInstance('node'); - - // Now output the teaser - $nodeInstance->outputConsoleTeaser(); - } -} - -// [EOF] +// @DEPRECATED ?> diff --git a/application/hub/main/filter/cruncher/.htaccess b/application/hub/main/filter/cruncher/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/application/hub/main/filter/cruncher/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/hub/main/filter/cruncher/class_Cruncher b/application/hub/main/filter/cruncher/class_Cruncher new file mode 100644 index 000000000..cf4eb67cf --- /dev/null +++ b/application/hub/main/filter/cruncher/class_Cruncher @@ -0,0 +1,63 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 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 Cruncher???Filter extends BaseFilter implements Filterable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this filter class + * + * @return $filterInstance An instance of this filter class + */ + public final static function createCruncher???Filter () { + // Get a new instance + $filterInstance = new Cruncher???Filter(); + + // Return the instance + return $filterInstance; + } + + /** + * Executes the filter with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @todo 0% done + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // Implement this! + $this->partialStub('Please implement this method.'); + } +} + +// [EOF] +?> diff --git a/application/hub/main/filter/cruncher/class_CruncherInitializationFilter.php b/application/hub/main/filter/cruncher/class_CruncherInitializationFilter.php new file mode 100644 index 000000000..1c6c9af29 --- /dev/null +++ b/application/hub/main/filter/cruncher/class_CruncherInitializationFilter.php @@ -0,0 +1,97 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 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 CruncherInitializationFilter extends BaseFilter implements Filterable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this filter class + * + * @return $filterInstance An instance of this filter class + */ + public static final function createCruncherInitializationFilter () { + // Get a new instance + $filterInstance = new CruncherInitializationFilter(); + + // Return the instance + return $filterInstance; + } + + /** + * Executes the filter with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @todo 0% done + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // The default cruncher-mode is from our configuration + $cruncherMode = $this->getConfigInstance()->getConfigEntry('cruncher_default_mode'); + + // Is the cruncher 'mode' parameter set? + if ($requestInstance->isRequestElementSet('mode')) { + // Then use this which overrides the config entry temporarily + $cruncherMode = $requestInstance->getRequestElement('mode'); + } else { + // Set it for easier re-usage + $requestInstance->setRequestElement('mode', $cruncherMode); + } + + // Now convert the cruncher-mode in a class name + $className = 'Hub' . $this->convertToClassName($cruncherMode) . 'Cruncher'; + + // And try to instance it + try { + // Get an instance + $cruncherInstance = ObjectFactory::createObjectByName($className, array($requestInstance)); + + // Get a registry + $appInstance = Registry::getRegistry()->getInstance('app'); + + // Set the app instance + $cruncherInstance->setApplicationInstance($appInstance); + + // Add cruncher-specific filters + $cruncherInstance->addExtraFilters($requestInstance, $responseInstance); + } catch (ClassNotFoundException $e) { + // This exception means, the cruncher mode is invalid. + // @TODO Can we rewrite this to app_die() ? + die('Cruncher mode ' . $cruncherMode . ' is invalid.' . "\n"); + } + + // Set the cruncher instance in registry + Registry::getRegistry()->addInstance('cruncher', $cruncherInstance); + } +} + +// [EOF] +?> diff --git a/application/hub/main/filter/cruncher/class_CruncherPhpRequirementsFilter.php b/application/hub/main/filter/cruncher/class_CruncherPhpRequirementsFilter.php new file mode 100644 index 000000000..eeedfba23 --- /dev/null +++ b/application/hub/main/filter/cruncher/class_CruncherPhpRequirementsFilter.php @@ -0,0 +1,78 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 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 CruncherPhpRequirementsFilter extends BaseFilter implements Filterable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this filter class + * + * @return $filterInstance An instance of this filter class + */ + public static final function createCruncherPhpRequirementsFilter () { + // Get a new instance + $filterInstance = new CruncherPhpRequirementsFilter(); + + // Return the instance + return $filterInstance; + } + + /** + * Executes the filter with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @throws FilterChainException If a required PHP function is not available + * @todo Add more test and try to add an extra message to the thrown exception + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // By default, the requirement check is passed and zero checks are failed + $checkPassed = true; + $checksFailed = 0; + + // Socket support is essential... + if (!function_exists('socket_create')) { + // Test failed + $checkPassed = false; + $checksFailed++; + } // END -if + + // Are all tests passed? + if ($checkPassed === false) { + // Throw an exception + throw new FilterChainException($this, self::FILTER_CHAIN_INTERCEPTED); + } // END - if + } +} + +// [EOF] +?> diff --git a/application/hub/main/filter/cruncher/class_CruncherWelcomeTeaserFilter.php b/application/hub/main/filter/cruncher/class_CruncherWelcomeTeaserFilter.php new file mode 100644 index 000000000..77b7bb054 --- /dev/null +++ b/application/hub/main/filter/cruncher/class_CruncherWelcomeTeaserFilter.php @@ -0,0 +1,67 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 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 CruncherWelcomeTeaserFilter extends BaseFilter implements Filterable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this filter class + * + * @return $filterInstance An instance of this filter class + */ + public static final function createCruncherWelcomeTeaserFilter () { + // Get a new instance + $filterInstance = new CruncherWelcomeTeaserFilter(); + + // Return the instance + return $filterInstance; + } + + /** + * Executes the filter with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @throws FilterChainException If $nodeInstance is null (no NullPointerException here) + * @todo Handle over the $responseInstance to outputCruncherTeaser() + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // Get node instance + $cruncherInstance = Registry::getRegistry()->getInstance('cruncher'); + + // Now output the teaser + $cruncherInstance->outputConsoleTeaser(); + } +} + +// [EOF] +?> diff --git a/application/hub/main/filter/node/class_Node b/application/hub/main/filter/node/class_Node index 32521e456..9f1ab2dc9 100644 --- a/application/hub/main/filter/node/class_Node +++ b/application/hub/main/filter/node/class_Node @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/node/class_NodeInitializationFilter.php b/application/hub/main/filter/node/class_NodeInitializationFilter.php index f30c886c9..4abb7d99e 100644 --- a/application/hub/main/filter/node/class_NodeInitializationFilter.php +++ b/application/hub/main/filter/node/class_NodeInitializationFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -55,7 +55,7 @@ class NodeInitializationFilter extends BaseFilter implements Filterable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // The default node-mode is from our configuration - $nodeMode = $this->getConfigInstance()->getConfigEntry('node_mode'); + $nodeMode = $this->getConfigInstance()->getConfigEntry('node_default_mode'); // Is the node 'mode' parameter set? if ($requestInstance->isRequestElementSet('mode')) { diff --git a/application/hub/main/filter/node/class_NodePhpRequirementsFilter.php b/application/hub/main/filter/node/class_NodePhpRequirementsFilter.php index 6afde30b7..d11524e14 100644 --- a/application/hub/main/filter/node/class_NodePhpRequirementsFilter.php +++ b/application/hub/main/filter/node/class_NodePhpRequirementsFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/node/class_NodeWelcomeTeaserFilter.php b/application/hub/main/filter/node/class_NodeWelcomeTeaserFilter.php new file mode 100644 index 000000000..bd94196f2 --- /dev/null +++ b/application/hub/main/filter/node/class_NodeWelcomeTeaserFilter.php @@ -0,0 +1,67 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 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 NodeWelcomeTeaserFilter extends BaseFilter implements Filterable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this filter class + * + * @return $filterInstance An instance of this filter class + */ + public static final function createNodeWelcomeTeaserFilter () { + // Get a new instance + $filterInstance = new NodeWelcomeTeaserFilter(); + + // Return the instance + return $filterInstance; + } + + /** + * Executes the filter with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @throws FilterChainException If $nodeInstance is null (no NullPointerException here) + * @todo Handle over the $responseInstance to outputConsoleTeaser() + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // Get node instance + $nodeInstance = Registry::getRegistry()->getInstance('node'); + + // Now output the teaser + $nodeInstance->outputConsoleTeaser(); + } +} + +// [EOF] +?> diff --git a/application/hub/main/filter/shutdown/.htaccess b/application/hub/main/filter/shutdown/.htaccess index 2effffd3a..3a4288278 100644 --- a/application/hub/main/filter/shutdown/.htaccess +++ b/application/hub/main/filter/shutdown/.htaccess @@ -1,2 +1 @@ Deny from all -Deny from all diff --git a/application/hub/main/filter/shutdown/class_HubShutdown b/application/hub/main/filter/shutdown/class_HubShutdown index caf1a8e65..4612f446d 100644 --- a/application/hub/main/filter/shutdown/class_HubShutdown +++ b/application/hub/main/filter/shutdown/class_HubShutdown @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/shutdown/class_HubShutdownCruncherFilter.php b/application/hub/main/filter/shutdown/class_HubShutdownCruncherFilter.php new file mode 100644 index 000000000..0d8905f5a --- /dev/null +++ b/application/hub/main/filter/shutdown/class_HubShutdownCruncherFilter.php @@ -0,0 +1,68 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 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 HubShutdownCruncherFilter extends BaseFilter implements Filterable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this filter class + * + * @return $filterInstance An instance of this filter class + */ + public static final function createHubShutdownCruncherFilter () { + // Get a new instance + $filterInstance = new HubShutdownCruncherFilter(); + + // Return the instance + return $filterInstance; + } + + /** + * Executes the filter with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @throws FilterChainException If $nodeInstance is null (no NullPointerException please) + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // Get node instance + $cruncherInstance = Registry::getRegistry()->getInstance('cruncher'); + + // Shutdown the cruncher. This should be the last line + $cruncherInstance->doShutdown(); + } +} + +// [EOF] +?> diff --git a/application/hub/main/filter/shutdown/class_HubShutdownDeinitQueuesFilter.php b/application/hub/main/filter/shutdown/class_HubShutdownDeinitQueuesFilter.php index c86f4ca9f..fd6b96e5d 100644 --- a/application/hub/main/filter/shutdown/class_HubShutdownDeinitQueuesFilter.php +++ b/application/hub/main/filter/shutdown/class_HubShutdownDeinitQueuesFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/shutdown/class_HubShutdownFlushNodeListFilter.php b/application/hub/main/filter/shutdown/class_HubShutdownFlushNodeListFilter.php index 100e088c7..10125c803 100644 --- a/application/hub/main/filter/shutdown/class_HubShutdownFlushNodeListFilter.php +++ b/application/hub/main/filter/shutdown/class_HubShutdownFlushNodeListFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/shutdown/class_HubShutdownNodeFilter.php b/application/hub/main/filter/shutdown/class_HubShutdownNodeFilter.php index 96d47564d..56fff83c1 100644 --- a/application/hub/main/filter/shutdown/class_HubShutdownNodeFilter.php +++ b/application/hub/main/filter/shutdown/class_HubShutdownNodeFilter.php @@ -6,7 +6,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/shutdown/class_HubShutdownTaskHandlerFilter.php b/application/hub/main/filter/shutdown/class_HubShutdownTaskHandlerFilter.php index 7bac0c1c2..f377c82d9 100644 --- a/application/hub/main/filter/shutdown/class_HubShutdownTaskHandlerFilter.php +++ b/application/hub/main/filter/shutdown/class_HubShutdownTaskHandlerFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/task/class_CruncherTaskHandlerInitializerFilter.php b/application/hub/main/filter/task/class_CruncherTaskHandlerInitializerFilter.php new file mode 100644 index 000000000..895223257 --- /dev/null +++ b/application/hub/main/filter/task/class_CruncherTaskHandlerInitializerFilter.php @@ -0,0 +1,70 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Cruncher 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 CruncherTaskHandlerInitializerFilter extends BaseFilter implements Filterable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this filter class + * + * @return $filterInstance An instance of this filter class + */ + public static final function createCruncherTaskHandlerInitializerFilter () { + // Get a new instance + $filterInstance = new CruncherTaskHandlerInitializerFilter(); + + // Return the instance + return $filterInstance; + } + + /** + * Executes the filter with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @throws FilterChainException If we need to interrupt the filter chain + * @todo 0% done + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // Get cruncher instance + //$cruncherInstance = Registry::getRegistry()->getInstance('cruncher'); + + // Get a new task handler instance + $handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class'); + + // Put the task handler in registry + Registry::getRegistry()->addInstance('task', $handlerInstance); + } +} + +// [EOF] +?> diff --git a/application/hub/main/filter/task/class_HubTaskHandlerInitializerFilter.php b/application/hub/main/filter/task/class_HubTaskHandlerInitializerFilter.php new file mode 100644 index 000000000..dd60c8333 --- /dev/null +++ b/application/hub/main/filter/task/class_HubTaskHandlerInitializerFilter.php @@ -0,0 +1,112 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 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 HubTaskHandlerInitializerFilter extends BaseFilter implements Filterable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this filter class + * + * @return $filterInstance An instance of this filter class + */ + public static final function createHubTaskHandlerInitializerFilter () { + // Get a new instance + $filterInstance = new HubTaskHandlerInitializerFilter(); + + // Return the instance + return $filterInstance; + } + + /** + * Executes the filter with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @throws FilterChainException If we need to interrupt the filter chain + * @todo 0% done + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // Get node instance + $nodeInstance = Registry::getRegistry()->getInstance('node'); + + // Get a new task handler instance + $handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class'); + + // Generate idle task + $taskInstance = ObjectFactory::createObjectByConfiguredName('idle_task_class'); + + // Register it as well + $handlerInstance->registerTask('idle_loop', $taskInstance); + + // Network package reader, needs to be delayed a little + $handlerInstance->registerTask('network_package_reader', $nodeInstance->getListenerPoolInstance()); + + // Generate package writer task + $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_package_writer_task_class'); + + // Register it as well + $handlerInstance->registerTask('network_package_writer', $taskInstance); + + // Query handler instance + $handlerInstance->registerTask('query_handler', $nodeInstance->getQueryConnectorInstance()); + + // Queue handler instance + $handlerInstance->registerTask('queue_handler', $nodeInstance->getQueueConnectorInstance()); + + // Prepare a self-test task for the listeners + $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_selfconnect_task_class'); + + // Register it + $handlerInstance->registerTask('self_connect', $taskInstance); + + // Prepare a update-check task + $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_update_check_task_class'); + + // Register it + $handlerInstance->registerTask('update_check', $taskInstance); + + // Get the list instance here + $listInstance = $nodeInstance->getListenerPoolInstance()->getPoolEntriesInstance(); + + // Prepare a ping task + $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_ping_task_class', array($listInstance)); + + // Register it + $handlerInstance->registerTask('ping', $taskInstance); + + // Put the task handler in registry + Registry::getRegistry()->addInstance('task', $handlerInstance); + } +} + +// [EOF] +?> diff --git a/application/hub/main/filter/task/class_TaskHandlerInitializerFilter.php b/application/hub/main/filter/task/class_TaskHandlerInitializerFilter.php index 6ea240d01..f551ef47b 100644 --- a/application/hub/main/filter/task/class_TaskHandlerInitializerFilter.php +++ b/application/hub/main/filter/task/class_TaskHandlerInitializerFilter.php @@ -1,112 +1,3 @@ - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 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 TaskHandlerInitializerFilter extends BaseFilter implements Filterable { - /** - * Protected constructor - * - * @return void - */ - protected function __construct () { - // Call parent constructor - parent::__construct(__CLASS__); - } - - /** - * Creates an instance of this filter class - * - * @return $filterInstance An instance of this filter class - */ - public static final function createTaskHandlerInitializerFilter () { - // Get a new instance - $filterInstance = new TaskHandlerInitializerFilter(); - - // Return the instance - return $filterInstance; - } - - /** - * Executes the filter with given request and response objects - * - * @param $requestInstance An instance of a class with an Requestable interface - * @param $responseInstance An instance of a class with an Responseable interface - * @return void - * @throws FilterChainException If we need to interrupt the filter chain - * @todo 0% done - */ - public function execute (Requestable $requestInstance, Responseable $responseInstance) { - // Get node instance - $nodeInstance = Registry::getRegistry()->getInstance('node'); - - // Get a new task handler instance - $handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class'); - - // Generate idle task - $taskInstance = ObjectFactory::createObjectByConfiguredName('idle_task_class'); - - // Register it as well - $handlerInstance->registerTask('idle_loop', $taskInstance); - - // Network package reader, needs to be delayed a little - $handlerInstance->registerTask('network_package_reader', $nodeInstance->getListenerPoolInstance()); - - // Generate package writer task - $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_package_writer_task_class'); - - // Register it as well - $handlerInstance->registerTask('network_package_writer', $taskInstance); - - // Query handler instance - $handlerInstance->registerTask('query_handler', $nodeInstance->getQueryConnectorInstance()); - - // Queue handler instance - $handlerInstance->registerTask('queue_handler', $nodeInstance->getQueueConnectorInstance()); - - // Put the task handler in registry - Registry::getRegistry()->addInstance('task', $handlerInstance); - - // Prepare a self-test task for the listeners - $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_selfconnect_task_class'); - - // Register it - $handlerInstance->registerTask('self_connect', $taskInstance); - - // Prepare a update-check task - $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_update_check_task_class'); - - // Register it - $handlerInstance->registerTask('update_check', $taskInstance); - - // Get the list instance here - $listInstance = $nodeInstance->getListenerPoolInstance()->getPoolEntriesInstance(); - - // Prepare a ping task - $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_ping_task_class', array($listInstance)); - - // Register it - $handlerInstance->registerTask('ping', $taskInstance); - } -} - -// [EOF] +// @DEPRECATED ?> diff --git a/application/hub/main/handler/class_ b/application/hub/main/handler/class_ index 47907fa8b..e268407c6 100644 --- a/application/hub/main/handler/class_ +++ b/application/hub/main/handler/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/handler/class_BaseHandler.php b/application/hub/main/handler/class_BaseHandler.php index 053bf6d2a..598365454 100644 --- a/application/hub/main/handler/class_BaseHandler.php +++ b/application/hub/main/handler/class_BaseHandler.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/handler/network/class_ b/application/hub/main/handler/network/class_ index 07ba117ae..0cf8c784f 100644 --- a/application/hub/main/handler/network/class_ +++ b/application/hub/main/handler/network/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/handler/network/class_BaseNetworkPackageHandler.php b/application/hub/main/handler/network/class_BaseNetworkPackageHandler.php index ef0946f5c..6f910f276 100644 --- a/application/hub/main/handler/network/class_BaseNetworkPackageHandler.php +++ b/application/hub/main/handler/network/class_BaseNetworkPackageHandler.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/handler/network/tcp/class_ b/application/hub/main/handler/network/tcp/class_ index 2f6eab468..8ebc585cd 100644 --- a/application/hub/main/handler/network/tcp/class_ +++ b/application/hub/main/handler/network/tcp/class_ @@ -138,7 +138,7 @@ socket_close($mainSocket); * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/handler/network/tcp/class_TcpNetworkPackageHandler.php b/application/hub/main/handler/network/tcp/class_TcpNetworkPackageHandler.php index bab7eefdd..0a6d3cbab 100644 --- a/application/hub/main/handler/network/tcp/class_TcpNetworkPackageHandler.php +++ b/application/hub/main/handler/network/tcp/class_TcpNetworkPackageHandler.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/handler/network/udp/class_UdpNetworkPackageHandler.php b/application/hub/main/handler/network/udp/class_UdpNetworkPackageHandler.php index 058dfbd8f..60f6fbe47 100644 --- a/application/hub/main/handler/network/udp/class_UdpNetworkPackageHandler.php +++ b/application/hub/main/handler/network/udp/class_UdpNetworkPackageHandler.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/handler/tasks/class_TaskHandler.php b/application/hub/main/handler/tasks/class_TaskHandler.php index 5d3e3bceb..7a267f9e3 100644 --- a/application/hub/main/handler/tasks/class_TaskHandler.php +++ b/application/hub/main/handler/tasks/class_TaskHandler.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/helper/connection/class_BaseConnectionHelper.php b/application/hub/main/helper/connection/class_BaseConnectionHelper.php index a5d427bde..0f2ffcc01 100644 --- a/application/hub/main/helper/connection/class_BaseConnectionHelper.php +++ b/application/hub/main/helper/connection/class_BaseConnectionHelper.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -140,8 +140,16 @@ class BaseConnectionHelper extends BaseHubHelper implements Registerable, Protoc } /** - * "Getter" for raw package data from a package array. This method does - * honor any unsend bytes in the back-buffer and the sending buffer size. + * "Getter" for raw data from a package array. A fragmenter is used which + * will returns us only so many raw data which fits into the back buffer. + * The rest is being held in a back-buffer and waits there for the next + * cycle and while be then sent. This is done by a FIFO. + * + * This method does 4 simple steps: + * 1) Aquire fragmenter object instance from the factory + * 2) Handle over the package data array to the fragmenter + * 3) Request a chunk (which "pops" the chunk from the fragmenter's FIFO) + * 4) Finally return the chunk to the caller * * @param $packageData Raw package data array * @return $rawData Raw package data bytes @@ -149,7 +157,14 @@ class BaseConnectionHelper extends BaseHubHelper implements Registerable, Protoc private function getRawDataFromPackageArray (array $packageData) { // Get the fragmenter instance $fragmenterInstance = ObjectFactory::createObjectByConfiguredName('package_fragmenter_class'); - $fragmenterInstance->debugInstance(); + + // Implode the package data array and fragement the resulting string + $fragmenterInstance->fragmentPackageArray($packageData, $this); + + // Get the next raw data chunk from the fragmenter's FIFO + $rawData = $fragmenterInstance->getNextRawDataChunk($packageData); + /* DEBUG: */ $this->debugOutput('rawData['.strlen($rawData).']='.$rawData); + /* DEBUG: */ die(); // Return it return $rawData; @@ -163,7 +178,7 @@ class BaseConnectionHelper extends BaseHubHelper implements Registerable, Protoc * @throws InvalidSocketException If we got a problem with this socket */ public function sendRawPackageData (array $packageData) { - // We need to "package" all data. This is done by a implode() + // Convert the package data array to a raw data stream $rawData = $this->getRawDataFromPackageArray($packageData); // Get socket resource diff --git a/application/hub/main/helper/connection/tcp/class_TcpConnectionHelper.php b/application/hub/main/helper/connection/tcp/class_TcpConnectionHelper.php index 76e50c81b..0a820872f 100644 --- a/application/hub/main/helper/connection/tcp/class_TcpConnectionHelper.php +++ b/application/hub/main/helper/connection/tcp/class_TcpConnectionHelper.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @todo Find an interface for hub helper diff --git a/application/hub/main/helper/connection/udp/class_UdpConnectionHelper.php b/application/hub/main/helper/connection/udp/class_UdpConnectionHelper.php index f4da32703..0e70ca2c9 100644 --- a/application/hub/main/helper/connection/udp/class_UdpConnectionHelper.php +++ b/application/hub/main/helper/connection/udp/class_UdpConnectionHelper.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @todo Find an interface for hub helper diff --git a/application/hub/main/helper/hub/announcement/class_HubDescriptorHelper.php b/application/hub/main/helper/hub/announcement/class_HubDescriptorHelper.php index 9aa6dfaa4..87f35e7f2 100644 --- a/application/hub/main/helper/hub/announcement/class_HubDescriptorHelper.php +++ b/application/hub/main/helper/hub/announcement/class_HubDescriptorHelper.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @todo Find an interface for hub helper diff --git a/application/hub/main/helper/hub/class_ b/application/hub/main/helper/hub/class_ index e8efbe6df..806c4c805 100644 --- a/application/hub/main/helper/hub/class_ +++ b/application/hub/main/helper/hub/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @todo Find an interface for hub helper diff --git a/application/hub/main/helper/hub/class_BaseHubHelper.php b/application/hub/main/helper/hub/class_BaseHubHelper.php index a27bbdc79..0767e1f91 100644 --- a/application/hub/main/helper/hub/class_BaseHubHelper.php +++ b/application/hub/main/helper/hub/class_BaseHubHelper.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/helper/hub/connection/class_HubSelfConnectHelper.php b/application/hub/main/helper/hub/connection/class_HubSelfConnectHelper.php index c1e00ff7b..dee29469c 100644 --- a/application/hub/main/helper/hub/connection/class_HubSelfConnectHelper.php +++ b/application/hub/main/helper/hub/connection/class_HubSelfConnectHelper.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @todo Find an interface for hub helper diff --git a/application/hub/main/iterator/class_ b/application/hub/main/iterator/class_ index 0c43c5ded..e3b1ffd2b 100644 --- a/application/hub/main/iterator/class_ +++ b/application/hub/main/iterator/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/iterator/class_BaseIterator.php b/application/hub/main/iterator/class_BaseIterator.php index ed842d1f9..78583146a 100644 --- a/application/hub/main/iterator/class_BaseIterator.php +++ b/application/hub/main/iterator/class_BaseIterator.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/iterator/hub/class_HubPingIterator.php b/application/hub/main/iterator/hub/class_HubPingIterator.php index 3073969d2..206bf5f82 100644 --- a/application/hub/main/iterator/hub/class_HubPingIterator.php +++ b/application/hub/main/iterator/hub/class_HubPingIterator.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/iterator/network/class_NetworkListenIterator.php b/application/hub/main/iterator/network/class_NetworkListenIterator.php index 64b57304d..e451c0a80 100644 --- a/application/hub/main/iterator/network/class_NetworkListenIterator.php +++ b/application/hub/main/iterator/network/class_NetworkListenIterator.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @todo This current implementation is not recommended, use a diff --git a/application/hub/main/iterator/pool/class_DefaultIterator.php b/application/hub/main/iterator/pool/class_DefaultIterator.php index 6fcbf841d..1551b0a75 100644 --- a/application/hub/main/iterator/pool/class_DefaultIterator.php +++ b/application/hub/main/iterator/pool/class_DefaultIterator.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/iterator/pool/handler/class_Handler b/application/hub/main/iterator/pool/handler/class_Handler index a356fc0ac..5deef057d 100644 --- a/application/hub/main/iterator/pool/handler/class_Handler +++ b/application/hub/main/iterator/pool/handler/class_Handler @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/iterator/pool/handler/class_HandlerPoolIterator.php b/application/hub/main/iterator/pool/handler/class_HandlerPoolIterator.php index 0e0251b5d..f64651024 100644 --- a/application/hub/main/iterator/pool/handler/class_HandlerPoolIterator.php +++ b/application/hub/main/iterator/pool/handler/class_HandlerPoolIterator.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @todo This current implementation is not recommended, use a diff --git a/application/hub/main/iterator/pool/shutdown/class_Shutdown b/application/hub/main/iterator/pool/shutdown/class_Shutdown index 5aad3b526..f8202e56b 100644 --- a/application/hub/main/iterator/pool/shutdown/class_Shutdown +++ b/application/hub/main/iterator/pool/shutdown/class_Shutdown @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/iterator/pool/shutdown/class_ShutdownPoolIterator.php b/application/hub/main/iterator/pool/shutdown/class_ShutdownPoolIterator.php index 6977ff984..e1081bb1a 100644 --- a/application/hub/main/iterator/pool/shutdown/class_ShutdownPoolIterator.php +++ b/application/hub/main/iterator/pool/shutdown/class_ShutdownPoolIterator.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/iterator/pool/tasks/class_TaskPoolIterator.php b/application/hub/main/iterator/pool/tasks/class_TaskPoolIterator.php index bc129c14e..3cee6a26d 100644 --- a/application/hub/main/iterator/pool/tasks/class_TaskPoolIterator.php +++ b/application/hub/main/iterator/pool/tasks/class_TaskPoolIterator.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @todo This current implementation is not recommended, use a diff --git a/application/hub/main/listener/class_ b/application/hub/main/listener/class_ index 031484049..d8b77d2b0 100644 --- a/application/hub/main/listener/class_ +++ b/application/hub/main/listener/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/listener/class_BaseListener.php b/application/hub/main/listener/class_BaseListener.php index 5270a83d4..97736134f 100644 --- a/application/hub/main/listener/class_BaseListener.php +++ b/application/hub/main/listener/class_BaseListener.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/listener/class_BaseListenerDecorator.php b/application/hub/main/listener/class_BaseListenerDecorator.php index 68fd99454..ee2c0a498 100644 --- a/application/hub/main/listener/class_BaseListenerDecorator.php +++ b/application/hub/main/listener/class_BaseListenerDecorator.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/listener/tcp/class_ b/application/hub/main/listener/tcp/class_ index 2f6eab468..8ebc585cd 100644 --- a/application/hub/main/listener/tcp/class_ +++ b/application/hub/main/listener/tcp/class_ @@ -138,7 +138,7 @@ socket_close($mainSocket); * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/listener/tcp/class_TcpListener.php b/application/hub/main/listener/tcp/class_TcpListener.php index a040861db..b2325c418 100644 --- a/application/hub/main/listener/tcp/class_TcpListener.php +++ b/application/hub/main/listener/tcp/class_TcpListener.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/listener/tcp/decorators/class_HubTcpListenerDecorator.php b/application/hub/main/listener/tcp/decorators/class_HubTcpListenerDecorator.php index a02b5fcbc..6b8184894 100644 --- a/application/hub/main/listener/tcp/decorators/class_HubTcpListenerDecorator.php +++ b/application/hub/main/listener/tcp/decorators/class_HubTcpListenerDecorator.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/listener/tcp/decorators/class_PeerTcpListenerDecorator.php b/application/hub/main/listener/tcp/decorators/class_PeerTcpListenerDecorator.php index 35fdbbd5a..fbcbaaa66 100644 --- a/application/hub/main/listener/tcp/decorators/class_PeerTcpListenerDecorator.php +++ b/application/hub/main/listener/tcp/decorators/class_PeerTcpListenerDecorator.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/listener/udp/class_ b/application/hub/main/listener/udp/class_ index 16fda4749..e505b366e 100644 --- a/application/hub/main/listener/udp/class_ +++ b/application/hub/main/listener/udp/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/listener/udp/class_UdpListener.php b/application/hub/main/listener/udp/class_UdpListener.php index 04c791eed..df27bf096 100644 --- a/application/hub/main/listener/udp/class_UdpListener.php +++ b/application/hub/main/listener/udp/class_UdpListener.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/listener/udp/decorators/class_HubUdpListenerDecorator.php b/application/hub/main/listener/udp/decorators/class_HubUdpListenerDecorator.php index 374c188a7..9a611351f 100644 --- a/application/hub/main/listener/udp/decorators/class_HubUdpListenerDecorator.php +++ b/application/hub/main/listener/udp/decorators/class_HubUdpListenerDecorator.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/listener/udp/decorators/class_PeerUdpListenerDecorator.php b/application/hub/main/listener/udp/decorators/class_PeerUdpListenerDecorator.php index c5b8a70cd..6459dd2e5 100644 --- a/application/hub/main/listener/udp/decorators/class_PeerUdpListenerDecorator.php +++ b/application/hub/main/listener/udp/decorators/class_PeerUdpListenerDecorator.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/lists/class_ b/application/hub/main/lists/class_ index 453cb0df0..6e1f5c201 100644 --- a/application/hub/main/lists/class_ +++ b/application/hub/main/lists/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/lists/class_BaseList.php b/application/hub/main/lists/class_BaseList.php index da036a52d..979a45a42 100644 --- a/application/hub/main/lists/class_BaseList.php +++ b/application/hub/main/lists/class_BaseList.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/lists/groups/class_ListGroupList.php b/application/hub/main/lists/groups/class_ListGroupList.php index 79a164da5..ae59c8d50 100644 --- a/application/hub/main/lists/groups/class_ListGroupList.php +++ b/application/hub/main/lists/groups/class_ListGroupList.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/lists/hub/class_HubList.php b/application/hub/main/lists/hub/class_HubList.php index 81efbc01c..3fb84610e 100644 --- a/application/hub/main/lists/hub/class_HubList.php +++ b/application/hub/main/lists/hub/class_HubList.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/lists/pool/class_PoolEntriesList.php b/application/hub/main/lists/pool/class_PoolEntriesList.php index 217dd456d..abfe38238 100644 --- a/application/hub/main/lists/pool/class_PoolEntriesList.php +++ b/application/hub/main/lists/pool/class_PoolEntriesList.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/lists/query/local/class_LocalQueryList.php b/application/hub/main/lists/query/local/class_LocalQueryList.php index a0f49db5a..b07f2ed3e 100644 --- a/application/hub/main/lists/query/local/class_LocalQueryList.php +++ b/application/hub/main/lists/query/local/class_LocalQueryList.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/lists/recipient/class_RecipientList.php b/application/hub/main/lists/recipient/class_RecipientList.php index 0c233cc52..1f58106ff 100644 --- a/application/hub/main/lists/recipient/class_RecipientList.php +++ b/application/hub/main/lists/recipient/class_RecipientList.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/lists/tasks/class_TaskList.php b/application/hub/main/lists/tasks/class_TaskList.php index 8eb3168ab..fb190ebbc 100644 --- a/application/hub/main/lists/tasks/class_TaskList.php +++ b/application/hub/main/lists/tasks/class_TaskList.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/lookup/class_ b/application/hub/main/lookup/class_ index f54be04e2..3646b7f85 100644 --- a/application/hub/main/lookup/class_ +++ b/application/hub/main/lookup/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/lookup/class_BaseLookupTable.php b/application/hub/main/lookup/class_BaseLookupTable.php index 07318c88b..fe32094f7 100644 --- a/application/hub/main/lookup/class_BaseLookupTable.php +++ b/application/hub/main/lookup/class_BaseLookupTable.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/lookup/peer/class_PeerStateLookupTable.php b/application/hub/main/lookup/peer/class_PeerStateLookupTable.php index afc3654c7..068d588a5 100644 --- a/application/hub/main/lookup/peer/class_PeerStateLookupTable.php +++ b/application/hub/main/lookup/peer/class_PeerStateLookupTable.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/nodes/boot/class_HubBootNode.php b/application/hub/main/nodes/boot/class_HubBootNode.php index 4fedde61c..54e03aa74 100644 --- a/application/hub/main/nodes/boot/class_HubBootNode.php +++ b/application/hub/main/nodes/boot/class_HubBootNode.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -121,5 +121,5 @@ class HubBootNode extends BaseHubNode implements NodeHelper, Registerable { } } -// +// [EOF] ?> diff --git a/application/hub/main/nodes/class_ b/application/hub/main/nodes/class_ index 02a4cbd63..b4c03464f 100644 --- a/application/hub/main/nodes/class_ +++ b/application/hub/main/nodes/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -83,5 +83,5 @@ class Hub???Node extends BaseHubNode implements NodeHelper, Registerable { } } -// +// [EOF] ?> diff --git a/application/hub/main/nodes/class_BaseHubNode.php b/application/hub/main/nodes/class_BaseHubNode.php index 5248acb5a..c46b4a5c6 100644 --- a/application/hub/main/nodes/class_BaseHubNode.php +++ b/application/hub/main/nodes/class_BaseHubNode.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -294,7 +294,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable { // Output all lines $this->debugOutput(' '); $this->debugOutput($app->getAppName() . ' v' . $app->getAppVersion() . ' - ' . $this->getRequestInstance()->getRequestElement('mode') . ' mode active'); - $this->debugOutput('Copyright (c) 2007 - 2008 Roland Haeder, 2009, 2010 Hub Developer Team'); + $this->debugOutput('Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2011 Hub Developer Team'); $this->debugOutput(' '); $this->debugOutput('This program comes with ABSOLUTELY NO WARRANTY; for details see docs/COPYING.'); $this->debugOutput('This is free software, and you are welcome to redistribute it under certain'); diff --git a/application/hub/main/nodes/list/class_HubListNode.php b/application/hub/main/nodes/list/class_HubListNode.php index 3b40d8290..26782ed73 100644 --- a/application/hub/main/nodes/list/class_HubListNode.php +++ b/application/hub/main/nodes/list/class_HubListNode.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -93,5 +93,5 @@ class HubListNode extends BaseHubNode implements NodeHelper, Registerable { } } -// +// [EOF] ?> diff --git a/application/hub/main/nodes/master/class_HubMasterNode.php b/application/hub/main/nodes/master/class_HubMasterNode.php index 155ea74df..392c15f10 100644 --- a/application/hub/main/nodes/master/class_HubMasterNode.php +++ b/application/hub/main/nodes/master/class_HubMasterNode.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -93,5 +93,5 @@ class HubMasterNode extends BaseHubNode implements NodeHelper, Registerable { } } -// +// [EOF] ?> diff --git a/application/hub/main/nodes/regular/class_HubRegularNode.php b/application/hub/main/nodes/regular/class_HubRegularNode.php index 6bc3290e2..201e250cf 100644 --- a/application/hub/main/nodes/regular/class_HubRegularNode.php +++ b/application/hub/main/nodes/regular/class_HubRegularNode.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -93,5 +93,5 @@ class HubRegularNode extends BaseHubNode implements NodeHelper, Registerable { } } -// +// [EOF] ?> diff --git a/application/hub/main/package/class_NetworkPackage.php b/application/hub/main/package/class_NetworkPackage.php index 165e74ecc..f05cb921a 100644 --- a/application/hub/main/package/class_NetworkPackage.php +++ b/application/hub/main/package/class_NetworkPackage.php @@ -16,7 +16,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @todo Needs to add functionality for handling the object's type diff --git a/application/hub/main/package/fragmenter/class_PackageFragmenter.php b/application/hub/main/package/fragmenter/class_PackageFragmenter.php index 2986b8c17..1d221578e 100644 --- a/application/hub/main/package/fragmenter/class_PackageFragmenter.php +++ b/application/hub/main/package/fragmenter/class_PackageFragmenter.php @@ -7,7 +7,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -47,6 +47,28 @@ class PackageFragmenter extends BaseFrameworkSystem implements Fragmentable { // Return the prepared instance return $fragmenterInstance; } + + /** + * This method does "implode" the given package data array into one long + * string, splits it into small chunks, adds a serial number and checksum + * to all chunks and prepends a final hashsum chunk. + * + * @param $packageData Raw package data array + * @param $connectionInstance A helper instance for connections + * @return void + */ + public function fragmentPackageArray (array $packageData, BaseconnectionInstance $connectionInstance) { + } + + /** + * This method gets the next chunk from the internal FIFO which should be + * sent to the given recipient. + * + * @param $packageData Raw package data array + * @return $rawDataChunk Raw package data chunk + */ + public function getNextRawDataChunk (array $packageData) { + } } // [EOF] diff --git a/application/hub/main/pools/class_ b/application/hub/main/pools/class_ index cf78a8c34..7d870e017 100644 --- a/application/hub/main/pools/class_ +++ b/application/hub/main/pools/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/pools/class_BasePool.php b/application/hub/main/pools/class_BasePool.php index f3e9d9c63..26178b84c 100644 --- a/application/hub/main/pools/class_BasePool.php +++ b/application/hub/main/pools/class_BasePool.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/pools/listener/class_DefaultListenerPool.php b/application/hub/main/pools/listener/class_DefaultListenerPool.php index 332ce5a0e..46c623099 100644 --- a/application/hub/main/pools/listener/class_DefaultListenerPool.php +++ b/application/hub/main/pools/listener/class_DefaultListenerPool.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/pools/peer/class_DefaultPeerPool.php b/application/hub/main/pools/peer/class_DefaultPeerPool.php index 166d5d95e..d57a7f224 100644 --- a/application/hub/main/pools/peer/class_DefaultPeerPool.php +++ b/application/hub/main/pools/peer/class_DefaultPeerPool.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/queries/class_ b/application/hub/main/queries/class_ index 22f13e8d3..991787ac5 100644 --- a/application/hub/main/queries/class_ +++ b/application/hub/main/queries/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/queries/class_BaseQuery.php b/application/hub/main/queries/class_BaseQuery.php index e7a7a9441..b158d0079 100644 --- a/application/hub/main/queries/class_BaseQuery.php +++ b/application/hub/main/queries/class_BaseQuery.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/queries/local/class_LocalQuery.php b/application/hub/main/queries/local/class_LocalQuery.php index b4189b714..db40d0c95 100644 --- a/application/hub/main/queries/local/class_LocalQuery.php +++ b/application/hub/main/queries/local/class_LocalQuery.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/queues/class_ b/application/hub/main/queues/class_ index 683076dec..70060b88e 100644 --- a/application/hub/main/queues/class_ +++ b/application/hub/main/queues/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/queues/class_BaseQueue.php b/application/hub/main/queues/class_BaseQueue.php index e8de605ca..cd4fd1506 100644 --- a/application/hub/main/queues/class_BaseQueue.php +++ b/application/hub/main/queues/class_BaseQueue.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/queues/peer/class_LocalPeerQueue.php b/application/hub/main/queues/peer/class_LocalPeerQueue.php index d854de877..e095b0fdf 100644 --- a/application/hub/main/queues/peer/class_LocalPeerQueue.php +++ b/application/hub/main/queues/peer/class_LocalPeerQueue.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/registry/objects/class_ObjectTypeRegistry.php b/application/hub/main/registry/objects/class_ObjectTypeRegistry.php index 06cff654c..4dd5b4df6 100644 --- a/application/hub/main/registry/objects/class_ObjectTypeRegistry.php +++ b/application/hub/main/registry/objects/class_ObjectTypeRegistry.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/registry/socket/class_SocketRegistry.php b/application/hub/main/registry/socket/class_SocketRegistry.php index 73f3dd4ce..a51f80e26 100644 --- a/application/hub/main/registry/socket/class_SocketRegistry.php +++ b/application/hub/main/registry/socket/class_SocketRegistry.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/resolver/command/console/class_HubConsoleCommandResolver.php b/application/hub/main/resolver/command/console/class_HubConsoleCommandResolver.php index 19811af95..5c7b74207 100644 --- a/application/hub/main/resolver/command/console/class_HubConsoleCommandResolver.php +++ b/application/hub/main/resolver/command/console/class_HubConsoleCommandResolver.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -22,11 +22,6 @@ * along with this program. If not, see . */ class HubConsoleCommandResolver extends BaseCommandResolver implements CommandResolver { - /** - * Last successfull resolved command - */ - private $lastCommandInstance = null; - /** * Protected constructor * @@ -37,7 +32,7 @@ class HubConsoleCommandResolver extends BaseCommandResolver implements CommandRe parent::__construct(__CLASS__); // Set prefix to "HubConsole" - $this->setCommandPrefix("HubConsole"); + $this->setClassPrefix('HubConsole'); } /** @@ -107,7 +102,7 @@ class HubConsoleCommandResolver extends BaseCommandResolver implements CommandRe } // END - if // Set last command - $this->lastCommandInstance = $commandInstance; + $this->setResolvedInstance($commandInstance); // Return the resolved command instance return $commandInstance; diff --git a/application/hub/main/resolver/controller/console/class_HubConsoleControllerResolver.php b/application/hub/main/resolver/controller/console/class_HubConsoleControllerResolver.php index 8040af11b..62030a930 100644 --- a/application/hub/main/resolver/controller/console/class_HubConsoleControllerResolver.php +++ b/application/hub/main/resolver/controller/console/class_HubConsoleControllerResolver.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -22,16 +22,6 @@ * along with this program. If not, see . */ class HubConsoleControllerResolver extends BaseControllerResolver implements ControllerResolver { - /** - * Last successfull resolved controller (name) - */ - private $lastControllerName = ''; - - /** - * Last successfull resolved controller (instance) - */ - private $lastControllerInstance = null; - /** * Protected constructor * @@ -42,7 +32,7 @@ class HubConsoleControllerResolver extends BaseControllerResolver implements Con parent::__construct(__CLASS__); // Set prefix to "HubConsole" - $this->setControllerPrefix('HubConsole'); + $this->setClassPrefix('HubConsole'); } /** @@ -103,7 +93,7 @@ class HubConsoleControllerResolver extends BaseControllerResolver implements Con } // END - if // Set last controller - $this->lastControllerInstance = $controllerInstance; + $this->setResolvedInstance($controllerInstance); // Return the maybe resolved instance return $controllerInstance; diff --git a/application/hub/main/resolver/state/class_BaseStateResolver.php b/application/hub/main/resolver/state/class_BaseStateResolver.php index c74170509..98736b3d4 100644 --- a/application/hub/main/resolver/state/class_BaseStateResolver.php +++ b/application/hub/main/resolver/state/class_BaseStateResolver.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/resolver/state/network/class_NetworkStateResolver.php b/application/hub/main/resolver/state/network/class_NetworkStateResolver.php index 25639a695..fc9ed7507 100644 --- a/application/hub/main/resolver/state/network/class_NetworkStateResolver.php +++ b/application/hub/main/resolver/state/network/class_NetworkStateResolver.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/states/class_ b/application/hub/main/states/class_ index f83cbf34f..aa0c0ef9e 100644 --- a/application/hub/main/states/class_ +++ b/application/hub/main/states/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/states/class_BaseState.php b/application/hub/main/states/class_BaseState.php index 615004980..bdb26830b 100644 --- a/application/hub/main/states/class_BaseState.php +++ b/application/hub/main/states/class_BaseState.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/states/hub/class_BaseHubState.php b/application/hub/main/states/hub/class_BaseHubState.php index e49d6a326..12ca467f1 100644 --- a/application/hub/main/states/hub/class_BaseHubState.php +++ b/application/hub/main/states/hub/class_BaseHubState.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/states/node/active/class_NodeActiveState.php b/application/hub/main/states/node/active/class_NodeActiveState.php index ff9c9e7ca..516eed987 100644 --- a/application/hub/main/states/node/active/class_NodeActiveState.php +++ b/application/hub/main/states/node/active/class_NodeActiveState.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/states/node/announced/class_NodeAnnouncedState.php b/application/hub/main/states/node/announced/class_NodeAnnouncedState.php index 4a7b6f23c..263ad0dc1 100644 --- a/application/hub/main/states/node/announced/class_NodeAnnouncedState.php +++ b/application/hub/main/states/node/announced/class_NodeAnnouncedState.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/states/node/class_ b/application/hub/main/states/node/class_ index f19ed1d87..6b6491d01 100644 --- a/application/hub/main/states/node/class_ +++ b/application/hub/main/states/node/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/states/node/class_BaseNodeState.php b/application/hub/main/states/node/class_BaseNodeState.php index 941be5162..6b37c14d5 100644 --- a/application/hub/main/states/node/class_BaseNodeState.php +++ b/application/hub/main/states/node/class_BaseNodeState.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/states/node/init/class_NodeInitState.php b/application/hub/main/states/node/init/class_NodeInitState.php index 5c0fdd214..3312c34e9 100644 --- a/application/hub/main/states/node/init/class_NodeInitState.php +++ b/application/hub/main/states/node/init/class_NodeInitState.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/states/node/virgin/class_NodeVirginState.php b/application/hub/main/states/node/virgin/class_NodeVirginState.php index 2755250df..e3e8425ce 100644 --- a/application/hub/main/states/node/virgin/class_NodeVirginState.php +++ b/application/hub/main/states/node/virgin/class_NodeVirginState.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/states/peer/class_ b/application/hub/main/states/peer/class_ index 3edf26d64..edb7029d7 100644 --- a/application/hub/main/states/peer/class_ +++ b/application/hub/main/states/peer/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/states/peer/class_BasePeerState.php b/application/hub/main/states/peer/class_BasePeerState.php index 1fc150a39..7b6b3814d 100644 --- a/application/hub/main/states/peer/class_BasePeerState.php +++ b/application/hub/main/states/peer/class_BasePeerState.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/states/peer/new/class_NewConnectionPeerState.php b/application/hub/main/states/peer/new/class_NewConnectionPeerState.php index 650545a66..d72b8a359 100644 --- a/application/hub/main/states/peer/new/class_NewConnectionPeerState.php +++ b/application/hub/main/states/peer/new/class_NewConnectionPeerState.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/tags/class_ b/application/hub/main/tags/class_ index 0c8ff2563..7d384e0ac 100644 --- a/application/hub/main/tags/class_ +++ b/application/hub/main/tags/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/tags/class_BaseTags.php b/application/hub/main/tags/class_BaseTags.php index 12e67708f..b1029f380 100644 --- a/application/hub/main/tags/class_BaseTags.php +++ b/application/hub/main/tags/class_BaseTags.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/tags/package/class_PackageTags.php b/application/hub/main/tags/package/class_PackageTags.php index e630c4928..e8e0b6a9f 100644 --- a/application/hub/main/tags/package/class_PackageTags.php +++ b/application/hub/main/tags/package/class_PackageTags.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/tasks/class_ b/application/hub/main/tasks/class_ index e390c2fe8..febfdb81e 100644 --- a/application/hub/main/tasks/class_ +++ b/application/hub/main/tasks/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/tasks/class_BaseTask.php b/application/hub/main/tasks/class_BaseTask.php index c85f47fff..d268e1301 100644 --- a/application/hub/main/tasks/class_BaseTask.php +++ b/application/hub/main/tasks/class_BaseTask.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/tasks/hub/announcement/class_HubSelfAnnouncementTask.php b/application/hub/main/tasks/hub/announcement/class_HubSelfAnnouncementTask.php index 12806b57c..d4c3bcc2f 100644 --- a/application/hub/main/tasks/hub/announcement/class_HubSelfAnnouncementTask.php +++ b/application/hub/main/tasks/hub/announcement/class_HubSelfAnnouncementTask.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/tasks/hub/class_HubSelfConnectTask.php b/application/hub/main/tasks/hub/class_HubSelfConnectTask.php index 009921c49..811a7c138 100644 --- a/application/hub/main/tasks/hub/class_HubSelfConnectTask.php +++ b/application/hub/main/tasks/hub/class_HubSelfConnectTask.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/tasks/hub/ping/class_HubPingTask.php b/application/hub/main/tasks/hub/ping/class_HubPingTask.php index b01b596ab..1001d25b4 100644 --- a/application/hub/main/tasks/hub/ping/class_HubPingTask.php +++ b/application/hub/main/tasks/hub/ping/class_HubPingTask.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/tasks/hub/update/class_HubUpdateCheckTask.php b/application/hub/main/tasks/hub/update/class_HubUpdateCheckTask.php index e4ca50316..b733b13c4 100644 --- a/application/hub/main/tasks/hub/update/class_HubUpdateCheckTask.php +++ b/application/hub/main/tasks/hub/update/class_HubUpdateCheckTask.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/tasks/idle/class_IdleLoopTask.php b/application/hub/main/tasks/idle/class_IdleLoopTask.php index 65ff79ddf..c355472e2 100644 --- a/application/hub/main/tasks/idle/class_IdleLoopTask.php +++ b/application/hub/main/tasks/idle/class_IdleLoopTask.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/tasks/network/class_NetworkPackageWriterTask.php b/application/hub/main/tasks/network/class_NetworkPackageWriterTask.php index 590f0fc40..cf32d580c 100644 --- a/application/hub/main/tasks/network/class_NetworkPackageWriterTask.php +++ b/application/hub/main/tasks/network/class_NetworkPackageWriterTask.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/template/announcement/class_AnnouncementTemplateEngine.php b/application/hub/main/template/announcement/class_AnnouncementTemplateEngine.php index 95099f435..1a6143fe4 100644 --- a/application/hub/main/template/announcement/class_AnnouncementTemplateEngine.php +++ b/application/hub/main/template/announcement/class_AnnouncementTemplateEngine.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @todo This template engine does not make use of setTemplateType() diff --git a/application/hub/main/template/connect/class_SelfConnectTemplateEngine.php b/application/hub/main/template/connect/class_SelfConnectTemplateEngine.php index 2647e4162..ca60f142e 100644 --- a/application/hub/main/template/connect/class_SelfConnectTemplateEngine.php +++ b/application/hub/main/template/connect/class_SelfConnectTemplateEngine.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @todo This template engine does not make use of setTemplateType() diff --git a/application/hub/main/template/objects/class_ObjectRegistryTemplateEngine.php b/application/hub/main/template/objects/class_ObjectRegistryTemplateEngine.php index 18fb7fc5d..bd8a99c43 100644 --- a/application/hub/main/template/objects/class_ObjectRegistryTemplateEngine.php +++ b/application/hub/main/template/objects/class_ObjectRegistryTemplateEngine.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @todo This template engine does not make use of setTemplateType() diff --git a/application/hub/main/tools/class_HubTools.php b/application/hub/main/tools/class_HubTools.php index 409739ec7..95e1b7831 100644 --- a/application/hub/main/tools/class_HubTools.php +++ b/application/hub/main/tools/class_HubTools.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/visitor/class_ b/application/hub/main/visitor/class_ index 32dd61858..e8d6b388f 100644 --- a/application/hub/main/visitor/class_ +++ b/application/hub/main/visitor/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/visitor/class_BaseVisitor.php b/application/hub/main/visitor/class_BaseVisitor.php index 13e253b62..4b66faa02 100644 --- a/application/hub/main/visitor/class_BaseVisitor.php +++ b/application/hub/main/visitor/class_BaseVisitor.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/visitor/pool/class_ b/application/hub/main/visitor/pool/class_ index bd3bd3554..2daa042b6 100644 --- a/application/hub/main/visitor/pool/class_ +++ b/application/hub/main/visitor/pool/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/visitor/pool/handler/class_Handler b/application/hub/main/visitor/pool/handler/class_Handler index b640baae0..aaa7e72ee 100644 --- a/application/hub/main/visitor/pool/handler/class_Handler +++ b/application/hub/main/visitor/pool/handler/class_Handler @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/visitor/pool/shutdown/class_Shutdown b/application/hub/main/visitor/pool/shutdown/class_Shutdown index 5d697f19f..fe7ffd326 100644 --- a/application/hub/main/visitor/pool/shutdown/class_Shutdown +++ b/application/hub/main/visitor/pool/shutdown/class_Shutdown @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub; Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub; Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/visitor/pool/shutdown/class_ShutdownListenerPoolVisitor.php b/application/hub/main/visitor/pool/shutdown/class_ShutdownListenerPoolVisitor.php index af2f8acba..9d13765a5 100644 --- a/application/hub/main/visitor/pool/shutdown/class_ShutdownListenerPoolVisitor.php +++ b/application/hub/main/visitor/pool/shutdown/class_ShutdownListenerPoolVisitor.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/visitor/socket/class_ShutdownSocketVisitor.php b/application/hub/main/visitor/socket/class_ShutdownSocketVisitor.php index 2433d964d..04dd99694 100644 --- a/application/hub/main/visitor/socket/class_ShutdownSocketVisitor.php +++ b/application/hub/main/visitor/socket/class_ShutdownSocketVisitor.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/visitor/tasks/class_ActiveTaskVisitor.php b/application/hub/main/visitor/tasks/class_ActiveTaskVisitor.php index c3b617967..480e2f1e6 100644 --- a/application/hub/main/visitor/tasks/class_ActiveTaskVisitor.php +++ b/application/hub/main/visitor/tasks/class_ActiveTaskVisitor.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/visitor/tasks/class_ShutdownTaskVisitor.php b/application/hub/main/visitor/tasks/class_ShutdownTaskVisitor.php index 3f3b5b120..d0ddcf403 100644 --- a/application/hub/main/visitor/tasks/class_ShutdownTaskVisitor.php +++ b/application/hub/main/visitor/tasks/class_ShutdownTaskVisitor.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/starter.php b/application/hub/starter.php index d7524678c..c8060ae02 100644 --- a/application/hub/starter.php +++ b/application/hub/starter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/templates/xml/object_registry/object_registry.xml b/application/hub/templates/xml/object_registry/object_registry.xml index 62ce62470..282fae9ab 100644 --- a/application/hub/templates/xml/object_registry/object_registry.xml +++ b/application/hub/templates/xml/object_registry/object_registry.xml @@ -72,21 +72,13 @@ along with this program. If not, see self_connect - + self - + self - + tcp - + hub diff --git a/docs/TODOs.txt b/docs/TODOs.txt index a1f77dfc3..ecdfbd6e5 100644 --- a/docs/TODOs.txt +++ b/docs/TODOs.txt @@ -1,21 +1,32 @@ ### WARNING: THIS FILE IS AUTO-GENERATED BY ./todo-builder.sh ### ### DO NOT EDIT THIS FILE. ### +./application/hub/interfaces/cruncher/class_CruncherHelper.php:10: * @todo We need to find a better name for this interface ./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_HubConsoleCruncherCommand.php:58: * @todo Try to create a CruncherActivationTask or so +./application/hub/main/commands/console/class_HubConsoleCruncherCommand.php:97: * @todo Should we add some more filters? ./application/hub/main/commands/console/class_HubConsoleMainCommand.php:108: * @todo Should we add some more filters? ./application/hub/main/commands/console/class_HubConsoleMainCommand.php:58: * @todo Try to create a HubActivationTask or so ./application/hub/main/connectors/query/local/class_LocalQueryConnector.php:10: * @todo Find an interface for: handleAllQueries() ./application/hub/main/connectors/query/local/class_LocalQueryConnector.php:78: * @TODO 0% done: Unfinished work here ./application/hub/main/connectors/queues/local/class_LocalQueueConnector.php:58: * @TODO 0% done: Unfinished work here +./application/hub/main/cruncher/class_BaseHubCruncher.php:43: * @todo Try to make this method more generic so we can move it in BaseFrameworkSystem +./application/hub/main/cruncher/test/class_HubTestCruncher.php:58: * @todo Implement this method ./application/hub/main/discovery/socket/class_PackageSocketDiscovery.php:102: // @TODO We may need some locking here ./application/hub/main/factories/socket/class_SocketFactory.php:10: * @todo Find an interface for hub helper ./application/hub/main/filter/activation/class_HubActivationSelfAnnouncementFilter.php:54: * @todo 0% done +./application/hub/main/filter/cruncher/class_CruncherInitializationFilter.php:54: * @todo 0% done +./application/hub/main/filter/cruncher/class_CruncherInitializationFilter.php:87: // @TODO Can we rewrite this to app_die() ? +./application/hub/main/filter/cruncher/class_CruncherPhpRequirementsFilter.php:55: * @todo Add more test and try to add an extra message to the thrown exception +./application/hub/main/filter/cruncher/class_CruncherWelcomeTeaserFilter.php:55: * @todo Handle over the $responseInstance to outputCruncherTeaser() ./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/node/class_NodePhpRequirementsFilter.php:55: * @todo Add more test and try to add an extra message to the thrown exception +./application/hub/main/filter/node/class_NodeWelcomeTeaserFilter.php:55: * @todo Handle over the $responseInstance to outputConsoleTeaser() ./application/hub/main/filter/shutdown/class_HubShutdownDeinitQueuesFilter.php:55: * @todo 0% done ./application/hub/main/filter/shutdown/class_HubShutdownFlushNodeListFilter.php:55: * @todo 0% done ./application/hub/main/filter/shutdown/class_HubShutdownTaskHandlerFilter.php:55: * @todo 0% done -./application/hub/main/filter/task/class_TaskHandlerInitializerFilter.php:55: * @todo 0% done +./application/hub/main/filter/task/class_CruncherTaskHandlerInitializerFilter.php:55: * @todo 0% done +./application/hub/main/filter/task/class_HubTaskHandlerInitializerFilter.php:55: * @todo 0% done ./application/hub/main/handler/network/tcp/class_TcpNetworkPackageHandler.php:96: * @todo ~10% done ./application/hub/main/handler/network/udp/class_UdpNetworkPackageHandler.php:58: * @todo 0% ./application/hub/main/handler/tasks/class_TaskHandler.php:136: // @TODO Messurement can be added around this call @@ -36,9 +47,9 @@ ./application/hub/main/nodes/boot/class_HubBootNode.php:119: // @TODO Add some filters here ./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/class_BaseHubNode.php:442: * @todo Try to make this method more generic so we can move it in BaseFrameworkSystem -./application/hub/main/nodes/class_BaseHubNode.php:482: * @todo Change the first if() block to check for a specific state -./application/hub/main/nodes/class_BaseHubNode.php:657: // @TODO Add some criteria, e.g. if the node is active or so +./application/hub/main/nodes/class_BaseHubNode.php:444: * @todo Try to make this method more generic so we can move it in BaseFrameworkSystem +./application/hub/main/nodes/class_BaseHubNode.php:484: * @todo Change the first if() block to check for a specific state +./application/hub/main/nodes/class_BaseHubNode.php:659: // @TODO Add some criteria, e.g. if the node is active or so ./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 @@ -48,12 +59,12 @@ ./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:145: // @TODO crc32 is not good, but it needs to be fast +./application/hub/main/package/class_NetworkPackage.php:150: // @TODO crc32 is not good, but it needs to be fast ./application/hub/main/package/class_NetworkPackage.php:22: * @todo Needs to add functionality for handling the object's type -./application/hub/main/package/class_NetworkPackage.php:254: // @TODO We may want to do somthing more here? -./application/hub/main/package/class_NetworkPackage.php:349: // @TODO Add some logging here -./application/hub/main/package/class_NetworkPackage.php:375: // @TODO Add some logging here -./application/hub/main/package/class_NetworkPackage.php:398: // @TODO Add some logging here +./application/hub/main/package/class_NetworkPackage.php:259: // @TODO We may want to do somthing more here? +./application/hub/main/package/class_NetworkPackage.php:357: // @TODO Add some logging here +./application/hub/main/package/class_NetworkPackage.php:383: // @TODO Add some logging here +./application/hub/main/package/class_NetworkPackage.php:409: // @TODO Add some logging here ./application/hub/main/pools/peer/class_DefaultPeerPool.php:148: // @TODO Check for IP ./application/hub/main/resolver/state/network/class_NetworkStateResolver.php:68: * @todo ~30% done ./application/hub/main/resolver/state/network/class_NetworkStateResolver.php:80: // @TODO On some systems it is 134, on some 107? @@ -75,8 +86,8 @@ ./inc/classes/exceptions/main/class_MissingMethodException.php:13: * @todo Try to rewrite user/guest login classes and mark this exception as deprecated ./inc/classes/exceptions/main/class_NoConfigEntryException.php:10: * @todo Rename this class to NoFoundEntryException ./inc/classes/interfaces/class_FrameworkInterface.php:11: * @todo Find a better name for this interface -./inc/classes/main/class_BaseFrameworkSystem.php:1131: * @todo Write a logging mechanism for productive mode -./inc/classes/main/class_BaseFrameworkSystem.php:1145: // @TODO Finish this part! +./inc/classes/main/class_BaseFrameworkSystem.php:1142: * @todo Write a logging mechanism for productive mode +./inc/classes/main/class_BaseFrameworkSystem.php:1156: // @TODO Finish this part! ./inc/classes/main/class_BaseFrameworkSystem.php:154: // @todo Try to clean these constants up ./inc/classes/main/class_BaseFrameworkSystem.php:235: * @todo This is old code. Do we still need this old lost code? ./inc/classes/main/class_BaseFrameworkSystem.php:303: * @todo SearchableResult and UpdateableResult shall have a super interface to use here @@ -84,6 +95,7 @@ ./inc/classes/main/commands/web/class_WebProblemCommand.php:58: * @todo 0% done ./inc/classes/main/commands/web/class_WebStatusCommand.php:58: * @todo 0% done ./inc/classes/main/console/class_ConsoleTools.php:147: * @todo This should be moved out to an external class, e.g. HttpClient +./inc/classes/main/console/class_ConsoleTools.php:154: // @TODO Add some DNS caching here ./inc/classes/main/console/class_ConsoleTools.php:45: * @todo We should connect this to a caching class to cache DNS requests ./inc/classes/main/console/class_ConsoleTools.php:58: // @TODO Here should the cacher be implemented ./inc/classes/main/controller/console/class_ConsoleDefaultController.php:10: * @todo This controller shall still provide some headlines for sidebars @@ -184,7 +196,9 @@ ### ### DEPRECATION FOLLOWS: ### ### ./application/hub/main/filter/bootstrap/class_HubBootstrapAquireHubIdFilter.php:2:// @DEPRECATED ./application/hub/main/filter/bootstrap/class_HubBootstrapGenSessionIdFilter.php:2:// @DEPRECATED +./application/hub/main/filter/console/class_ConsoleWelcomeTeaserFilter.php:2:// @DEPRECATED ./application/hub/main/filter/shutdown/class_HubShutdownListenerPoolFilter.php:2:// @DEPRECATED +./application/hub/main/filter/task/class_TaskHandlerInitializerFilter.php:2:// @DEPRECATED ./application/hub/main/nodes/class_BaseHubNode.php:50: * @deprecated ./inc/classes/exceptions/io/class_FileNotFoundException.php:2:// @DEPRECATED ./inc/classes/exceptions/io/class_FilePointerNotOpenedException.php:2:// @DEPRECATED diff --git a/index.php b/index.php index 3b7f08254..0c60a2272 100644 --- a/index.php +++ b/index.php @@ -9,7 +9,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * -- 2.39.5