]> git.mxchange.org Git - hub.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Tue, 30 May 2017 12:00:52 +0000 (14:00 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 21 Aug 2020 16:50:10 +0000 (18:50 +0200)
- enabled all(?) debug messages
- use StorableSocket::SOCKET_PROTOCOL_FOO instead of 'foo' which is more flexible
- added more debug messages

Signed-off-by: Roland Häder <roland@mxchange.org>
121 files changed:
application/hub/classes/client/http/class_HttpClient.php
application/hub/classes/container/socket/class_SocketContainer.php
application/hub/classes/database/frontend/node/class_NodeDistributedHashTableDatabaseWrapper.php
application/hub/classes/database/frontend/states/class_PeerStateLookupDatabaseWrapper.php
application/hub/classes/decoder/package/class_PackageDecoder.php
application/hub/classes/dht/class_BaseDht.php
application/hub/classes/dht/node/class_NodeDhtFacade.php
application/hub/classes/discovery/node/class_UniversalNodeLocatorDiscovery.php
application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php
application/hub/classes/factories/locator/class_UniversalNodeLocatorFactory.php
application/hub/classes/factories/socket/class_SocketFactory.php
application/hub/classes/factories/states/peer/class_PeerStateFactory.php
application/hub/classes/feature/hubcoin_reward/class_HubcoinRewardFeature.php
application/hub/classes/filter/class_BaseHubFilter.php
application/hub/classes/filter/node/class_NodeInitializationFilter.php
application/hub/classes/handler/chunks/class_ChunkHandler.php
application/hub/classes/handler/data/message-types/announcement/class_NodeMessageAnnouncementHandler.php
application/hub/classes/handler/data/message-types/answer/class_NodeMessageRequestNodeListAnswerHandler.php
application/hub/classes/handler/data/message-types/dht/class_NodeMessageDhtBootstrapHandler.php
application/hub/classes/handler/data/message-types/requests/class_NodeMessageRequestNodeListHandler.php
application/hub/classes/handler/protocol/class_BaseProtocolHandler.php
application/hub/classes/handler/protocol/ipv4/class_BaseIpV4ProtocolHandler.php
application/hub/classes/handler/raw_data/tcp/class_TcpRawDataHandler.php
application/hub/classes/helper/connection/class_BaseConnectionHelper.php
application/hub/classes/helper/connection/ipv4/class_BaseIpV4ConnectionHelper.php
application/hub/classes/helper/dht/class_DhtBootstrapHelper.php
application/hub/classes/info/connection/class_ConnectionInfo.php
application/hub/classes/listener/class_BaseListener.php
application/hub/classes/listener/class_BaseListenerDecorator.php
application/hub/classes/listener/socket/decorator/class_SocketFileListenerDecorator.php
application/hub/classes/listener/tcp/decorators/class_ClientTcpListenerDecorator.php
application/hub/classes/listener/tcp/decorators/class_HubTcpListenerDecorator.php
application/hub/classes/listener/udp/decorators/class_ClientUdpListenerDecorator.php
application/hub/classes/listener/udp/decorators/class_HubUdpListenerDecorator.php
application/hub/classes/locator/class_UniversalNodeLocator.php
application/hub/classes/nodes/boot/class_HubBootNode.php
application/hub/classes/nodes/class_BaseHubNode.php
application/hub/classes/package/assembler/class_PackageAssembler.php
application/hub/classes/package/class_NetworkPackage.php
application/hub/classes/package/fragmenter/class_PackageFragmenter.php
application/hub/classes/pools/class_BasePool.php
application/hub/classes/pools/listener/class_DefaultListenerPool.php
application/hub/classes/pools/peer/class_DefaultPeerPool.php
application/hub/classes/recipient/class_
application/hub/classes/recipient/dht/class_DhtRecipient.php
application/hub/classes/recipient/direct/class_DirectRecipient.php
application/hub/classes/recipient/self/class_SelfRecipient.php
application/hub/classes/recipient/upper/class_UpperRecipient.php
application/hub/classes/registry/socket/class_SocketRegistry.php
application/hub/classes/source/class_BaseUrlSource.php
application/hub/classes/source/urls/class_CrawlerUploadedListUrlSource.php
application/hub/classes/states/communicator/class_Communicator
application/hub/classes/states/crawler/class_Crawler
application/hub/classes/states/cruncher/class_Cruncher
application/hub/classes/states/dht/active/class_DhtActiveState.php
application/hub/classes/states/dht/booting/class_DhtBootingState.php
application/hub/classes/states/dht/class_Dht
application/hub/classes/states/dht/init/class_DhtInitState.php
application/hub/classes/states/dht/virgin/class_DhtVirginState.php
application/hub/classes/states/miner/booting/class_MinerBootingState.php
application/hub/classes/states/miner/class_Miner
application/hub/classes/states/node/class_Node
application/hub/classes/statistics/connection/class_ConnectionStatisticsHelper.php
application/hub/classes/streams/raw_data/input/class_RawDataInputStream.php
application/hub/classes/streams/raw_data/output/class_RawDataOutputStream.php
application/hub/classes/tags/package/class_PackageTags.php
application/hub/classes/tasks/apt-proxy/class_
application/hub/classes/tasks/apt-proxy/class_AptProxyListenerTask.php
application/hub/classes/tasks/chat/class_
application/hub/classes/tasks/chat/class_ChatTelnetListenerTask.php
application/hub/classes/tasks/crawler/class_Crawler
application/hub/classes/tasks/crawler/communicator/class_CrawlerNodeCommunicatorTask.php
application/hub/classes/tasks/crawler/document_parser/class_CrawlerDocumentParserTask.php
application/hub/classes/tasks/crawler/mime_sniffer/class_CrawlerMimeSnifferTask.php
application/hub/classes/tasks/crawler/ping/class_CrawlerPingTask.php
application/hub/classes/tasks/crawler/publisher/class_CrawlerRemoteJobPublisherTask.php
application/hub/classes/tasks/crawler/scanner/class_Crawler
application/hub/classes/tasks/crawler/scanner/uploaded_list/class_CrawlerUploadedListScannerTask.php
application/hub/classes/tasks/crawler/snippet_extractor/class_CrawlerSnippetExtractorTask.php
application/hub/classes/tasks/crawler/structure_analyzer/class_CrawlerStructureAnalyzerTask.php
application/hub/classes/tasks/crawler/url_crawler/local/class_CrawlerLocalUrlCrawlerTask.php
application/hub/classes/tasks/crawler/url_crawler/remote/class_CrawlerRemoteUrlCrawlerTask.php
application/hub/classes/tasks/crawler/url_source/class_CrawlerUrlSource
application/hub/classes/tasks/crawler/url_source/class_CrawlerUrlSourceFoundRssTask.php
application/hub/classes/tasks/crawler/url_source/class_CrawlerUrlSourceLocalStartTask.php
application/hub/classes/tasks/crawler/url_source/class_CrawlerUrlSourceRssStartTask.php
application/hub/classes/tasks/crawler/url_source/class_CrawlerUrlSourceUploadedListTask.php
application/hub/classes/tasks/cruncher/class_Cruncher
application/hub/classes/tasks/cruncher/class_CruncherKeyProducerTask.php
application/hub/classes/tasks/cruncher/class_CruncherTestUnitProducerTask.php
application/hub/classes/tasks/cruncher/class_CruncherWorkUnitFetcherTask.php
application/hub/classes/tasks/miner/block_fetcher/class_MinerBlockFetcherTask.php
application/hub/classes/tasks/miner/block_producer/class_MinerRealGenesisBlockProducerTask.php
application/hub/classes/tasks/miner/block_producer/class_MinerTestGenesisBlockProducerTask.php
application/hub/classes/tasks/miner/class_Miner
application/hub/classes/tasks/miner/communicator/class_MinerNodeCommunicatorTask.php
application/hub/classes/tasks/network/class_NetworkPackage
application/hub/classes/tasks/network/class_NetworkPackageReaderTask.php
application/hub/classes/tasks/network/class_NetworkPackageWriterTask.php
application/hub/classes/tasks/node/announcement/class_NodeAnnouncementTask.php
application/hub/classes/tasks/node/chunks/class_NodeChunkAssemblerTask.php
application/hub/classes/tasks/node/class_Node
application/hub/classes/tasks/node/decoder/class_NodePackageDecoderTask.php
application/hub/classes/tasks/node/dht/class_NodeDht
application/hub/classes/tasks/node/dht/class_NodeDhtBootstrapTask.php
application/hub/classes/tasks/node/dht/class_NodeDhtInitializationTask.php
application/hub/classes/tasks/node/dht/class_NodeDhtLateBootstrapTask.php
application/hub/classes/tasks/node/dht/class_NodeDhtPublicationCheckTask.php
application/hub/classes/tasks/node/dht/class_NodeDhtPublicationTask.php
application/hub/classes/tasks/node/dht/class_NodeDhtQueryTask.php
application/hub/classes/tasks/node/listener/class_NodeSocketListenerTask.php
application/hub/classes/tasks/node/ping/class_NodePingTask.php
application/hub/classes/tasks/node/self_connect/class_NodeSelfConnectTask.php
application/hub/classes/tasks/node/tags/class_NodePackageTagsInitTask.php
application/hub/classes/tasks/node/update/class_NodeUpdateCheckTask.php
application/hub/classes/tools/class_HubTools.php
application/hub/classes/visitor/pool/monitor/class_RawDataPoolMonitorVisitor.php
application/hub/classes/visitor/pool/shutdown/class_ShutdownListenerPoolVisitor.php
application/hub/classes/visitor/tasks/class_ActiveTaskVisitor.php
application/hub/config.php
core

index d3327c420822bfe4aa3f37ddfd39e84f6af19ac8..44ce083b7af2806e379f41271473d446efbee121 100644 (file)
@@ -117,7 +117,7 @@ class HttpClient extends BaseClient implements Client {
 
                // Add last new-line
                $rawRequest .= self::HTTP_EOL;
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HTTP-CLIENT: rawRequest=' . $rawRequest);
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HTTP-CLIENT: rawRequest=' . $rawRequest);
 
                // Write request
                fwrite($this->getSocketInstance(), $rawRequest);
index f90e3e432558d9b6c0811d2c31d4ea2d148cd870..b458fd0d89a4eec4b15885b1e2467904f1156e74 100644 (file)
@@ -138,7 +138,7 @@ class SocketContainer extends BaseHubContainer implements StorableSocket, Visita
                $packageData = $this->getPackageData();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getSocketProtocol()) . '-SOCKET: unl=' . $unl . ',packageData=' . print_r($packageData, true));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getSocketProtocol()) . '-SOCKET: unl=' . $unl . ',packageData=' . print_r($packageData, true));
 
                // So, does both match?
                $matches = ((isset($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT])) && ($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT] === $unl));
@@ -607,9 +607,15 @@ class SocketContainer extends BaseHubContainer implements StorableSocket, Visita
                // Get recipient UNL
                $unlRecipient = $this->getSocketRecipient();
 
+               // Debug message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: unlRecipient=%s', strtoupper($this->getSocketProtocol()), $unlRecipient));
+
                // Create UNL instance from it. This will validate the connection
                $unlInstance = UniversalNodeLocatorFactory::createUnlInstanceFromString($unlRecipient);
 
+               // Debug message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: unlAddress=%s,unlPort=%d', strtoupper($this->getSocketProtocol()), $unlInstance->getUnlAddress(), $unlInstance->getUnlPort()));
+
                // Try to connect to it
                $result = socket_connect($this->getSocketResource(), $unlInstance->getUnlAddress(), $unlInstance->getUnlPort());
 
@@ -732,7 +738,7 @@ class SocketContainer extends BaseHubContainer implements StorableSocket, Visita
                } // END - if
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getSocketProtocol()) . '-SOCKET: serverSocket=' . $this->getSocketResource() . ',readers=' . print_r($readers, true));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getSocketProtocol()) . '-SOCKET: serverSocket=' . $this->getSocketResource() . ',readers=' . print_r($readers, true));
 
                // Do we have changed peers?
                if (!in_array($this->getSocketResource(), $readers)) {
@@ -750,7 +756,7 @@ class SocketContainer extends BaseHubContainer implements StorableSocket, Visita
                $socketResource = socket_accept($this->getSocketResource());
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getSocketProtocol()) . '-SOCKET: socketResource=' . $socketResource . ',serverSocket=' .$this->getSocketResource());
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getSocketProtocol()) . '-SOCKET: socketResource=' . $socketResource . ',serverSocket=' .$this->getSocketResource());
 
                // Create socket instance from it
                $socketInstance = SocketFactory::createIncomingSocketInstance($socketResource, $this->getSocketProtocol());
@@ -933,7 +939,7 @@ class SocketContainer extends BaseHubContainer implements StorableSocket, Visita
                }
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: Sending out %d bytes,rawBufferSize=%d,diff=%d', strtoupper($this->getSocketProtocol()), strlen($socketBuffer[NetworkPackage::RAW_INDEX_ENCODED_DATA]), $socketBuffer[NetworkPackage::RAW_INDEX_BUFFER_SIZE], $socketBuffer[NetworkPackage::RAW_INDEX_DIFF]));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: Sending out %d bytes,rawBufferSize=%d,diff=%d to socketResource=%s', strtoupper($this->getSocketProtocol()), strlen($socketBuffer[NetworkPackage::RAW_INDEX_ENCODED_DATA]), $socketBuffer[NetworkPackage::RAW_INDEX_BUFFER_SIZE], $socketBuffer[NetworkPackage::RAW_INDEX_DIFF], $this->getSocketResource()));
 
                // Is some data still pending or sent all out?
                if ($socketBuffer[NetworkPackage::RAW_INDEX_DIFF] >= 0) {
index a4a8ce8d7627c39f9656a7e6b4132e3765983ba6..b92b6f2bf69dac845d7ed829aba64f6472b41a82 100644 (file)
@@ -122,7 +122,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
         */
        private function prepareSearchInstance (array $nodeData) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
 
                // Assert on array elements
                assert(isset($nodeData[self::DB_COLUMN_NODE_ID]));
@@ -135,7 +135,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
                $searchInstance->setLimit(1);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: EXIT!');
 
                // Return it
                return $searchInstance;
@@ -159,7 +159,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
         */
        private function prepareLocalDataSetInstance () {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
 
                // Get node/request instances
                $nodeInstance = NodeObjectFactory::createNodeInstance();
@@ -197,7 +197,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
                $dataSetInstance->addCriteria(self::DB_COLUMN_ACCEPT_BOOTSTRAP, $this->translateBooleanToYesNo($nodeInstance->isAcceptingDhtBootstrap()));
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: EXIT!');
 
                // Return it
                return $dataSetInstance;
@@ -211,7 +211,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
         */
        public function isLocalNodeRegistered () {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
 
                // Get a search criteria instance
                $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
@@ -240,7 +240,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
                $isRegistered = $resultInstance->valid();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: isRegistered=' . intval($isRegistered) . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: isRegistered=' . intval($isRegistered) . ' - EXIT!');
 
                // Return result
                return $isRegistered;
@@ -253,7 +253,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
         */
        public function registerLocalNode () {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
 
                // Assert to make sure this method is called with no record in DB (the actual backend of the DHT)
                assert(!$this->isLocalNodeRegistered());
@@ -265,7 +265,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
                $this->queryInsertDataSet($dataSetInstance);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: EXIT!');
        }
 
        /**
@@ -276,7 +276,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
         */
        public function updateLocalNode () {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
 
                // Assert to make sure this method is called with one record in DB (the actual backend of the DHT)
                assert($this->isLocalNodeRegistered());
@@ -301,7 +301,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
                $this->queryUpdateDataSet($dataSetInstance);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: EXIT!');
        }
 
        /**
@@ -312,7 +312,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
         */
        public function findNodeLocalBySessionId ($sessionId) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: sessionId=' . $sessionId . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: sessionId=' . $sessionId . ' - CALLED!');
 
                // Get search criteria
                $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
@@ -325,7 +325,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
                $resultInstance = $this->doSelectByCriteria($searchInstance);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: resultInstance->valid()=' . intval($resultInstance->valid()) . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: resultInstance->valid()=' . intval($resultInstance->valid()) . ' - EXIT!');
 
                // Return result instance
                return $resultInstance;
@@ -340,7 +340,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
         */
        public function registerNodeByMessageData (array $messageData, HandleableDataSet $handlerInstance) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: handlerInstance=' . $handlerInstance->__toString() . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: handlerInstance=' . $handlerInstance->__toString() . ' - CALLED!');
 
                // Get a data set instance
                $dataSetInstance = ObjectFactory::createObjectByConfiguredName('dataset_criteria_class', array(self::DB_TABLE_NODE_DHT));
@@ -358,7 +358,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
                $this->queryInsertDataSet($dataSetInstance);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER - EXIT!');
        }
 
        /**
@@ -371,7 +371,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
         */
        public function updateNodeByMessageData (array $messageData, HandleableDataSet $handlerInstance, LocalSearchCriteria $searchInstance) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
 
                // Get a data set instance
                $dataSetInstance = ObjectFactory::createObjectByConfiguredName('dataset_criteria_class', array(self::DB_TABLE_NODE_DHT));
@@ -392,7 +392,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
                $this->queryUpdateDataSet($dataSetInstance);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: EXIT!');
        }
 
        /**
@@ -403,13 +403,13 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
         */
        public function isNodeRegistered (array $nodeData) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
 
                // Assert on array elements
                assert(isset($nodeData[self::DB_COLUMN_NODE_ID]));
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: node-id=' . $nodeData[self::DB_COLUMN_NODE_ID]);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: node-id=' . $nodeData[self::DB_COLUMN_NODE_ID]);
 
                // Get search criteria
                $searchInstance = $this->prepareSearchInstance($nodeData);
@@ -429,7 +429,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
                $isRegistered = $resultInstance->valid();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: isRegistered=' . intval($isRegistered) . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: isRegistered=' . intval($isRegistered) . ' - EXIT!');
 
                // Return registration status
                return $isRegistered;
@@ -445,7 +445,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
         */
        public function registerNode (array $nodeData) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
 
                // Assert on array elements
                assert(isset($nodeData[self::DB_COLUMN_NODE_ID]));
@@ -460,7 +460,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
                $this->partialStub('nodeData=' . print_r($nodeData, TRUE));
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: EXIT!');
        }
 
        /**
@@ -474,13 +474,13 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
         */
        public function updateNode (array $nodeData) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
 
                // Assert on array elements
                assert(isset($nodeData[self::DB_COLUMN_NODE_ID]));
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: Updating DHT entry for node-id=' . $nodeData[self::DB_COLUMN_NODE_ID] . ' ...');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: Updating DHT entry for node-id=' . $nodeData[self::DB_COLUMN_NODE_ID] . ' ...');
 
                // Is the node registered?
                if (!$this->isNodeRegistered($nodeData)) {
@@ -504,7 +504,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
                $nodeInstance = NodeObjectFactory::createNodeInstance();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: nodeData=' . print_r($nodeData, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: nodeData=' . print_r($nodeData, TRUE));
 
                // Add all array elements
                $nodeInstance->addArrayToDataSet($dataSetInstance, $nodeData);
@@ -516,7 +516,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
                $this->queryUpdateDataSet($dataSetInstance);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: EXIT!');
        }
 
        /**
@@ -542,7 +542,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
                $hasUnpublished = $this->unpublishedEntriesInstance->valid();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: EXIT!');
 
                // Return it
                return $hasUnpublished;
@@ -558,7 +558,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
         */
        public function initEntryPublication () {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
 
                /*
                 * Make sure that hasUnpublishedEntries() has been called first by
@@ -590,7 +590,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
                $this->queryUpdateDataSet($dataSetInstance);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: EXIT!');
        }
 
        /**
@@ -601,9 +601,9 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
         */
        public function removeNonPublicDataFromArray(array $data) {
                // Currently call only inner method
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: Calling parent::removeNonPublicDataFromArray(data) ...');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: Calling parent::removeNonPublicDataFromArray(data) ...');
                $data = parent::removeNonPublicDataFromArray($data);
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: data[]=' . gettype($data));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: data[]=' . gettype($data));
 
                // Return cleaned data
                return $data;
@@ -617,7 +617,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
         */
        public function getResultFromExcludedSender (array $packageData) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
 
                // Assert on required array field
                assert(isset($packageData[NetworkPackage::PACKAGE_DATA_SENDER]));
@@ -638,7 +638,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
                $resultInstance = $this->doSelectByCriteria($searchInstance);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: EXIT!');
 
                // Return result instance
                return $resultInstance;
@@ -654,7 +654,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
         */
        public function getResultFromKeyValue ($key, $value) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
 
                // Get max recipients
                $maxRecipients = $this->getConfigInstance()->getConfigEntry('max_dht_recipients');
@@ -669,7 +669,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
                $resultInstance = $this->doSelectByCriteria($searchInstance);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: EXIT!');
 
                // Return result instance
                return $resultInstance;
@@ -693,7 +693,5 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
                        $this->registerLocalNode();
                }
        }
-}
 
-// [EOF]
-?>
+}
index 00db969f7fb3f638475f960773d90042df41d669..07a9a5000485d60ef9fe275abbc0f7d79dadab66 100644 (file)
@@ -88,7 +88,7 @@ class PeerStateLookupDatabaseWrapper extends BaseHubDatabaseWrapper implements L
         */
        private function getSenderSearchInstanceFromPackageData (array $packageData) {
                // Get the instance
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE-WRAPPER: Searching for sender ' . $packageData[NetworkPackage::PACKAGE_DATA_SENDER]);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE-WRAPPER: Searching for sender ' . $packageData[NetworkPackage::PACKAGE_DATA_SENDER]);
                $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
 
                // Add 'sender' as the peer's IP address
@@ -108,7 +108,7 @@ class PeerStateLookupDatabaseWrapper extends BaseHubDatabaseWrapper implements L
         */
        public function isSenderNewPeer (array $packageData, StoreableCriteria $dataSetInstance = NULL) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE-WRAPPER: ' . __FUNCTION__ . ' called with packageData()=' . count($packageData) . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE-WRAPPER: ' . __FUNCTION__ . ' called with packageData()=' . count($packageData) . ' - CALLED!');
 
                // Is the package valid?
                if (!isset($packageData[NetworkPackage::PACKAGE_DATA_SENDER])) {
@@ -129,11 +129,11 @@ class PeerStateLookupDatabaseWrapper extends BaseHubDatabaseWrapper implements L
                $entries = $this->doSelectCountByCriteria($searchInstance, array(self::DB_COLUMN_PEER_SESSION_ID => TRUE));
 
                // Is it there?
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE-WRAPPER: entries=' . $entries);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE-WRAPPER: entries=' . $entries);
                $isNewPeer = ($entries != 1);
 
                // Return the result
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE-WRAPPER: isNewPeer=' . intval($isNewPeer) . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE-WRAPPER: isNewPeer=' . intval($isNewPeer) . ' - EXIT!');
                return $isNewPeer;
        }
 
@@ -183,7 +183,7 @@ class PeerStateLookupDatabaseWrapper extends BaseHubDatabaseWrapper implements L
                $this->queryInsertDataSet($dataSetInstance, array(self::DB_COLUMN_PEER_SESSION_ID => TRUE));
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE-WRAPPER: Peer ' . $packageData[NetworkPackage::PACKAGE_DATA_SENDER] . ' has been registered.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE-WRAPPER: Peer ' . $packageData[NetworkPackage::PACKAGE_DATA_SENDER] . ' has been registered.');
        }
 
        /**
@@ -226,7 +226,7 @@ class PeerStateLookupDatabaseWrapper extends BaseHubDatabaseWrapper implements L
                }
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE-WRAPPER: Peer ' . $packageData[NetworkPackage::PACKAGE_DATA_SENDER] . ' has been registered/updated with state ' . $stateInstance->getStateName());
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE-WRAPPER: Peer ' . $packageData[NetworkPackage::PACKAGE_DATA_SENDER] . ' has been registered/updated with state ' . $stateInstance->getStateName());
        }
 
        /**
@@ -250,7 +250,7 @@ class PeerStateLookupDatabaseWrapper extends BaseHubDatabaseWrapper implements L
         */
        public function isSamePeerState (ConnectionHelper $helperInstance, array $packageData) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE-WRAPPER: State ' . $helperInstance->getPrintableState() . ' needs to be checked it has changed ...');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE-WRAPPER: State ' . $helperInstance->getPrintableState() . ' needs to be checked it has changed ...');
 
                // Now get the search instance from given package data
                $searchInstance = $this->getSenderSearchInstanceFromPackageData($packageData);
@@ -265,7 +265,7 @@ class PeerStateLookupDatabaseWrapper extends BaseHubDatabaseWrapper implements L
                $rowData = $resultInstance->current();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE-WRAPPER: rowData[' . gettype($rowData) . ']=' . print_r($rowData, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE-WRAPPER: rowData[' . gettype($rowData) . ']=' . print_r($rowData, TRUE));
 
                // Assert on important elements
                assert(isset($rowData[self::DB_COLUMN_PEER_STATE]));
@@ -274,7 +274,7 @@ class PeerStateLookupDatabaseWrapper extends BaseHubDatabaseWrapper implements L
                $isSamePeerState = ($rowData[self::DB_COLUMN_PEER_STATE] == $helperInstance->getPrintableState());
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE-WRAPPER: state in database: ' . $rowData[self::DB_COLUMN_PEER_STATE] . ', new state: ' . $helperInstance->getPrintableState() . ',isSamePeerState=' . intval($isSamePeerState));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE-WRAPPER: state in database: ' . $rowData[self::DB_COLUMN_PEER_STATE] . ', new state: ' . $helperInstance->getPrintableState() . ',isSamePeerState=' . intval($isSamePeerState));
 
                // Return it
                return $isSamePeerState;
index 5cce8c2a89111b36a096a8c2864a25055e242166..69004a39d2bcb42864891b4686cd9b774d5ce174 100644 (file)
@@ -88,7 +88,7 @@ class PackageDecoder extends BaseDecoder implements Decodeable, Registerable {
                $unhandledDataLeft = (!$this->getHandlerInstance()->getStackInstance()->isStackEmpty(ChunkHandler::STACKER_NAME_ASSEMBLED_RAW_DATA));
 
                // Return it
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-DECODER: unhandledDataLeft=' . intval($unhandledDataLeft));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-DECODER: unhandledDataLeft=' . intval($unhandledDataLeft));
                return $unhandledDataLeft;
        }
 
@@ -105,7 +105,7 @@ class PackageDecoder extends BaseDecoder implements Decodeable, Registerable {
                $rawPackageContent = $this->getHandlerInstance()->getStackInstance()->popNamed(ChunkHandler::STACKER_NAME_ASSEMBLED_RAW_DATA);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-DECODER: Got ' . strlen($rawPackageContent) . ' bytes from stack ' . ChunkHandler::STACKER_NAME_ASSEMBLED_RAW_DATA . ', decoding it ...');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-DECODER: Got ' . strlen($rawPackageContent) . ' bytes from stack ' . ChunkHandler::STACKER_NAME_ASSEMBLED_RAW_DATA . ', decoding it ...');
 
                // "Decode" the raw package content by using the NetworkPackage instance
                $decodedData = $this->getPackageInstance()->decodeRawContent($rawPackageContent);
@@ -131,7 +131,7 @@ class PackageDecoder extends BaseDecoder implements Decodeable, Registerable {
                // Check for 'recipient' field (the 'sender' field and others are ignored here)
                if ($discoveryInstance->isRecipientListEmpty()) {
                        // The recipient is this node so next stack it on 'decoded_package'
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-DECODER: Pushing ' . strlen($decodedData) . ' bytes to stack ' . self::STACKER_NAME_DECODED_PACKAGE . ' ...');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-DECODER: Pushing ' . strlen($decodedData) . ' bytes to stack ' . self::STACKER_NAME_DECODED_PACKAGE . ' ...');
                        $this->getHandlerInstance()->getStackInstance()->pushNamed(self::STACKER_NAME_DECODED_PACKAGE, $decodedData);
                } else {
                        // Forward the package to the next node
@@ -165,7 +165,7 @@ class PackageDecoder extends BaseDecoder implements Decodeable, Registerable {
                $decodedData = $this->getHandlerInstance()->getStackInstance()->popNamed(self::STACKER_NAME_DECODED_PACKAGE);
 
                // Handle it
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-DECODER: decodedData(' . count($decodedData) . ')=' . print_r($decodedData, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-DECODER: decodedData(' . count($decodedData) . ')=' . print_r($decodedData, TRUE));
                $this->getPackageInstance()->handleRawData($decodedData);
        }
 
index afa2061be12442c83d1caae279d57ed64c3b288d..6a44c90e1cc5f29c1b9438b294b8ab30585f63c5 100644 (file)
@@ -173,7 +173,7 @@ abstract class BaseDht extends BaseHubSystem implements Distributable {
                        assert(is_array($current));
 
                        // ... and push it to the next stack
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-DHT Pushing entry with ' . count($current) . ' elements to stack ' . self::STACKER_NAME_PENDING_PUBLISHING . ' ...');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT: Pushing entry with ' . count($current) . ' elements to stack ' . self::STACKER_NAME_PENDING_PUBLISHING . ' ...');
                        $this->getStackInstance()->pushNamed(self::STACKER_NAME_PENDING_PUBLISHING, $current);
                } // END - while
        }
@@ -188,7 +188,7 @@ abstract class BaseDht extends BaseHubSystem implements Distributable {
                $isPending = ($this->getStackInstance()->isStackEmpty(self::STACKER_NAME_PENDING_PUBLISHING) === FALSE);
 
                // Return status
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-DHT isPending=' . intval($isPending));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT: isPending=' . intval($isPending));
                return $isPending;
        }
 
@@ -202,7 +202,7 @@ abstract class BaseDht extends BaseHubSystem implements Distributable {
                $isBooting = $this->getStateInstance()->ifDhtIsBooting();
 
                // Return status
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-DHT isBooting=' . intval($isBooting));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT: isBooting=' . intval($isBooting));
                return $isBooting;
        }
 
@@ -233,9 +233,9 @@ abstract class BaseDht extends BaseHubSystem implements Distributable {
                assert(is_array($entry));
 
                // Remove any non-public data the database layer desires
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT: Calling this->getWrapperInstance()->removeNonPublicDataFromArray(data) ...');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT: Calling this->getWrapperInstance()->removeNonPublicDataFromArray(data) ...');
                $entry = $this->getWrapperInstance()->removeNonPublicDataFromArray($entry);
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT: entry[]=' . gettype($entry));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT: entry[]=' . gettype($entry));
 
                // Some sanity-checks again
                assert(is_array($entry));
index 378cfdad0568854178faa147ea824823e67de190..ef6de49c65afd5bcf25cdf8b33257d38fcf5e327 100644 (file)
@@ -186,18 +186,18 @@ class NodeDhtFacade extends BaseDht implements DistributableNode, Registerable {
                $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-FACADE: state=' . $this->getPrintableState() . ',messageData=' . print_r($messageData, TRUE) . ',handlerInstance=' . $handlerInstance->__toString() . ',forceUpdate=' . intval($forceUpdate) . ',count(getSearchData())=' . count($handlerInstance->getSearchData()));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-FACADE: state=' . $this->getPrintableState() . ',messageData=' . print_r($messageData, TRUE) . ',handlerInstance=' . $handlerInstance->__toString() . ',forceUpdate=' . intval($forceUpdate) . ',count(getSearchData())=' . count($handlerInstance->getSearchData()));
 
                // Search for the node's session id and external address/hostname + TCP/UDP listen port
                foreach ($handlerInstance->getSearchData() as $key) {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-FACADE: state=' . $this->getPrintableState() . ',key=' . $key);
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-FACADE: state=' . $this->getPrintableState() . ',key=' . $key);
 
                        // Is it there?
                        assert(isset($messageData[$key]));
 
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-FACADE: state=' . $this->getPrintableState() . ',messageData[' . $key . ']=' . $messageData[$key]);
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-FACADE: state=' . $this->getPrintableState() . ',messageData[' . $key . ']=' . $messageData[$key]);
 
                        // Add criteria
                        $searchInstance->addCriteria(str_replace('my-', '', $key), $messageData[$key]);
@@ -247,7 +247,7 @@ class NodeDhtFacade extends BaseDht implements DistributableNode, Registerable {
                assert((isset($messageData[$excludeKey])) && (isset($messageData[$andKey])));
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-FACADE: state=' . $this->getPrintableState() . ',messageData=' . print_r($messageData, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-FACADE: state=' . $this->getPrintableState() . ',messageData=' . print_r($messageData, TRUE));
 
                // Get a search criteria class
                $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
@@ -255,7 +255,7 @@ class NodeDhtFacade extends BaseDht implements DistributableNode, Registerable {
                // Add all keys
                foreach (explode($separator, $messageData[$andKey]) as $criteria) {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-FACADE: andKey=' . $andKey . ',criteria=' . $criteria);
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-FACADE: andKey=' . $andKey . ',criteria=' . $criteria);
 
                        // Add it and leave any 'my-' prefix out
                        $searchInstance->addChoiceCriteria(str_replace('my-', '', $andKey), $criteria);
@@ -285,7 +285,7 @@ class NodeDhtFacade extends BaseDht implements DistributableNode, Registerable {
                        assert(count($current) > 0);
 
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-FACADE: current(' . count($current) . ')[' . gettype($current) . ']=' . print_r($current, TRUE));
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-FACADE: current(' . count($current) . ')[' . gettype($current) . ']=' . print_r($current, TRUE));
 
                        /*
                         * Remove some keys as they should not be published.
index e0b4d4856d0212ead7561d4235969509eeb6bc53..be46013b55ac1fb9e77dfb19c345b1171b850ec1 100644 (file)
@@ -89,7 +89,7 @@ class UniversalNodeLocatorDiscovery extends BaseNodeDiscovery implements Discove
         */
        public function discoverUniversalNodeLocatorByConfiguredAddress ($configKey) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('UNL-DISCOVERY:configKey=' . $configKey . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('UNL-DISCOVERY:configKey=' . $configKey . ' - CALLED!');
 
                // Is there cache?
                if (!isset($GLOBALS[__METHOD__][$configKey])) {
@@ -107,7 +107,7 @@ class UniversalNodeLocatorDiscovery extends BaseNodeDiscovery implements Discove
                } // END - if
 
                // Return cached value
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('UNL-DISCOVERY:configKey=' . $configKey . ',unl=' . $GLOBALS[__METHOD__][$configKey] . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('UNL-DISCOVERY:configKey=' . $configKey . ',unl=' . $GLOBALS[__METHOD__][$configKey] . ' - EXIT!');
                return $GLOBALS[__METHOD__][$configKey];
        }
 
index 6f80c04f5303a117f58bd1b5513be18fe27a9714..b34090cdd93296a1778874cd2dde5fdff2fa9bb4 100644 (file)
@@ -79,7 +79,7 @@ class PackageSocketDiscovery extends BaseRecipientDiscovery implements Discovera
         */
        public function discoverListenerInstance (HandleableProtocol $protocolInstance, array $packageData) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-DISCOVERY: protocolInstance=' . $protocolInstance->__toString() . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-DISCOVERY: protocolInstance=' . $protocolInstance->__toString() . ' - CALLED!');
 
                /*
                 * Get the listener pool instance, we need to lookup the matching
@@ -94,7 +94,7 @@ class PackageSocketDiscovery extends BaseRecipientDiscovery implements Discovera
                $protocolName = $protocolInstance->getProtocolName();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-DISCOVERY: protocolName=' . $protocolName);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-DISCOVERY: protocolName=' . $protocolName);
 
                /*
                 * Now we need to choose again. It is whether we are speaking with a hub
@@ -103,7 +103,7 @@ class PackageSocketDiscovery extends BaseRecipientDiscovery implements Discovera
                 */
                foreach ($poolInstance->getArrayFromList($protocolName) as $listenerInstance) {
                        // Debug output
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-DISCOVERY: protocolName=' . $protocolName . ',listenerInstance[' . gettype($listenerInstance) . ']=' . $listenerInstance);
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-DISCOVERY: protocolName=' . $protocolName . ',listenerInstance[' . gettype($listenerInstance) . ']=' . $listenerInstance);
 
                        // Make sure the instance is valid
                        assert($listenerInstance instanceof Listenable);
@@ -111,16 +111,16 @@ class PackageSocketDiscovery extends BaseRecipientDiscovery implements Discovera
                        // Does the listener want that package?
                        if ($listenerInstance->ifListenerAcceptsPackageData($packageData)) {
                                // This listener likes our package data, so abort here
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-DISCOVERY: Listener is accepting package data.');
+                               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-DISCOVERY: Listener is accepting package data.');
                                break;
                        } // END - if
 
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-DISCOVERY: Listener is NOT accepting package data.');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-DISCOVERY: Listener is NOT accepting package data.');
                } // END - foreach
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-DISCOVERY: listenerInstance=' . $listenerInstance->__toString());
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-DISCOVERY: listenerInstance=' . $listenerInstance->__toString());
 
                // Return it
                return $listenerInstance;
@@ -139,7 +139,7 @@ class PackageSocketDiscovery extends BaseRecipientDiscovery implements Discovera
         */
        public function discoverSocket (array $packageData, $connectionType) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(': connectionType=' . $connectionType . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-SOCKET-DISOVERY: connectionType=' . $connectionType . ' - CALLED!');
 
                // Assert on type and recipient
                assert($connectionType != StorableSocket::CONNECTION_TYPE_SERVER);
@@ -149,7 +149,7 @@ class PackageSocketDiscovery extends BaseRecipientDiscovery implements Discovera
                $protocolInstance = ProtocolDiscovery::determineProtocolByPackageData($packageData);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('protocolInstance=' . $protocolInstance . ',packageData=' . print_r($packageData, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('protocolInstance=' . $protocolInstance . ',packageData=' . print_r($packageData, TRUE));
 
                // Is it valid?
                assert($protocolInstance instanceof HandleableProtocol);
@@ -164,7 +164,7 @@ class PackageSocketDiscovery extends BaseRecipientDiscovery implements Discovera
                $listenerInstance = $this->discoverListenerInstance($protocolInstance, $packageData);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('listenerInstance=' . $listenerInstance . ',packageData=' . print_r($packageData, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('listenerInstance=' . $listenerInstance . ',packageData=' . print_r($packageData, TRUE));
 
                // If there is no listener who wants to have that package, we simply drop it here
                if (is_null($listenerInstance)) {
@@ -188,7 +188,7 @@ class PackageSocketDiscovery extends BaseRecipientDiscovery implements Discovera
                        // Try to create a new socket resource
                        try {
                                // Possibly noisy debug message
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-DISCOVERY: Trying to establish a ' . strtoupper($listenerInstance) . ' connection to ' . $packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT] . ' ...');
+                               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-DISCOVERY: Trying to establish a ' . strtoupper($listenerInstance->getProtocolName()) . ' connection to ' . $packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT] . ' ...');
 
                                // Get a socket resource from our factory (if succeeded)
                                $socketInstance = SocketFactory::createSocketFromPackageData($packageData, $protocolInstance);
@@ -204,7 +204,7 @@ class PackageSocketDiscovery extends BaseRecipientDiscovery implements Discovera
                        $helperInstance = Registry::getRegistry()->getInstance('connection');
 
                        // Possibly noisy debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-DISCOVERY: Going to resolve socket from peer state and given package data ...');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-DISCOVERY: Going to resolve socket from peer state and given package data ...');
 
                        // Resolve the peer's state (but ignore return value)
                        PeerStateResolver::resolveStateByPackage($helperInstance, $packageData, $socketInstance);
@@ -217,7 +217,7 @@ class PackageSocketDiscovery extends BaseRecipientDiscovery implements Discovera
                }
 
                // And return it
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-DISCOVERY: socketResource=' . $socketInstance->getSocketResource() . ',packageData=' . print_r($packageData, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-DISCOVERY: socketResource=' . $socketInstance->getSocketResource() . ',packageData=' . print_r($packageData, TRUE));
                return $socketInstance;
        }
 
index df00afa0ddb8894a49980b2a3b6aa5a7f4fdda2d..fd70f678d34851350eda0a85366bc40b23286f8a 100644 (file)
@@ -46,6 +46,9 @@ class UniversalNodeLocatorFactory extends ObjectFactory {
         * @return      $unlInstance    An instance of a LocateableNode class
         */
        public static final function createUnlInstanceFromString ($unl) {
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('UNL-FACTORY: unl=%s - CALLED!', $unl));
+
                // If there is no handler?
                if (Registry::getRegistry()->instanceExists('unl_' . $unl)) {
                        // Get handler from registry
index 1fb67772c6419232d737cd19b7359bb696676af2..5e35ab2b862e10785e819b338bbef947b603e8b4 100644 (file)
@@ -69,7 +69,7 @@ class SocketFactory extends ObjectFactory {
                $registryKey = 'socket_' . $protocolInstance->getProtocolName() . '_' . $packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT];
 
                // Debug message
-               //*NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Trying to find a socket with registryKey=' . $registryKey);
+               /NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Trying to find a socket with registryKey=' . $registryKey);
 
                // Is the key there?
                if (Registry::getRegistry()->instanceExists($registryKey)) {
@@ -77,13 +77,13 @@ class SocketFactory extends ObjectFactory {
                        $socketInstance = Registry::getRegistry()->getInstance($registryKey);
 
                        // Debug message
-                       //*NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Using socket ' . $socketInstance->getSocketResource() . '(' . gettype($socketInstance->getSocketResource()) . ') from registry.');
+                       /NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Using socket ' . $socketInstance->getSocketResource() . '(' . gettype($socketInstance->getSocketResource()) . ') from registry.');
                } else {
                        // Construct configuration entry for object factory and get it
                        $className = FrameworkConfiguration::getSelfInstance()->getConfigEntry($protocolInstance->getProtocolName() . '_connection_helper_class');
 
                        // Debug message
-                       //*NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Going to use class ' . $className . ' for creating a socket resource ...');
+                       /NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Going to use class ' . $className . ' for creating a socket resource ...');
 
                        // And call the static method
                        $socketInstance = call_user_func($className . '::createConnectionFromPackageData', $packageData);
@@ -92,9 +92,12 @@ class SocketFactory extends ObjectFactory {
                        Registry::getRegistry()->addInstance($registryKey, $socketInstance);
 
                        // Debug message
-                       //*NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Socket is now registered in registry.');
+                       /NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Socket is now registered in registry.');
                }
 
+               // Trace message
+               /* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SOCKET-FACTORY: socketInstance=%s - EXIT!', $socketInstance->__toString()));
+
                // Return the socket (container) instance
                return $socketInstance;
        }
@@ -178,6 +181,9 @@ class SocketFactory extends ObjectFactory {
                        $socketInstance->handleSocketError(__METHOD__, __LINE__, array_values($packageData));
                } // END - if
 
+               // Trace message
+               /* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SOCKET-FACTORY: socketInstance=%s - EXIT!', $socketInstance->__toString()));
+
                // Return socket instance
                return $socketInstance;
        }
@@ -196,7 +202,7 @@ class SocketFactory extends ObjectFactory {
                $socketResource = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
 
                // Debug message
-               //*NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Created socket ' . $socketResource . '(' . gettype($socketResource) . ') from class ' . $className . '.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Created socket[' . gettype($socketResource) . ']=' . $socketResource . '.');
 
                // Construct container class, this won't be reached if an exception is thrown
                $socketInstance = ObjectFactory::createObjectByConfiguredName('socket_container_class', array($socketResource, StorableSocket::SOCKET_PROTOCOL_TCP, $packageData));
@@ -235,6 +241,9 @@ class SocketFactory extends ObjectFactory {
                        $socketInstance->handleSocketError(__METHOD__, __LINE__, array('0.0.0.0', '0'));
                } // END - if
 
+               // Trace message
+               /* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SOCKET-FACTORY: socketInstance=%s - EXIT!', $socketInstance->__toString()));
+
                // Return it
                return $socketInstance;
        }
@@ -303,6 +312,9 @@ class SocketFactory extends ObjectFactory {
                        $socketInstance->handleSocketError(__METHOD__, __LINE__, array('0.0.0.0', '0'));
                } // END - if
 
+               // Trace message
+               /* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SOCKET-FACTORY: socketInstance=%s - EXIT!', $socketInstance->__toString()));
+
                // Return prepepared socket
                return $socketInstance;
        }
@@ -364,6 +376,9 @@ class SocketFactory extends ObjectFactory {
                        $socketInstance->handleSocketError(__METHOD__, __LINE__, array('0.0.0.0', '0'));
                } // END - if
 
+               // Trace message
+               /* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SOCKET-FACTORY: socketInstance=%s - EXIT!', $socketInstance->__toString()));
+
                // Return prepepared socket
                return $socketInstance;
        }
@@ -469,6 +484,9 @@ class SocketFactory extends ObjectFactory {
                        $socketInstance->handleSocketError(__METHOD__, __LINE__, array('0.0.0.0', '0'));
                } // END - if
 
+               // Trace message
+               /* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SOCKET-FACTORY: socketInstance=%s - EXIT!', $socketInstance->__toString()));
+
                // Return found socket instance
                return $socketInstance;
        }
index 746ccf24b2e20ea1385c5011b978589f6866ac10..ae82acdf50018e013257b57b18f09e5769459aa4 100644 (file)
@@ -92,13 +92,13 @@ class PeerStateFactory extends ObjectFactory {
                        $tableInstance->purgeOldEntriesBySocketInstance($socketInstance);
                } catch (InvalidSocketException $e) {
                        // Just log all errors
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Purging of old entries failed. Message from exception: ' . $e->getMessage());
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Purging of old entries failed. Message from exception: ' . $e->getMessage());
                }
 
                // Do we have an entry?
                if ($tableInstance->isSenderNewPeer($packageData)) {
                        // Debug output
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] errorCode=' . $errorCode);
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] errorCode=' . $errorCode);
 
                        // Register the new peer with its session id
                        $tableInstance->registerPeerByPackageData($packageData, $socketInstance);
@@ -113,7 +113,7 @@ class PeerStateFactory extends ObjectFactory {
                        $tableInstance->registerPeerState($stateInstance, $packageData);
                } elseif ($tableInstance->isSamePeerState($helperInstance, $packageData)) {
                        // Debug output
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Peer state unchanged, re-generating old state ...');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Peer state unchanged, re-generating old state ...');
 
                        /*
                         * The peer's state has noot changed, still we have to return a
@@ -122,7 +122,7 @@ class PeerStateFactory extends ObjectFactory {
                        $stateInstance = self::createPeerStateInstanceByName($helperInstance->getPrintableState(), $helperInstance);
                } else {
                        // Debug output
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Updating peer state ...');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Updating peer state ...');
 
                        /*
                         * It is an already known peer but with a changed state. So first
@@ -135,7 +135,7 @@ class PeerStateFactory extends ObjectFactory {
                }
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Peer state has changed from ' . $helperInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . ' (' . $stateInstance->__toString() . ').');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Peer state has changed from ' . $helperInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . ' (' . $stateInstance->__toString() . ').');
 
                // Set the state in the helper
                $helperInstance->setStateInstance($stateInstance);
@@ -157,7 +157,7 @@ class PeerStateFactory extends ObjectFactory {
                $stateInstance = self::createObjectByConfiguredName('peer_' . $stateName . '_state_class', array($helperInstance));
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Peer state has changed from ' . $helperInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . ' (' . $stateInstance->__toString() . ').');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Peer state has changed from ' . $helperInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . ' (' . $stateInstance->__toString() . ').');
 
                // Once we have that state, set it in the peer instance
                $helperInstance->setStateInstance($stateInstance);
@@ -165,7 +165,5 @@ class PeerStateFactory extends ObjectFactory {
                // For any purposes, return the state instance
                return $stateInstance;
        }
-}
 
-// [EOF]
-?>
+}
index 9e3b94d5a7e0cecd67f3350740c9de0b32566378..14d3b234b340d6c40c9057515d1d53061b7bd680 100644 (file)
@@ -63,13 +63,13 @@ class HubcoinRewardFeature extends BaseFeature implements Feature {
         */
        public function isFeatureAvailable () {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: CALLED!', __METHOD__, __LINE__));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: CALLED!', __METHOD__, __LINE__));
 
                // Testing this feature is pretty simple:
                $isAvailable = (($this->getConfigInstance()->getConfigEntry('extension_scrypt_loaded') === TRUE) && (extension_loaded('scrypt')) && (is_callable('scrypt')));
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: isAvailable=%d - EXIT!', __METHOD__, __LINE__, intval($isAvailable)));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: isAvailable=%d - EXIT!', __METHOD__, __LINE__, intval($isAvailable)));
 
                // Return status
                return $isAvailable;
@@ -87,7 +87,7 @@ class HubcoinRewardFeature extends BaseFeature implements Feature {
         */
        public function featureMethodGenerateHash ($data) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: data()=%d - CALLED!', __METHOD__, __LINE__, strlen($data)));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: data()=%d - CALLED!', __METHOD__, __LINE__, strlen($data)));
 
                // Make sure the feature is available
                assert(FrameworkFeature::isFeatureAvailable('hubcoin_reward'));
@@ -96,7 +96,7 @@ class HubcoinRewardFeature extends BaseFeature implements Feature {
                $hash = Scrypt::hashScrypt($data);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: hash=%s - EXIT!', __METHOD__, __LINE__, $hash));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: hash=%s - EXIT!', __METHOD__, __LINE__, $hash));
 
                // Return generated hash
                return $hash;
@@ -111,7 +111,7 @@ class HubcoinRewardFeature extends BaseFeature implements Feature {
         */
        public function featureMethodCheckHash ($data, $hash) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: data()=%d,hash=%s - CALLED!', __METHOD__, __LINE__, strlen($data), $hash));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: data()=%d,hash=%s - CALLED!', __METHOD__, __LINE__, strlen($data), $hash));
 
                // Make sure the feature is available
                assert(FrameworkFeature::isFeatureAvailable('hubcoin_reward'));
@@ -120,12 +120,10 @@ class HubcoinRewardFeature extends BaseFeature implements Feature {
                $isValid = Scrypt::checkScrypt($data, $hash);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: isValid=%d - EXIT!', __METHOD__, __LINE__, intval($isValid)));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: isValid=%d - EXIT!', __METHOD__, __LINE__, intval($isValid)));
 
                // Return status
                return $isValid;
        }
-}
 
-// [EOF]
-?>
+}
index 5bb5be73b52af43dc708af221b1c1e04d44a474a..1189f940cb9969eedd0fe687e5210165e70bcec9 100644 (file)
@@ -83,7 +83,7 @@ class BaseHubFilter extends BaseFilter {
                $templateInstance->renderXmlContent($messageContent);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(str_replace('_', '-', strtoupper($messageType)) . '-TAG: Handling ' . strlen($messageContent) . ' bytes: ' . $messageContent);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(str_replace('_', '-', strtoupper($messageType)) . '-TAG: Handling ' . strlen($messageContent) . ' bytes: ' . $messageContent);
 
                /*
                 * The template system now stores all required data as 'general'
@@ -108,7 +108,7 @@ class BaseHubFilter extends BaseFilter {
                        } // END - if
 
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(str_replace('_', '-', strtoupper($messageType)) . '-TAG: key=' . $key . ',value=' . $value);
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(str_replace('_', '-', strtoupper($messageType)) . '-TAG: key=' . $key . ',value=' . $value);
 
                        // Set it now
                        $this->dataXmlNodes[$key] = $value;
index 94df363281497dde0a4e8240b710b70d8aab798b..83a5148f3248c17298f9c59c2436304ccc1573ba 100644 (file)
@@ -72,11 +72,11 @@ class NodeInitializationFilter extends BaseNodeFilter implements Filterable {
                } catch (ClassNotFoundException $e) {
                        // This exception means, the node mode is invalid.
                        // @TODO Can we rewrite this to app_exit() ?
-                       $this->debugBackTrace(':  node mode ' . $nodeMode . ' is invalid.');
+                       $this->debugBackTrace(':  node mode ' . $requestInstance->getRequestElement('mode') . ' is invalid.');
                }
 
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-INIT-FILTER: Node ' . $nodeMode . ' has been added to registry.');
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-INIT-FILTER: Node ' . $nodeInstance->__toString() . ' has been added to registry.');
        }
 
 }
index e8331438753cba0dbc580d49326185813e1cc928..b2dbace00486092e21083fb8a94c465b57fc6afc 100644 (file)
@@ -143,7 +143,7 @@ class ChunkHandler extends BaseHubHandler implements HandleableChunks, Registera
         */
        private function initHandler () {
                // Noisy debug line:
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: Initializing handler ...');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: Initializing handler ...');
 
                // Init finalPackageChunks
                $this->finalPackageChunks = array(
@@ -175,7 +175,7 @@ class ChunkHandler extends BaseHubHandler implements HandleableChunks, Registera
         */
        private function isChunkHashValid (array $chunkSplits) {
                // Noisy debug line:
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: chunkSplits=' . print_r($chunkSplits, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: chunkSplits=' . print_r($chunkSplits, TRUE));
 
                // Assert on some elements
                assert(isset($chunkSplits[self::CHUNK_SPLITS_INDEX_RAW_DATA]));
@@ -188,7 +188,7 @@ class ChunkHandler extends BaseHubHandler implements HandleableChunks, Registera
                $isValid = ($chunkSplits[self::CHUNK_SPLITS_INDEX_HASH] === $chunkHash);
 
                // Debug output
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: chunkHash=' . $chunkHash . ',isValid=' . intval($isValid));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: chunkHash=' . $chunkHash . ',isValid=' . intval($isValid));
 
                // ... and return it
                return $isValid;
@@ -227,7 +227,7 @@ class ChunkHandler extends BaseHubHandler implements HandleableChunks, Registera
                } // END - if
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: serialNumber=' . $chunkSplits[self::CHUNK_SPLITS_INDEX_SERIAL] . ',hash=' . $chunkSplits[self::CHUNK_SPLITS_INDEX_HASH]);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: serialNumber=' . $chunkSplits[self::CHUNK_SPLITS_INDEX_SERIAL] . ',hash=' . $chunkSplits[self::CHUNK_SPLITS_INDEX_HASH]);
 
                // Add the chunk data (index 2) to the final array and use the serial number as index
                $this->finalPackageChunks['content'][$chunkSplits[self::CHUNK_SPLITS_INDEX_SERIAL]] = $chunkSplits[self::CHUNK_SPLITS_INDEX_RAW_DATA];
@@ -306,7 +306,7 @@ class ChunkHandler extends BaseHubHandler implements HandleableChunks, Registera
         */
        private function verifyChunkSerialNumbers () {
                // Debug message
-               //* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: finalPackageChunks=' . print_r($this->finalPackageChunks, TRUE));
+               /* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: finalPackageChunks=' . print_r($this->finalPackageChunks, TRUE));
 
                // Get final hash
                $finalHash = $this->generateFinalHash(implode('', $this->finalPackageChunks['content']));
@@ -320,7 +320,7 @@ class ChunkHandler extends BaseHubHandler implements HandleableChunks, Registera
                        $nextSerial = $this->fragmenterInstance->getNextHexSerialNumber($finalHash);
 
                        // Debug output
-                       //* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: serialNumber=' . $serialNumber . ',nextSerial=' . $nextSerial);
+                       /* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: serialNumber=' . $serialNumber . ',nextSerial=' . $nextSerial);
 
                        // Is it not the same? Then re-request it
                        if ($serialNumber != $nextSerial) {
@@ -349,14 +349,14 @@ class ChunkHandler extends BaseHubHandler implements HandleableChunks, Registera
                $this->rawPackageData = '';
 
                // That went well, so start assembling all chunks
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: Handling ' . count($this->finalPackageChunks['content']) . ' entries ...');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: Handling ' . count($this->finalPackageChunks['content']) . ' entries ...');
                foreach ($this->finalPackageChunks['content'] as $serialNumber => $content) {
                        // Assert on 'hash' entry (must always be set)
                        assert(isset($this->finalPackageChunks['hashes'][$serialNumber]));
 
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: serialNumber=' . $serialNumber . ',hashes=' . $this->finalPackageChunks['hashes'][$serialNumber] . ' - validating ...');
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('finalPackageChunks=' . print_r($this->finalPackageChunks, TRUE) . 'chunkHashes=' . print_r($this->chunkHashes, TRUE));
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: serialNumber=' . $serialNumber . ',hashes=' . $this->finalPackageChunks['hashes'][$serialNumber] . ' - validating ...');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('finalPackageChunks=' . print_r($this->finalPackageChunks, TRUE) . 'chunkHashes=' . print_r($this->chunkHashes, TRUE));
 
                        // Is this chunk valid? This should be the case
                        assert($this->isChunkHashValid(array(
@@ -368,12 +368,12 @@ class ChunkHandler extends BaseHubHandler implements HandleableChunks, Registera
                        assert(in_array($this->finalPackageChunks['hashes'][$serialNumber], $this->chunkHashes));
 
                        // Verification okay, add it to the raw data
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: Adding ' . strlen($content) . ' bytes as raw package data ...');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: Adding ' . strlen($content) . ' bytes as raw package data ...');
                        $this->rawPackageData .= $content;
                } // END - foreach
 
                // Debug output
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: eopChunk[1]=' . $this->eopChunk[1] . ',index=' . (count($this->chunkHashes) - 2) . ',chunkHashes='.print_r($this->chunkHashes, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: eopChunk[1]=' . $this->eopChunk[1] . ',index=' . (count($this->chunkHashes) - 2) . ',chunkHashes='.print_r($this->chunkHashes, TRUE));
 
                // The last chunk hash must match with the one from eopChunk[1]
                assert($this->eopChunk[1] == $this->chunkHashes[count($this->chunkHashes) - 2]);
@@ -411,7 +411,7 @@ class ChunkHandler extends BaseHubHandler implements HandleableChunks, Registera
                $finalHash = $this->generateFinalHash($this->rawPackageData);
 
                // Is it the same?
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: eopChunk[1]=' . $this->eopChunk[1] . ',finalHash=' . $finalHash);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: eopChunk[1]=' . $this->eopChunk[1] . ',finalHash=' . $finalHash);
                assert($finalHash == $this->eopChunk[0]);
        }
 
@@ -429,7 +429,7 @@ class ChunkHandler extends BaseHubHandler implements HandleableChunks, Registera
                $chunkSplits = explode(PackageFragmenter::CHUNK_DATA_HASH_SEPARATOR, $chunks[count($chunks) - 1]);
 
                // Make sure chunks with only 3 elements are parsed (for details see ChunkHandler)
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('eopChunk=' . $chunks[count($chunks) - 1] . ',chunkSplits=' . print_r($chunkSplits, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('eopChunk=' . $chunks[count($chunks) - 1] . ',chunkSplits=' . print_r($chunkSplits, TRUE));
                assert(count($chunkSplits) == 3);
 
                // Validate final chunk
@@ -640,11 +640,11 @@ class ChunkHandler extends BaseHubHandler implements HandleableChunks, Registera
         */
        public function ifRawPackageDataIsAvailable () {
                // Check it
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: this->rawPackageData()=' . strlen($this->rawPackageData) . ',ifUnassembledChunksAvailable()=' . intval($this->ifUnassembledChunksAvailable()));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: this->rawPackageData()=' . strlen($this->rawPackageData) . ',ifUnassembledChunksAvailable()=' . intval($this->ifUnassembledChunksAvailable()));
                $isRawPackageDataAvailable = ((!empty($this->rawPackageData)) && (!$this->ifUnassembledChunksAvailable()));
 
                // Return it
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: isRawPackageDataAvailable=' . intval($isRawPackageDataAvailable));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: isRawPackageDataAvailable=' . intval($isRawPackageDataAvailable));
                return $isRawPackageDataAvailable;
        }
 
@@ -659,7 +659,7 @@ class ChunkHandler extends BaseHubHandler implements HandleableChunks, Registera
                assert($this->ifRawPackageDataIsAvailable());
 
                // Then feed it into the next stacker
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: Pushing ' . strlen($this->rawPackageData) . ' bytes to stack ' . self::STACKER_NAME_ASSEMBLED_RAW_DATA . ' ...');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: Pushing ' . strlen($this->rawPackageData) . ' bytes to stack ' . self::STACKER_NAME_ASSEMBLED_RAW_DATA . ' ...');
                $this->getStackInstance()->pushNamed(self::STACKER_NAME_ASSEMBLED_RAW_DATA, $this->rawPackageData);
 
                // ... and reset it
index 1882fb2e3b95c4c18b856deabcdd8f1adfb36326..debb99b65fd970ab8f7a6f86cebe6856994567a1 100644 (file)
@@ -153,12 +153,12 @@ class NodeMessageAnnouncementHandler extends BaseMessageHandler implements Handl
         */
        protected function initMessageConfigurationData (array $messageData) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('ANNOUNCEMENT-HANDLER: messageData=' . print_r($messageData, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('ANNOUNCEMENT-HANDLER: messageData=' . print_r($messageData, TRUE));
 
                // "Walk" throught the translation array
                foreach ($this->messageToConfig as $messageKey => $configKey) {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('ANNOUNCEMENT-HANDLER: Setting messageKey=' . $messageKey . ',configKey=' . $configKey . ':' . $messageData[$messageKey]);
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('ANNOUNCEMENT-HANDLER: Setting messageKey=' . $messageKey . ',configKey=' . $configKey . ':' . $messageData[$messageKey]);
 
                        // Set the element in configuration
                        $this->getConfigInstance()->setConfigEntry($configKey, $messageData[$messageKey]);
@@ -167,7 +167,7 @@ class NodeMessageAnnouncementHandler extends BaseMessageHandler implements Handl
                // "Walk" throught the config-copy array
                foreach ($this->configCopy as $targetKey => $sourceKey) {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('ANNOUNCEMENT-HANDLER: Copying from sourceKey=' . $sourceKey . ' to targetKey=' . $targetKey . '...');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('ANNOUNCEMENT-HANDLER: Copying from sourceKey=' . $sourceKey . ' to targetKey=' . $targetKey . '...');
 
                        // Copy from source to targetKey
                        $this->getConfigInstance()->setConfigEntry($targetKey, $this->getConfigInstance()->getConfigEntry($sourceKey));
@@ -203,7 +203,5 @@ class NodeMessageAnnouncementHandler extends BaseMessageHandler implements Handl
                // Remove NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_ANSWER_STATUS as well
                $this->getConfigInstance()->unsetConfigEntry(NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_ANSWER_STATUS);
        }
-}
 
-// [EOF]
-?>
+}
index f2a4aa3282d1883d90e6b7e0b6a2006ddaa67ab9..4f646d72d12049138598e911741a7ccf9efdf1fc 100644 (file)
@@ -120,12 +120,12 @@ class NodeMessageRequestNodeListAnswerHandler extends BaseMessageHandler impleme
                parent::addArrayToDataSet($dataSetInstance, $messageData);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('ANSWER-HANDLER: messageData=' . print_r($messageData, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('ANSWER-HANDLER: messageData=' . print_r($messageData, TRUE));
 
                // Add all ements
                foreach ($this->messageDataElements as $key) {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('ANSWER-HANDLER: messageData[' . $key . ']=' . $messageData[$key]);
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('ANSWER-HANDLER: messageData[' . $key . ']=' . $messageData[$key]);
 
                        // Is it there?
                        assert(isset($messageData[$key]));
@@ -162,7 +162,5 @@ class NodeMessageRequestNodeListAnswerHandler extends BaseMessageHandler impleme
                // Please don't call this method
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
-}
 
-// [EOF]
-?>
+}
index dfaa234bc00e69039f53d4d78ebef68cffcc100b..61dc2e02696b8aaa33d9b40b0a62dde38a9ed138 100644 (file)
@@ -144,12 +144,12 @@ class NodeMessageDhtBootstrapHandler extends BaseMessageHandler implements Handl
         */
        protected function initMessageConfigurationData (array $messageData) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-BOOTSTRAP-HANDLER: messageData=' . print_r($messageData, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-BOOTSTRAP-HANDLER: messageData=' . print_r($messageData, TRUE));
 
                // "Walk" throught the translation array
                foreach ($this->messageToConfig as $messageKey => $configKey) {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-BOOTSTRAP-HANDLER: Setting messageKey=' . $messageKey . ',configKey=' . $configKey . ':' . $messageData[$messageKey]);
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-BOOTSTRAP-HANDLER: Setting messageKey=' . $messageKey . ',configKey=' . $configKey . ':' . $messageData[$messageKey]);
 
                        // Set the element in configuration
                        $this->getConfigInstance()->setConfigEntry($configKey, $messageData[$messageKey]);
@@ -158,7 +158,7 @@ class NodeMessageDhtBootstrapHandler extends BaseMessageHandler implements Handl
                // "Walk" throught the config-copy array
                foreach ($this->configCopy as $targetKey => $sourceKey) {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-BOOTSTRAP-HANDLER: Copying from sourceKey=' . $sourceKey . ' to targetKey=' . $targetKey . '...');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-BOOTSTRAP-HANDLER: Copying from sourceKey=' . $sourceKey . ' to targetKey=' . $targetKey . '...');
 
                        // Copy from source to target key
                        $this->getConfigInstance()->setConfigEntry($targetKey, $this->getConfigInstance()->getConfigEntry($sourceKey));
@@ -209,7 +209,5 @@ class NodeMessageDhtBootstrapHandler extends BaseMessageHandler implements Handl
                $this->getConfigInstance()->unsetConfigEntry(NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_ANSWER_STATUS);
                $this->getConfigInstance()->unsetConfigEntry('dht_nodes');
        }
-}
 
-// [EOF]
-?>
+}
index e74527a679144e5dd5edcd850cd453de634ac1af..ce01a51e6d609607047c8826161c1ffce69250a1 100644 (file)
@@ -133,12 +133,12 @@ class NodeMessageRequestNodeListHandler extends BaseMessageHandler implements Ha
         */
        protected function initMessageConfigurationData (array $messageData) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REQUEST-HANDLER: messageData=' . print_r($messageData, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REQUEST-HANDLER: messageData=' . print_r($messageData, TRUE));
 
                // "Walk" throught the config-copy array
                foreach ($this->configCopy as $targetKey => $sourceKey) {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REQUEST-HANDLER: Copying from sourceKey=' . $sourceKey . ' to targetKey=' . $targetKey . '...');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REQUEST-HANDLER: Copying from sourceKey=' . $sourceKey . ' to targetKey=' . $targetKey . '...');
 
                        // Copy from source to targetKey
                        $this->getConfigInstance()->setConfigEntry($targetKey, $this->getConfigInstance()->getConfigEntry($sourceKey));
@@ -184,7 +184,5 @@ class NodeMessageRequestNodeListHandler extends BaseMessageHandler implements Ha
                $this->getConfigInstance()->unsetConfigEntry(NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_ANSWER_STATUS);
                $this->getConfigInstance()->unsetConfigEntry('node_list');
        }
-}
 
-// [EOF]
-?>
+}
index a66f951c43f99a87a849ca90066950cf2df56fb6..88a7052a2fb15f308f45d3e5681e7eb55e9950e3 100644 (file)
@@ -56,13 +56,13 @@ abstract class BaseProtocolHandler extends BaseHubHandler implements HandleableP
         */
        protected final function isValidUniversalNodeLocator ($unl) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(': unl=' . $unl . ',regex=' . $regex . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PROTOCOL-HANDLER: unl=' . $unl . ' - CALLED!');
 
                // Very basic regex check
                $isValid = (preg_match($this->getRegularExpression(), $unl) === 1);
 
                // Return result
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(': isValid=' . intval($isValid) . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PROTOCOL-HANDLER: isValid=' . intval($isValid) . ' - EXIT!');
                return $isValid;
        }
 
@@ -111,14 +111,14 @@ abstract class BaseProtocolHandler extends BaseHubHandler implements HandleableP
                $internalUnl = HubTools::determineOwnInternalAddress();
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(': unl=' . $unl . ',externalUnl=' . $externalUnl . ',internalUnl=' . $internalUnl);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PROTOCOL-HANDLER: unl=' . $unl . ',externalUnl=' . $externalUnl . ',internalUnl=' . $internalUnl);
                //* DIE-DEBUG: */ die(__METHOD__.':unl=' . $unl . ',this='.print_r($this, TRUE));
 
                // Is it the same?
                $ifMatches = (($unl === $externalUnl) || ($unl === $internalUnl));
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(': ifMatches=' . intval($ifMatches));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PROTOCOL-HANDLER: ifMatches=' . intval($ifMatches));
 
                // Return result
                return $ifMatches;
index 2abc2e4a4d04ce664806b05f759b871e95b66c8c..be158038bad0386b855a352c46fa4bebc8eade9a 100644 (file)
@@ -80,7 +80,7 @@ abstract class BaseIpV4ProtocolHandler extends BaseProtocolHandler {
         */
        public function isValidUniversalNodeLocatorByPackageData (array $packageData) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(': CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('IPV4-PROTOCOL-HANDLER: CALLED!');
 
                // Is 'recipient' there?
                assert(isset($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT]));
@@ -92,7 +92,7 @@ abstract class BaseIpV4ProtocolHandler extends BaseProtocolHandler {
                $isValid = $this->isValidUniversalNodeLocator($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT]);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(': PACKAGE_DATA_RECIPIENT=' . $packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT] . ',isValid[' . gettype($isValid) . ']=' . intval($isValid));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('IPV4-PROTOCOL-HANDLER: PACKAGE_DATA_RECIPIENT=' . $packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT] . ',isValid[' . gettype($isValid) . ']=' . intval($isValid));
 
                // If this doesn't fail, continue validating the IP:port combination
                if ($isValid === TRUE) {
@@ -108,7 +108,7 @@ abstract class BaseIpV4ProtocolHandler extends BaseProtocolHandler {
                } // END - if
 
                // Return result
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(': isValid=' . intval($isValid) . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('IPV4-PROTOCOL-HANDLER: isValid=' . intval($isValid) . ' - EXIT!');
                return $isValid;
        }
 
index 3832dc37b72fdddaca99f2093728dcf378b38fec..a758a1e7496bdc49b56503d816a474c599036cab 100644 (file)
@@ -74,7 +74,7 @@ class TcpRawDataHandler extends BaseRawDataHandler implements Networkable {
                $this->setErrorCode(self::SOCKET_ERROR_UNHANDLED);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-HANDLER: Handling TCP package from resource=' . $socketArray[Poolable::SOCKET_ARRAY_INSTANCE] . ',type=' . $socketArray[Poolable::SOCKET_ARRAY_CONN_TYPE] . ',last error=' . socket_strerror($this->lastSocketError));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-HANDLER: Handling TCP package from resource=' . $socketArray[Poolable::SOCKET_ARRAY_INSTANCE] . ',type=' . $socketArray[Poolable::SOCKET_ARRAY_CONN_TYPE] . ',last error=' . socket_strerror($this->lastSocketError));
 
                /*
                 * Read the raw data from socket. If you change PHP_BINARY_READ to
@@ -87,13 +87,13 @@ class TcpRawDataHandler extends BaseRawDataHandler implements Networkable {
                $this->lastSocketError = socket_last_error($socketArray[Poolable::SOCKET_ARRAY_INSTANCE]);
 
                // Debug output of read data length
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-HANDLER: rawData[' . gettype($rawData) . ']=' . strlen($rawData) . ',MD5=' . md5($rawData) . ',resource=' . $socketArray[Poolable::SOCKET_ARRAY_INSTANCE] . ',error=' . socket_strerror($this->lastSocketError));
-               //* NOISY-DEBUG: */ if ($rawData !== FALSE) self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-HANDLER: rawData=' . $rawData);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-HANDLER: rawData[' . gettype($rawData) . ']=' . strlen($rawData) . ',MD5=' . md5($rawData) . ',resource=' . $socketArray[Poolable::SOCKET_ARRAY_INSTANCE] . ',error=' . socket_strerror($this->lastSocketError));
+               /* NOISY-DEBUG: */ if ($rawData !== FALSE) self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-HANDLER: rawData=' . $rawData);
 
                // Is it valid?
                if ($this->lastSocketError == 11) {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-HANDLER: Ignoring error 11 (Resource temporary unavailable) from socket resource=' . $socketArray[Poolable::SOCKET_ARRAY_INSTANCE]);
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-HANDLER: Ignoring error 11 (Resource temporary unavailable) from socket resource=' . $socketArray[Poolable::SOCKET_ARRAY_INSTANCE]);
 
                        /*
                         * Error code 11 (Resource temporary unavailable) can be safely
@@ -117,7 +117,7 @@ class TcpRawDataHandler extends BaseRawDataHandler implements Networkable {
                         * well-formed BASE64-encoded message with start and markers. This
                         * will be checked later on.
                         */
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-HANDLER: Adding ' . strlen($rawData) . ' bytes to stacker ...');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-HANDLER: Adding ' . strlen($rawData) . ' bytes to stacker ...');
                        $this->addRawDataToStacker($rawData);
                }
        }
index 1fd16faffa366a6b942004e6e6f673a2de4cf6bb..9cc478d7026dae3e322d1a8b00e56f9cf8d8f26e 100644 (file)
@@ -180,7 +180,7 @@ class BaseConnectionHelper extends BaseHubSystemHelper implements Visitable, Reg
         */
        private function getRawDataFromPackageArray (array $packageData) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: currentFinalHash=' . $this->currentFinalHash);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: currentFinalHash=' . $this->currentFinalHash);
 
                // Make sure the final hash is set
                assert((is_string($this->currentFinalHash)) && (!empty($this->currentFinalHash)));
@@ -189,25 +189,25 @@ class BaseConnectionHelper extends BaseHubSystemHelper implements Visitable, Reg
                $rawDataChunk = $this->getFragmenterInstance()->getNextRawDataChunk($this->currentFinalHash);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: rawDataChunk=' . print_r($rawDataChunk, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: rawDataChunk=' . print_r($rawDataChunk, TRUE));
 
                // Get chunk hashes and chunk data
                $chunkHashes = array_keys($rawDataChunk);
                $chunkData   = array_values($rawDataChunk);
 
                // Is the required data there?
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: chunkHashes[]=' . count($chunkHashes) . ',chunkData[]=' . count($chunkData));
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('chunkData='.print_r($chunkData, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: chunkHashes[]=' . count($chunkHashes) . ',chunkData[]=' . count($chunkData));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('chunkData='.print_r($chunkData, TRUE));
                if ((isset($chunkHashes[0])) && (isset($chunkData[0]))) {
                        // Remember this chunk as queued
                        $this->queuedChunks[$chunkHashes[0]] = $chunkData[0];
 
                        // Return the raw data
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Returning ' . strlen($chunkData[0]) . ' bytes from ' . __METHOD__ . ' ...');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Returning ' . strlen($chunkData[0]) . ' bytes from ' . __METHOD__ . ' ...');
                        return $chunkData[0];
                } else {
                        // Return zero string
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Returning zero bytes from ' . __METHOD__ . '!');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Returning zero bytes from ' . __METHOD__ . '!');
                        return '';
                }
        }
@@ -219,8 +219,14 @@ class BaseConnectionHelper extends BaseHubSystemHelper implements Visitable, Reg
         * @return      void
         */
        public function accept (Visitor $visitorInstance) {
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: visitorInstance=%s - CALLED!', $visitorInstance->__toString()));
+
                // Just call the visitor
                $visitorInstance->visitConnectionHelper($this);
+
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: EXIT!');
        }
 
        /**
@@ -230,16 +236,22 @@ class BaseConnectionHelper extends BaseHubSystemHelper implements Visitable, Reg
         * @return      void
         */
        public function sendRawPackageData (array $packageData) {
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: packageData()=%d - CALLED!', count($packageData)));
+
                // The helper's state must be 'connected'
                $this->getStateInstance()->validatePeerStateConnected();
 
                // Implode the package data array and fragement the resulting string, returns the final hash
                $finalHash = $this->getFragmenterInstance()->fragmentPackageArray($packageData, $this);
 
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: finalHash[%s]=%s', gettype($finalHash), $finalHash));
+
                // Is the final hash set?
                if ($finalHash !== TRUE) {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Setting finalHash=' . $finalHash . ',currentFinalHash[' . gettype($this->currentFinalHash) . ']=' . $this->currentFinalHash);
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Setting finalHash=' . $finalHash . ',currentFinalHash[' . gettype($this->currentFinalHash) . ']=' . $this->currentFinalHash);
 
                        // Set final hash
                        $this->currentFinalHash = $finalHash;
@@ -253,27 +265,43 @@ class BaseConnectionHelper extends BaseHubSystemHelper implements Visitable, Reg
                $dataStream     = ' ';
 
                // Fill sending buffer with data
-               while (strlen($dataStream) > 0) {
+               while (TRUE) {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: packageData=' . print_r($packageData, TRUE));
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: dataStream()=%d', strlen($dataStream)));
 
                        // Convert the package data array to a raw data stream
                        $dataStream = $this->getRawDataFromPackageArray($packageData);
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Adding ' . strlen($dataStream) . ' bytes to the sending buffer ...');
+
+                       // Is it empty?
+                       if (strlen($dataStream) == 0) {
+                               // Abort here
+                               break;
+                       } // END - if
+
+                       // Debug message
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Adding ' . strlen($dataStream) . ' bytes to the sending buffer ...');
+
+                       // Add raw data
                        $rawData .= $dataStream;
                } // END - while
 
+               // Debug message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: rawData()=%d', strlen($rawData)));
+
                // Nothing to sent is bad news, so assert on it
                assert(strlen($rawData) > 0);
 
                // Calculate buffer size
                $bufferSize = $this->getConfigInstance()->getConfigEntry($this->getProtocolName() . '_buffer_length');
 
+               // Debug message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: bufferSize=%d', $bufferSize));
+
                // Encode the raw data with our output-stream
                $encodedData = $this->getOutputStreamInstance()->streamData($rawData);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HELPER: socketResource[]=' . gettype($this->getSocketInstance()->getSocketResource()) . PHP_EOL);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: socketResource[]=' . gettype($this->getSocketInstance()->getSocketResource()));
 
                // Init array
                $encodedDataArray = array(
@@ -288,8 +316,14 @@ class BaseConnectionHelper extends BaseHubSystemHelper implements Visitable, Reg
                // Calculate difference
                $diff = $encodedDataArray[NetworkPackage::RAW_INDEX_BUFFER_SIZE] - strlen($encodedDataArray[NetworkPackage::RAW_INDEX_ENCODED_DATA]);
 
+               // Debug message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: diff=' . $diff);
+
                // Push raw data to the package's outgoing stack
                $this->getPackageInstance()->getStackInstance()->pushNamed(NetworkPackage::STACKER_NAME_OUTGOING_STREAM, $encodedDataArray);
+
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: EXIT!');
        }
 
        /**
@@ -298,7 +332,7 @@ class BaseConnectionHelper extends BaseHubSystemHelper implements Visitable, Reg
         * @return      $shuttedDown    Whether this connection is shutted down
         */
        public final function isShuttedDown () {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: ' . $this->__toString() . ',shuttedDown=' . intval($this->shuttedDown));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: ' . $this->__toString() . ',shuttedDown=' . intval($this->shuttedDown));
                return $this->shuttedDown;
        }
 
index ec16978f6ee3cc4c6cc78ab8adde6d6070a907b9..877f08556f8daba6ae73cd74ff86bf9029190e1a 100644 (file)
@@ -141,7 +141,7 @@ class BaseIpV4ConnectionHelper extends BaseConnectionHelper {
         * @return      void
         */
        protected final function markConnectionShuttedDown () {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: ' . $this->__toString() . ' has been marked as shutted down');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: ' . $this->__toString() . ' has been marked as shutted down');
                $this->shuttedDown = TRUE;
 
                // And remove the (now invalid) socket
index afd3b8de5a3392ac55ef726c4e39ec65f784a01c..6df429e11c13fae24f715c15c9a00613de828e66 100644 (file)
@@ -97,7 +97,7 @@ class DhtBootstrapHelper extends BaseHubSystemHelper implements HelpableDht {
         */
        public function sendPackage (Distributable $dhtInstance) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HELPER: CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HELPER: CALLED!');
 
                /*
                 * Sanity check: Is the DHT in the approx. state? 'init' for bootstrap
@@ -116,7 +116,7 @@ class DhtBootstrapHelper extends BaseHubSystemHelper implements HelpableDht {
                $packageInstance->enqueueRawDataFromTemplate($this);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HELPER: EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HELPER: EXIT!');
        }
 
 }
index 50319ec8f5d23141f99feee292bed89e7789cadf..13510d06ee644a30cf002170f714ac8488fee08c 100644 (file)
@@ -66,7 +66,7 @@ class ConnectionInfo extends BaseInfo implements ShareableInfo, Registerable {
         */
        public function fillWithListenerInformation (Listenable $listenerInstance) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(': protocolName=' . $listenerInstance->getProtocolName() . ',listenerInstance=' . $listenerInstance->__toString() . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-INFO: protocolName=' . $listenerInstance->getProtocolName() . ',listenerInstance=' . $listenerInstance->__toString() . ' - CALLED!');
 
                // Fill the generic array with several data from the listener:
                $this->setProtocolName($listenerInstance->getProtocolName());
@@ -77,7 +77,7 @@ class ConnectionInfo extends BaseInfo implements ShareableInfo, Registerable {
                $this->setListenerInstance($listenerInstance);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(': EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-INFO: EXIT!');
        }
 
        /**
@@ -88,7 +88,7 @@ class ConnectionInfo extends BaseInfo implements ShareableInfo, Registerable {
         */
        public function fillWithConnectionHelperInformation (ConnectionHelper $helperInstance) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(': protocolName=' . $helperInstance->getProtocolName() . ',helperInstance=' . $helperInstance->__toString() . ',socketResource=' . $helperInstance->getSocketResource() . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-INFO: protocolName=' . $helperInstance->getProtocolName() . ',helperInstance=' . $helperInstance->__toString() . ',socketResource=' . $helperInstance->getSocketResource() . ' - CALLED!');
 
                // Fill the generic array with several data from the listener:
                $this->setProtocolName($helperInstance->getSocketInstance()->getSocketProtocol());
@@ -99,7 +99,7 @@ class ConnectionInfo extends BaseInfo implements ShareableInfo, Registerable {
                $this->setHelperInstance($helperInstance);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(': EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-INFO: EXIT!');
        }
 
        /**
index a7bf4602b27925e6ba6dad984b3081f22ea9547f..90fe089b31f603d336f6b83c12f4d5129ebebb06 100644 (file)
@@ -219,7 +219,7 @@ class BaseListener extends BaseHubSystem implements Visitable {
         */
        public function accept (Visitor $visitorInstance) {
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getProtocolName()) . '-LISTENER: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - CALLED!');
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getProtocolName()) . '-LISTENER: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - CALLED!');
 
                // Visit this listener
                $visitorInstance->visitListener($this);
@@ -230,7 +230,7 @@ class BaseListener extends BaseHubSystem implements Visitable {
                } // END - if
 
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getProtocolName()) . '-LISTENER: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - EXIT!');
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getProtocolName()) . '-LISTENER: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - EXIT!');
        }
 
        /**
@@ -307,7 +307,7 @@ class BaseListener extends BaseHubSystem implements Visitable {
                $currentSocketData = $this->getIteratorInstance()->current();
 
                // Handle it here, if not main server socket
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-LISTENER: currentSocketData=' . $currentSocketData[Poolable::SOCKET_ARRAY_INSTANCE] . ',type=' . $currentSocketData[Poolable::SOCKET_ARRAY_CONN_TYPE] . ',serverSocket=' . $this->getSocketInstance()->getSocketResource());
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-LISTENER: currentSocketData=' . $currentSocketData[Poolable::SOCKET_ARRAY_INSTANCE] . ',type=' . $currentSocketData[Poolable::SOCKET_ARRAY_CONN_TYPE] . ',serverSocket=' . $this->getSocketInstance()->getSocketResource());
                if (($currentSocketData[Poolable::SOCKET_ARRAY_CONN_TYPE] != StorableSocket::CONNECTION_TYPE_SERVER) && (!$currentSocketData[Poolable::SOCKET_ARRAY_INSTANCE]->equals($this->getSocketInstance()))) {
                        // ... or else it will raise warnings like 'Transport endpoint is not connected'
                        $this->getHandlerInstance()->processRawDataFromResource($currentSocketData);
index b94ee018082d9b72ee2d4f2ec84966e70db46961..63c6ec3c8331ceb89d546b69dfb5865e42fe5dd3 100644 (file)
@@ -135,6 +135,9 @@ class BaseListenerDecorator extends BaseDecorator implements Visitable {
         * @return      void
         */
        public function monitorIncomingRawData () {
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('LISTENER-DECORATOR: CALLED!');
+
                // Get the handler instance
                $handlerInstance = $this->getListenerInstance()->getHandlerInstance();
 
@@ -145,13 +148,14 @@ class BaseListenerDecorator extends BaseDecorator implements Visitable {
                 */
                if (!$handlerInstance instanceof Networkable) {
                        // Skip this silently for now. Later on, this will become mandatory!
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('No handler assigned to this listener decorator. this=' . $this->__toString() . ', listenerInstance=' . $this->getListenerInstance()->__toString());
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('LISTENER-DECORATOR: No handler assigned to this listener decorator. this=' . $this->__toString() . ', listenerInstance=' . $this->getListenerInstance()->__toString());
                        return;
                } // END - if
 
                // Does the handler have some decoded data pending?
                if (!$handlerInstance->isRawDataPending()) {
                        // No data is pending so skip further code silently
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('LISTENER-DECORATOR: No data pending on handlerInstance=' . $handlerInstance->__toString() . ' - EXIT!');
                        return;
                } // END - if
 
@@ -165,8 +169,11 @@ class BaseListenerDecorator extends BaseDecorator implements Visitable {
                 * know if the decoded data origins from a TCP or UDP connection so it
                 * can just be passed over to the network package receiver.
                 */
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LISTENER-DECORATOR Going to handle over some raw data to receiver instance (' . $receiverInstance->__toString() . ') ...');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('LISTENER-DECORATOR: Going to handle over some raw data to receiverInstance=' . $receiverInstance->__toString() . ' ...');
                $receiverInstance->addRawDataToIncomingStack($handlerInstance);
+
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('LISTENER-DECORATOR: EXIT!');
        }
 
        /**
index a56d29c14de7807b17681f31f4517ce246fc580d..afbb779a5555dfb73ea744e868e0ff1e56136fad 100644 (file)
@@ -3,6 +3,7 @@
 namespace Hub\Listener\Socket;
 
 // Import application-specific stuff
+use Hub\Container\Socket\StorableSocket;
 use Hub\Factory\Tag\Package\PackageTagsFactory;
 use Hub\Listener\BaseListenerDecorator;
 use Hub\Listener\Listenable;
@@ -43,7 +44,7 @@ class SocketFileListenerDecorator extends BaseListenerDecorator implements Liste
 
                // Set listener type and protocol name
                $this->setListenerType('hub');
-               $this->setProtocolName('tcp');
+               $this->setProtocolName(StorableSocket::SOCKET_PROTOCOL_FILE);
        }
 
        /**
index 82d61a4fc888f40308728af9cba0e81e1af8bbc9..7f387d6ee920ba6b15758dbf27dd5f87d7ecde33 100644 (file)
@@ -3,6 +3,7 @@
 namespace Hub\Listener\Client\Tcp;
 
 // Import application-specific stuff
+use Hub\Container\Socket\StorableSocket;
 use Hub\Factory\Tag\Package\PackageTagsFactory;
 use Hub\Listener\BaseListenerDecorator;
 use Hub\Listener\Listenable;
@@ -43,7 +44,7 @@ class ClientTcpListenerDecorator extends BaseListenerDecorator implements Listen
 
                // Set listener type and protocol name
                $this->setListenerType('peer');
-               $this->setProtocolName('tcp');
+               $this->setProtocolName(StorableSocket::SOCKET_PROTOCOL_TCP);
        }
 
        /**
index 748a5cf8e0325e774aa66a864009f1582de01578..e25230176c9dc9c6781a6b60d3dde9001d7f94fd 100644 (file)
@@ -3,6 +3,7 @@
 namespace Hub\Listener\Hub\Tcp;
 
 // Import application-specific stuff
+use Hub\Container\Socket\StorableSocket;
 use Hub\Factory\Tag\Package\PackageTagsFactory;
 use Hub\Listener\BaseListenerDecorator;
 use Hub\Listener\Listenable;
@@ -43,7 +44,7 @@ class HubTcpListenerDecorator extends BaseListenerDecorator implements Listenabl
 
                // Set listener type and protocol name
                $this->setListenerType('hub');
-               $this->setProtocolName('tcp');
+               $this->setProtocolName(StorableSocket::SOCKET_PROTOCOL_TCP);
        }
 
        /**
index f43a3b96ce6cbf532afbbabc851dbdc6e0ccdd15..2737c57a8b0fbf0fa039fd10d204420f24ae8527 100644 (file)
@@ -3,6 +3,7 @@
 namespace Hub\Listener\Client\Udp;
 
 // Import application-specific stuff
+use Hub\Container\Socket\StorableSocket;
 use Hub\Factory\Tag\Package\PackageTagsFactory;
 use Hub\Listener\BaseListenerDecorator;
 use Hub\Listener\Listenable;
@@ -43,7 +44,7 @@ class ClientUdpListenerDecorator extends BaseListenerDecorator implements Listen
 
                // Set listener type and protocol name
                $this->setListenerType('peer');
-               $this->setProtocolName('udp');
+               $this->setProtocolName(StorableSocket::SOCKET_PROTOCOL_UDP);
        }
 
        /**
index a47f0e02e1b7c82b733c0d795e1e3148589fbf87..eaaa9d0e2cced481f36cc6eac9798c1546cdfad1 100644 (file)
@@ -3,6 +3,7 @@
 namespace Hub\Listener\Hub\Udp;
 
 // Import application-specific stuff
+use Hub\Container\Socket\StorableSocket;
 use Hub\Factory\Tag\Package\PackageTagsFactory;
 use Hub\Listener\BaseListenerDecorator;
 use Hub\Listener\Listenable;
@@ -43,7 +44,7 @@ class HubUdpListenerDecorator extends BaseListenerDecorator implements Listenabl
 
                // Set listener type and protocol name
                $this->setListenerType('hub');
-               $this->setProtocolName('udp');
+               $this->setProtocolName(StorableSocket::SOCKET_PROTOCOL_UDP);
        }
 
        /**
index b4b51f95e1e3d54910ba205d493f6a847791d066..fb32da8daa51300758a094e9f9644801b0d8fc16 100644 (file)
@@ -169,6 +169,9 @@ class UniversalNodeLocator extends BaseHubSystem implements LocateableNode, Regi
         * @return      void
         */
        public function parseStringAsUnl ($unl) {
+               // Debug message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('UNIVERSAL-NODE-LOCATOR: unl=[%s]=%s - CALLED!', gettype($unl), $unl));
+
                // Is it basically valid?
                if (!is_string($unl)) {
                        // Abort here
@@ -210,7 +213,7 @@ class UniversalNodeLocator extends BaseHubSystem implements LocateableNode, Regi
         */
        private function parseUniversalNodeLocator ($unl) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(': unl=' . $unl . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('UNIVERSAL-NODE-LOCATOR: unl=[%s]=%s - CALLED!', gettype($unl), $unl));
 
                // Make sure the UNL is valid
                if (!$this->isValidUniversalNodeLocator($unl)) {
@@ -235,7 +238,7 @@ class UniversalNodeLocator extends BaseHubSystem implements LocateableNode, Regi
                );
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(': unlData=' . print_r($unlData, TRUE) . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('UNIVERSAL-NODE-LOCATOR: unlData=' . print_r($unlData, TRUE) . ' - EXIT!');
 
                // Call init method
                $this->initUniversalNodeLocator($unlData);
@@ -284,13 +287,13 @@ class UniversalNodeLocator extends BaseHubSystem implements LocateableNode, Regi
         */
        private final function isValidUniversalNodeLocator ($unl) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(': unl=' . $unl . ',regex=' . $regex . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('UNIVERSAL-NODE-LOCATOR: unl=' . $unl . ' - CALLED!');
 
                // Very basic regex check
                $isValid = (preg_match($this->getRegularExpression(), $unl) === 1);
 
                // Return result
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(': isValid=' . intval($isValid) . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('UNIVERSAL-NODE-LOCATOR: isValid=' . intval($isValid) . ' - EXIT!');
                return $isValid;
        }
 
index d8acae0b6479c31eb1eb2b25092b8e465eb9ca0e..b78ad4f5aee085c5dfd41d943dd0aff769a6bd76 100644 (file)
@@ -73,7 +73,7 @@ class HubBootNode extends BaseHubNode implements NodeHelper, Registerable {
                $unl = $this->detectOwnUniversalNodeLocator();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(': unl=' . $unl);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HUB-BOOT-NODE: unl=' . $unl);
 
                // Now check if the IP address matches one of the bootstrap nodes
                if ($this->ifAddressMatchesBootstrapNodes($unl)) {
@@ -141,7 +141,5 @@ class HubBootNode extends BaseHubNode implements NodeHelper, Registerable {
                // Register it
                $handlerInstance->registerTask('dht_bootstrap', $taskInstance);
        }
-}
 
-// [EOF]
-?>
+}
index 44d2928905f8ae7bc3a138ab7b1f8fe2b1c4dd9e..9f1597154c4156bcf7704fe3647764ca11c22e91 100644 (file)
@@ -683,13 +683,13 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
         */
        public function ifNodeIsAnnouncing () {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: ifNodeIsAnnouncing(): state=' . $this->getStateInstance()->getStateName());
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: ifNodeIsAnnouncing(): state=' . $this->getStateInstance()->getStateName());
 
                // Simply check the state of this node
                $hasAnnounced = ($this->getStateInstance() instanceof NodeAnnouncingState);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: ifNodeIsAnnouncing(): hasAnnounced=' . intval($hasAnnounced));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: ifNodeIsAnnouncing(): hasAnnounced=' . intval($hasAnnounced));
 
                // Return it
                return $hasAnnounced;
@@ -703,13 +703,13 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
         */
        public function ifNodeHasAnnouncementCompleted () {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: ifNodeHasAnnouncementCompleted(): state=' . $this->getStateInstance()->getStateName());
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: ifNodeHasAnnouncementCompleted(): state=' . $this->getStateInstance()->getStateName());
 
                // Simply check the state of this node
                $hasAnnouncementCompleted = ($this->getStateInstance() instanceof NodeAnnouncementCompletedState);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: ifNodeHasAnnouncementCompleted(): hasAnnouncementCompleted=' . intval($hasAnnouncementCompleted));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: ifNodeHasAnnouncementCompleted(): hasAnnouncementCompleted=' . intval($hasAnnouncementCompleted));
 
                // Return it
                return $hasAnnouncementCompleted;
@@ -760,7 +760,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
         */
        public function determineUniversalNodeLocator () {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: CALLED!');
 
                // Is there cache?
                if (!isset($GLOBALS[__METHOD__])) {
@@ -773,7 +773,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
                } // END - if
 
                // Return it
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: unlInstance= ' . $GLOBALS[__METHOD__]->__toString() . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: unlInstance= ' . $GLOBALS[__METHOD__]->__toString() . ' - EXIT!');
                return $GLOBALS[__METHOD__];
        }
 
index 75f3a4ac594da6cdcd6dc407362c8ec9d79d6651..b21adaf7524ac791035534ae92482a76748d5df8 100644 (file)
@@ -117,7 +117,7 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable,
                $isInputBufferEmpty = $this->getPackageInstance()->getStackInstance()->isStackEmpty(NetworkPackage::STACKER_NAME_DECODED_HANDLED);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: isInputBufferEmpty=' . intval($isInputBufferEmpty));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: isInputBufferEmpty=' . intval($isInputBufferEmpty));
 
                // Return it
                return $isInputBufferEmpty;
@@ -186,7 +186,7 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable,
         */
        private function handlePackageByUnhandledPackage (array $packageContent) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: packageData[' . BaseRawDataHandler::PACKAGE_RAW_DATA . ']=' . $packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: packageData[' . BaseRawDataHandler::PACKAGE_RAW_DATA . ']=' . $packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]);
 
                // Check for some conditions
                if ((!$this->ifInputBufferIsEmpty()) || (!$this->isPackageContentCompleted($packageContent))) {
@@ -194,10 +194,10 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable,
                        $this->pendingData .= $packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA];
 
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: Partial data received. Waiting for more ... ( ' . strlen($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]) . ' bytes)');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: Partial data received. Waiting for more ... ( ' . strlen($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]) . ' bytes)');
                } else {
                        // Debug message
-                       //* DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER[' . __METHOD__ . ':' . __LINE__ . ': packageContent=' . print_r($packageContent, TRUE) . ',chunks='.print_r($chunks, TRUE));
+                       //* DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: packageContent=' . print_r($packageContent, TRUE) . ',chunks='.print_r($chunks, TRUE));
                }
        }
 
@@ -224,8 +224,10 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable,
                // Determine it
                $isPending = (!$this->getStackInstance()->isStackEmpty(self::STACKER_NAME_MULTIPLE_MESSAGE));
 
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: isPending=' . intval($isPending) . ' - EXIT!');
+
                // Return it
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER[' . __METHOD__ . ':' . __LINE__ . ': isPending=' . intval($isPending));
                return $isPending;
        }
 
@@ -236,7 +238,7 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable,
         */
        public function handlePendingData () {
                // Debug output
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: Going to decode ' . strlen($this->pendingData) . ' Bytes of pending data. pendingData=' . $this->pendingData);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: Going to decode ' . strlen($this->pendingData) . ' Bytes of pending data. pendingData=' . $this->pendingData);
 
                // Assert on condition
                assert(!$this->isPendingDataEmpty());
@@ -244,8 +246,8 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable,
                // No markers set?
                if (!$this->ifStartEndMarkersSet($this->pendingData)) {
                        // This will cause an assertition in next call, so simply wait for more data
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: Pending data of ' . strlen($this->pendingData) . ' Bytes are incomplete, waiting for more ...');
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: this->pendingData=' . $this->pendingData);
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: Pending data of ' . strlen($this->pendingData) . ' Bytes are incomplete, waiting for more ...');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: this->pendingData=' . $this->pendingData);
                        return;
                } elseif (substr_count($this->pendingData, BaseRawDataHandler::STREAM_START_MARKER) > 1) {
                        /*
@@ -280,7 +282,7 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable,
                $this->clearPendingData();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: Last block of partial data received. A total of ' . strlen($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]) . ' bytes has been received.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: Last block of partial data received. A total of ' . strlen($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]) . ' bytes has been received.');
 
                // Make sure last CHUNK_SEPARATOR is not there
                if (substr($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA], -1, 1) == PackageFragmenter::CHUNK_SEPARATOR) {
@@ -296,7 +298,7 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable,
                $chunks = explode(PackageFragmenter::CHUNK_SEPARATOR, $packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]);
 
                // Add all chunks because the last final chunk is found
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: Going to add ' . count($chunks) . ' to chunk handler ...');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: Going to add ' . count($chunks) . ' to chunk handler ...');
                $this->getHandlerInstance()->addAllChunksWithFinal($chunks);
        }
 
index bb38964ea6b52a7802a16f40d49a6ef8c84011eb..80ef7471503dd4f4c31f8b39fb4840a0cd1fd807 100644 (file)
@@ -403,7 +403,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                // Is an entry found?
                if (count($senderData) > 0) {
                        // Make sure the element 'private_key_hash' is there
-                       //* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: senderData=' . print_r($senderData, TRUE));
+                       /* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: senderData=' . print_r($senderData, TRUE));
                        assert(isset($senderData[NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_PRIVATE_KEY_HASH]));
 
                        // Don't accept empty hashes
@@ -438,7 +438,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
         */
        private function getHashFromContent ($content) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: content[md5]=' . md5($content) . ',sender=' . $this->getSessionId() . ',compressor=' . $this->getCompressorInstance()->getCompressorExtension());
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: content[md5]=' . md5($content) . ',sender=' . $this->getSessionId() . ',compressor=' . $this->getCompressorInstance()->getCompressorExtension());
 
                // Create the hash
                // @TODO md5() is very weak, but it needs to be fast
@@ -451,7 +451,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                );
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: content[md5]=' . md5($content) . ',sender=' . $this->getSessionId() . ',hash=' . $hash . ',compressor=' . $this->getCompressorInstance()->getCompressorExtension());
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: content[md5]=' . md5($content) . ',sender=' . $this->getSessionId() . ',hash=' . $hash . ',compressor=' . $this->getCompressorInstance()->getCompressorExtension());
 
                // And return it
                return $hash;
@@ -512,7 +512,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
         */
        public function getHashFromContentSessionId (array $decodedContent, $sessionId) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: content[md5]=' . md5($decodedContent[self::PACKAGE_CONTENT_MESSAGE]) . ',sender=' . $sessionId . ',compressor=' . $decodedContent[self::PACKAGE_CONTENT_EXTENSION]);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: content[md5]=' . md5($decodedContent[self::PACKAGE_CONTENT_MESSAGE]) . ',sender=' . $sessionId . ',compressor=' . $decodedContent[self::PACKAGE_CONTENT_EXTENSION]);
 
                // Create the hash
                // @TODO md5() is very weak, but it needs to be fast
@@ -622,11 +622,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                $socketInstance = $discoveryInstance->discoverSocket($packageData, StorableSocket::CONNECTION_TYPE_OUTGOING);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Reached line ' . __LINE__ . ' after discoverSocket() has been called.');
-
-               // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: stateInstance=' . $helperInstance->getStateInstance());
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Reached line ' . __LINE__ . ' before isSocketRegistered() has been called.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Reached line ' . __LINE__ . ' after discoverSocket() has been called.');
 
                // The socket needs to be put in a special registry that can handle such data
                $registryInstance = SocketRegistryFactory::createSocketRegistryInstance();
@@ -634,6 +630,9 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                // Get the connection helper from registry
                $helperInstance = Registry::getRegistry()->getInstance('connection');
 
+               // Debug message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: stateInstance=' . $helperInstance->getStateInstance());
+
                // And make sure it is valid
                assert($helperInstance instanceof ConnectionHelper);
 
@@ -643,10 +642,13 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                // Will the info instance with connection helper data
                $infoInstance->fillWithConnectionHelperInformation($helperInstance);
 
+               // Debug message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Reached line ' . __LINE__ . ' before isSocketRegistered() has been called.');
+
                // Is it not there?
                if (($socketInstance->isValidSocket()) && (!$registryInstance->isSocketRegistered($infoInstance, $socketInstance))) {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Registering socket ' . $socketInstance . ' ...');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Registering socket ' . $socketInstance . ' ...');
 
                        // Then register it
                        $registryInstance->registerSocketInstance($infoInstance, $socketInstance, $packageData);
@@ -659,19 +661,19 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                }
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Reached line ' . __LINE__ . ' after isSocketRegistered() has been called.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Reached line ' . __LINE__ . ' after isSocketRegistered() has been called.');
 
                // Make sure the connection is up
                $helperInstance->getStateInstance()->validatePeerStateConnected();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Reached line ' . __LINE__ . ' after validatePeerStateConnected() has been called.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Reached line ' . __LINE__ . ' after validatePeerStateConnected() has been called.');
 
                // Enqueue it again on the out-going queue, the connection is up and working at this point
                $this->getStackInstance()->pushNamed(self::STACKER_NAME_OUTGOING, $packageData);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Reached line ' . __LINE__ . ' after pushNamed() has been called.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Reached line ' . __LINE__ . ' after pushNamed() has been called.');
        }
 
        /**
@@ -718,12 +720,12 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
         */
        private function generatePackageHash ($content, $senderId) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: content()=' . strlen($content) . ',senderId=' . $senderId . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: content()=' . strlen($content) . ',senderId=' . $senderId . ' - CALLED!');
 
                // Is the feature enabled?
                if (!FrameworkFeature::isFeatureAvailable('hubcoin_reward')) {
                        // Feature is not enabled
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Feature "hubcoin_reward" not available, not generating package hash. Returning NULL ...');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Feature "hubcoin_reward" not available, not generating package hash. Returning NULL ...');
                        return NULL;
                } // END - if
 
@@ -735,11 +737,11 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                );
        
                // Hash content and sender id together, use scrypt
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: senderId=' . $senderId . ',content()=' . strlen($content));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: senderId=' . $senderId . ',content()=' . strlen($content));
                $hash = FrameworkFeature::callFeature('hubcoin_reward', 'generateHash', array($senderId . ':' . $content . ':' . $this->determineSenderPrivateKeyHash($data)));
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: hash=' . $hash . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: hash=' . $hash . ' - EXIT!');
 
                // Return it
                return $hash;
@@ -755,7 +757,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
         */
        private function isPackageHashValid (array $decodedArray) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: decodedArray=' . print_r($decodedArray, TRUE) . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: decodedArray=' . print_r($decodedArray, TRUE) . ' - CALLED!');
 
                // Make sure the required array elements are there
                assert(isset($decodedArray[self::PACKAGE_CONTENT_SENDER]));
@@ -766,17 +768,17 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                // Is the feature enabled?
                if (!FrameworkFeature::isFeatureAvailable('hubcoin_reward')) {
                        // Feature is not enabled, so hashes are always valid
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Feature "hubcoin_reward" not available, not checking hash. Returning TRUE ...');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Feature "hubcoin_reward" not available, not checking hash. Returning TRUE ...');
                        return TRUE;
                } // END - if
 
                // Check validity
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: senderId=' . $decodedArray[self::PACKAGE_CONTENT_SENDER] . ',message()=' . strlen($decodedArray[self::PACKAGE_CONTENT_MESSAGE]) . ',hash=' . $decodedArray[self::PACKAGE_CONTENT_HASH]);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: senderId=' . $decodedArray[self::PACKAGE_CONTENT_SENDER] . ',message()=' . strlen($decodedArray[self::PACKAGE_CONTENT_MESSAGE]) . ',hash=' . $decodedArray[self::PACKAGE_CONTENT_HASH]);
                //* DEBUG-DIE: */ die(__METHOD__ . ': decodedArray=' . print_r($decodedArray, TRUE));
                $isHashValid = FrameworkFeature::callFeature('hubcoin_reward', 'checkHash', array($decodedArray[self::PACKAGE_CONTENT_SENDER] . ':' . $decodedArray[self::PACKAGE_CONTENT_MESSAGE] . ':' . $this->determineSenderPrivateKeyHash($decodedArray), $decodedArray[self::PACKAGE_CONTENT_HASH]));
 
                // Return it
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: isHashValid=' . intval($isHashValid) . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: isHashValid=' . intval($isHashValid) . ' - EXIT!');
                return $isHashValid;
        }
 
@@ -790,11 +792,11 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
         */
        public function enqueueRawDataFromTemplate (HubHelper $helperInstance) {
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ': CALLED!');
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: CALLED!');
 
                // Get the raw content ...
                $content = $helperInstance->getTemplateInstance()->getRawTemplateData();
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('content(' . strlen($content) . ')=' . $content);
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('content(' . strlen($content) . ')=' . $content);
 
                // ... and compress it
                $compressed = $this->getCompressorInstance()->compressStream($content);
@@ -818,7 +820,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                );
 
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ': Enqueueing package for recipientType=' . $helperInstance->getRecipientType() . ' ...');
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Enqueueing package for recipientType=' . $helperInstance->getRecipientType() . ' ...');
 
                // Now prepare the temporary array and push it on the 'undeclared' stack
                $this->getStackInstance()->pushNamed(self::STACKER_NAME_UNDECLARED, array(
@@ -831,7 +833,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                ));
 
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ': EXIT!');
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: EXIT!');
        }
 
        /**
@@ -843,6 +845,9 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                // Check whether the stacker is not empty
                $isEnqueued = (($this->getStackInstance()->isStackInitialized(self::STACKER_NAME_UNDECLARED)) && (!$this->getStackInstance()->isStackEmpty(self::STACKER_NAME_UNDECLARED)));
 
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE: isEnqueued=%d - EXIT!', intval($isEnqueued)));
+
                // Return the result
                return $isEnqueued;
        }
@@ -856,6 +861,9 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                // Check whether the stacker is not empty
                $isDeclared = (($this->getStackInstance()->isStackInitialized(self::STACKER_NAME_DECLARED)) && (!$this->getStackInstance()->isStackEmpty(self::STACKER_NAME_DECLARED)));
 
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE: isDeclared=%d - EXIT!', intval($isDeclared)));
+
                // Return the result
                return $isDeclared;
        }
@@ -869,6 +877,9 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                // Check whether the stacker is not empty
                $isWaitingDelivery = (($this->getStackInstance()->isStackInitialized(self::STACKER_NAME_OUTGOING)) && (!$this->getStackInstance()->isStackEmpty(self::STACKER_NAME_OUTGOING)));
 
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE: isWaitingDelivery=%d - EXIT!', intval($isWaitingDelivery)));
+
                // Return the result
                return $isWaitingDelivery;
        }
@@ -882,6 +893,9 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                // Check whether the stacker is not empty
                $isPending = (($this->getStackInstance()->isStackInitialized(self::STACKER_NAME_OUTGOING_STREAM)) && (!$this->getStackInstance()->isStackEmpty(self::STACKER_NAME_OUTGOING_STREAM)));
 
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE: isPending=%d - EXIT!', intval($isPending)));
+
                // Return the result
                return $isPending;
        }
@@ -898,7 +912,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
         */
        public function declareEnqueuedPackage () {
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ': CALLED!');
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: CALLED!');
 
                // Make sure this method isn't working if there is no package enqueued
                if (!$this->isPackageEnqueued()) {
@@ -917,7 +931,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                $this->declareRawPackageData($packageData);
 
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ': EXIT!');
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: EXIT!');
        }
 
        /**
@@ -929,7 +943,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
         */
        public function processDeclaredPackage () {
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ': CALLED!');
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: CALLED!');
 
                // Sanity check if we have packages declared
                if (!$this->isPackageDeclared()) {
@@ -960,7 +974,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                }
 
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ': EXIT!');
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: EXIT!');
        }
 
        /**
@@ -970,7 +984,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
         */
        public function sendWaitingPackage () {
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ': CALLED!');
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: CALLED!');
 
                // Sanity check if we have packages waiting for delivery
                if (!$this->isPackageWaitingForDelivery()) {
@@ -997,7 +1011,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                }
 
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ': EXIT!');
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: EXIT!');
        }
 
        /**
@@ -1007,7 +1021,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
         */
        public function sendEncodedData () {
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ': CALLED!');
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: CALLED!');
 
                // Make sure there is pending encoded data
                assert($this->isEncodedDataPending());
@@ -1019,23 +1033,30 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                $sentBytes = 0;
 
                // Assert on socket instance
+               assert(isset($encodedDataArray[self::RAW_INDEX_SOCKET_INSTANCE]));
                assert($encodedDataArray[self::RAW_INDEX_SOCKET_INSTANCE] instanceof StorableSocket);
                assert($encodedDataArray[self::RAW_INDEX_SOCKET_INSTANCE]->isValidSocket());
 
+               // Trace message
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE: Calling socketInstance->writeBufferToSocketByArray(%d,%d) ...', count($encodedDataArray), $sentBytes));
+
                // And deliver it
                if (!$encodedDataArray[self::RAW_INDEX_SOCKET_INSTANCE]->writeBufferToSocketByArray($encodedDataArray, $sentBytes)) {
                        // Something bad happened while writing to socket
                        $encodedDataArray[self::RAW_INDEX_SOCKET_INSTANCE]->handleSocketError(__METHOD__, __LINE__, array('0.0.0.0', '0'));
                } // END - if
 
+               // Debug message
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE: sentBytes[%s]=%d', gettype($sentBytes), $sentBytes));
+
                // If there was an error, don't continue here
                if (($sentBytes === 0) && (strlen($encodedDataArray[self::RAW_INDEX_ENCODED_DATA]) > 0)) {
                        // Nothing sent means all data has been sent
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: All sent! (LINE=' . __LINE__ . ')');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: All sent! (LINE=' . __LINE__ . ')');
                        return;
                } elseif (strlen($encodedDataArray[self::RAW_INDEX_ENCODED_DATA]) <= 0) {
                        // Abort here, all sent!
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: All sent! (LINE=' . __LINE__ . ')');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: All sent! (LINE=' . __LINE__ . ')');
                        return;
                }
 
@@ -1043,7 +1064,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                $this->getStackInstance()->pushNamed(self::STACKER_NAME_OUTGOING_STREAM, $encodedDataArray);
 
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ': EXIT!');
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: EXIT!');
        }
 
        ///////////////////////////////////////////////////////////////////////////
@@ -1098,7 +1119,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                } // END - if
 
                // Very noisy debug message:
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Stacker size is ' . $this->getStackInstance()->getStackCount(self::STACKER_NAME_DECODED_INCOMING) . ' entries.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Stacker size is ' . $this->getStackInstance()->getStackCount(self::STACKER_NAME_DECODED_INCOMING) . ' entries.');
 
                // "Pop" the next entry (the same array again) from the stack
                $decodedData = $this->getStackInstance()->popNamed(self::STACKER_NAME_DECODED_INCOMING);
@@ -1114,7 +1135,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                 * Also make sure the error code is SOCKET_ERROR_UNHANDLED because we
                 * only want to handle unhandled packages here.
                 */
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: errorCode=' . $decodedData[BaseRawDataHandler::PACKAGE_ERROR_CODE] . '(' . StorableSocket::SOCKET_ERROR_UNHANDLED . ')');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: errorCode=' . $decodedData[BaseRawDataHandler::PACKAGE_ERROR_CODE] . '(' . StorableSocket::SOCKET_ERROR_UNHANDLED . ')');
                assert($decodedData[BaseRawDataHandler::PACKAGE_ERROR_CODE] == StorableSocket::SOCKET_ERROR_UNHANDLED);
 
                // Remove the last chunk SEPARATOR (because there is no need for it)
@@ -1124,7 +1145,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                } // END - if
 
                // This package is "handled" and can be pushed on the next stack
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Pushing ' . strlen($decodedData[BaseRawDataHandler::PACKAGE_RAW_DATA]) . ' bytes to stack ' . self::STACKER_NAME_DECODED_HANDLED . ' ...');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Pushing ' . strlen($decodedData[BaseRawDataHandler::PACKAGE_RAW_DATA]) . ' bytes to stack ' . self::STACKER_NAME_DECODED_HANDLED . ' ...');
                $this->getStackInstance()->pushNamed(self::STACKER_NAME_DECODED_HANDLED, $decodedData);
        }
 
@@ -1142,7 +1163,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                $decodedData = $handlerInstance->getNextRawData();
 
                // Very noisy debug message:
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: decodedData[' . gettype($decodedData) . ']=' . print_r($decodedData, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: decodedData[' . gettype($decodedData) . ']=' . print_r($decodedData, TRUE));
 
                // And push it on our stack
                $this->getStackInstance()->pushNamed(self::STACKER_NAME_DECODED_INCOMING, $decodedData);
@@ -1236,7 +1257,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                $this->getStackInstance()->popNamed(self::STACKER_NAME_DECODED_HANDLED);
 
                // ... and push it on the 'chunked' stacker
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Pushing ' . strlen($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]) . ' bytes on stack ' . self::STACKER_NAME_DECODED_CHUNKED . ',packageContent=' . print_r($packageContent, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Pushing ' . strlen($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]) . ' bytes on stack ' . self::STACKER_NAME_DECODED_CHUNKED . ',packageContent=' . print_r($packageContent, TRUE));
                $this->getStackInstance()->pushNamed(self::STACKER_NAME_DECODED_CHUNKED, $packageContent);
        }
 
@@ -1248,7 +1269,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
         */
        public function accept (Visitor $visitorInstance) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: ' . $visitorInstance->__toString() . ' has visited - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: ' . $visitorInstance->__toString() . ' has visited - CALLED!');
 
                // Visit the package
                $visitorInstance->visitNetworkPackage($this);
@@ -1257,7 +1278,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                $this->getAssemblerInstance()->accept($visitorInstance);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: ' . $visitorInstance->__toString() . ' has visited - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: ' . $visitorInstance->__toString() . ' has visited - EXIT!');
        }
 
        /**
@@ -1270,7 +1291,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                $this->initStacks(TRUE);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: All stacker have been re-initialized.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: All stacker have been re-initialized.');
        }
 
        /**
@@ -1454,7 +1475,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                $messageArray[self::MESSAGE_ARRAY_DATA][self::MESSAGE_ARRAY_TYPE] = $messageArray[self::MESSAGE_ARRAY_TYPE];
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: messageArray=' . print_r($messageArray, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: messageArray=' . print_r($messageArray, TRUE));
 
                // Create a handler instance from given message type
                $handlerInstance = MessageTypeHandlerFactory::createMessageTypeHandlerInstance($messageArray[self::MESSAGE_ARRAY_TYPE]);
index 1aee48e68dbecc20cb80e2f0fc12fb4b0f3a09e7..e9848fc280396636f5decc5f00f7f77679ad756f 100644 (file)
@@ -232,7 +232,7 @@ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registera
                assert(strlen($finalHash) > 0);
 
                // Is the pointer already initialized?
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: finalHash[' . gettype($finalHash) . ']=' . $finalHash);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: finalHash[' . gettype($finalHash) . ']=' . $finalHash);
                assert(isset($this->chunkPointers[$finalHash]));
 
                // Return it
@@ -249,7 +249,7 @@ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registera
                assert(isset($this->chunkPointers[$finalHash]));
 
                // Count one up
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: finalHash[' . gettype($finalHash) . ']=' . $finalHash);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: finalHash[' . gettype($finalHash) . ']=' . $finalHash);
                $this->chunkPointers[$finalHash]++;
        }
 
@@ -314,7 +314,7 @@ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registera
                        $this->generateHashFromRawData($lastChunk);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: Adding EOP chunk with size of ' . strlen($chunkData) . ',finalHash=' . $finalHash . ' ...');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: Adding EOP chunk with size of ' . strlen($chunkData) . ',finalHash=' . $finalHash . ' ...');
 
                // Add it as regular chunk
                $this->addChunkData($finalHash, $chunkData);
@@ -335,7 +335,7 @@ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registera
 
                // Calculate real (data) chunk size
                $dataChunkSize = $this->getDataChunkSizeFromHash($finalHash);
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: dataChunkSize=' . $dataChunkSize);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: dataChunkSize=' . $dataChunkSize);
 
                // Init variables
                $chunkHash = '';
@@ -351,7 +351,7 @@ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registera
                } // END - for
 
                // Debug output
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: Raw data of ' . strlen($rawData) . ' bytes has been fragmented into ' . count($this->chunks[$finalHash]) . ' chunk(s).');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: Raw data of ' . strlen($rawData) . ' bytes has been fragmented into ' . count($this->chunks[$finalHash]) . ' chunk(s).');
 
                // Add end-of-package chunk
                $this->appendEndOfPackageChunk($chunkData, $finalHash);
@@ -378,18 +378,18 @@ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registera
                );
 
                // Make sure the chunk is not larger than a TCP package can hold
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: assert: ' . strlen($rawData) . '/' . NetworkPackage::TCP_PACKAGE_SIZE . ' ...');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: assert: ' . strlen($rawData) . '/' . NetworkPackage::TCP_PACKAGE_SIZE . ' ...');
                // @TODO This assert broke packages where the hash chunk was very large: assert(strlen($rawData) <= NetworkPackage::TCP_PACKAGE_SIZE);
 
                // Add it to the array
                if ($prepend === TRUE) {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: Prepending ' . strlen($rawData) . ' bytes of a chunk, finalHash=' . $finalHash . ' ...');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: Prepending ' . strlen($rawData) . ' bytes of a chunk, finalHash=' . $finalHash . ' ...');
                        array_unshift($this->chunkHashes[$finalHash], $rawDataHash);
                        array_unshift($this->chunks[$finalHash]     , $rawData);
                } else {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: Appending ' . strlen($rawData) . ' bytes of a chunk, finalHash=' . $finalHash . ' ...');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: Appending ' . strlen($rawData) . ' bytes of a chunk, finalHash=' . $finalHash . ' ...');
 
                        // Is the array there?
                        if (!isset($this->chunks[$finalHash])) {
@@ -430,14 +430,14 @@ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registera
                assert($this->serialNumber[$finalHash] <= $this->maxSerialNumber);
 
                // Encode the current serial number
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: serialNumber[' . $finalHash . ']=' . $this->serialNumber[$finalHash]);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: serialNumber[' . $finalHash . ']=' . $this->serialNumber[$finalHash]);
                $encodedSerialNumber = $this->dec2Hex($this->serialNumber[$finalHash], self::MAX_SERIAL_LENGTH);
 
                // Count one up
                $this->serialNumber[$finalHash]++;
 
                // Return the encoded serial number
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: encodedSerialNumber=' . $encodedSerialNumber);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: encodedSerialNumber=' . $encodedSerialNumber);
                return $encodedSerialNumber;
        }
 
@@ -482,7 +482,7 @@ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registera
                }
 
                // Return final hash
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: finalHash[' . gettype($finalHash) . ']=' . $finalHash);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: finalHash[' . gettype($finalHash) . ']=' . $finalHash);
                return $finalHash;
        }
 
@@ -497,7 +497,7 @@ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registera
         */
        public function getNextRawDataChunk ($finalHash) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: finalHash[' . gettype($finalHash) . ']=' . $finalHash);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: finalHash[' . gettype($finalHash) . ']=' . $finalHash);
 
                try {
                        // Get current chunk index
@@ -516,12 +516,12 @@ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registera
                // If there is no entry left, return an empty array
                if ((!isset($this->chunkHashes[$finalHash][$current])) || (!isset($this->chunks[$finalHash][$current]))) {
                        // No more entries found
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(__METHOD__. ': finalHash=' . $finalHash . ',current=' . $current . ' - No more entries found!');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(__METHOD__. ': finalHash=' . $finalHash . ',current=' . $current . ' - No more entries found!');
                        return array();
                } // END - if
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(__METHOD__. ': finalHash=' . $finalHash . ',current=' . $current . ',chunkHashes()=' . count($this->chunkHashes[$finalHash]) .' - Entry choosen ...');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(__METHOD__. ': finalHash=' . $finalHash . ',current=' . $current . ',chunkHashes()=' . count($this->chunkHashes[$finalHash]) .' - Entry choosen ...');
 
                // Generate the array
                $rawDataChunk = array(
index 39aca2d9e0d1e3816998552f4fa6fc168db28cf0..935a0e62d164dc8c6bedc2debf6c46d403b845f2 100644 (file)
@@ -64,7 +64,7 @@ abstract class BasePool extends BaseHubSystem implements Poolable, Visitable {
         */
        protected final function addInstance ($group, $poolName, Visitable $visitableInstance) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL: group=' . $group . ',poolName=' . $poolName . ',visitableInstance=' . $visitableInstance->__toString() . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL: group=' . $group . ',poolName=' . $poolName . ',visitableInstance=' . $visitableInstance->__toString() . ' - CALLED!');
 
                // Make sure the group is not 'invalid'
                assert($group != 'invalid');
@@ -79,7 +79,7 @@ abstract class BasePool extends BaseHubSystem implements Poolable, Visitable {
                $this->getPoolEntriesInstance()->addInstance($group, $poolName, $visitableInstance);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL: EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL: EXIT!');
        }
 
        /**
@@ -123,7 +123,7 @@ abstract class BasePool extends BaseHubSystem implements Poolable, Visitable {
         */
        public function accept (Visitor $visitorInstance) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL: ' . $visitorInstance->__toString() . ' has visited - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL: ' . $visitorInstance->__toString() . ' has visited - CALLED!');
 
                // Visit this pool
                $visitorInstance->visitPool($this);
@@ -151,7 +151,7 @@ abstract class BasePool extends BaseHubSystem implements Poolable, Visitable {
                        // Is this entry visitable?
                        if ($poolEntry instanceof Visitable) {
                                // Visit this entry as well
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-POOL: Going to visit pooled object ' . $poolEntry->__toString() . ' with visitor ' . $visitorInstance->__toString() . ' ...');
+                               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL: Going to visit pooled object ' . $poolEntry->__toString() . ' with visitor ' . $visitorInstance->__toString() . ' ...');
                                $poolEntry->accept($visitorInstance);
                        } else {
                                // Cannot visit this entry
@@ -163,7 +163,7 @@ abstract class BasePool extends BaseHubSystem implements Poolable, Visitable {
                } // END - while
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL: ' . $visitorInstance->__toString() . ' has visited - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL: ' . $visitorInstance->__toString() . ' has visited - EXIT!');
        }
 
        /**
index 268acd06f9a3df5c6e6f5224202c7260936e55a1..f95ea003ac8f235571e80526e727c6c2916e585c 100644 (file)
@@ -64,12 +64,16 @@ class DefaultListenerPool extends BasePool implements PoolableListener {
         * @return      void
         */
        public function addListener (Listenable $listenerInstance) {
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('DEFAULT-LISTENER-POOL: listenerInstance=%s - CALLED!', $listenerInstance->__toString()));
+
                // Add this listener instance to the instance list
                parent::addInstance($listenerInstance->getProtocolName(), 'listener', $listenerInstance);
 
                // Debug message
                self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(
-                       'POOL: Listener ' . $listenerInstance->__toString() .
+                       'DEFAULT-LISTENER-POOL: Listener ' . $listenerInstance->__toString() .
+                       ' with protocol ' . $listenerInstance->getProtocolName() .
                        ' listening to ' . $listenerInstance->getListenAddress() . ':' .
                        $listenerInstance->getListenPort() . ' added to listener pool.'
                );
index 5312daa987dbc5a78daba5e089aa4577da283b32..0ab4cee090d1186e1d3f4f89f6d41ecf378eaf8f 100644 (file)
@@ -106,7 +106,7 @@ class DefaultPeerPool extends BasePool implements PoolablePeer {
         */
        public function addPeer (StorableSocket $socketInstance, $connectionType) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DEFAULT-PEER-POOL: socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource() . ',connectionType=' . $connectionType . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DEFAULT-PEER-POOL: socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource() . ',connectionType=' . $connectionType . ' - CALLED!');
 
                // Validate the socket
                $this->validateSocket($socketInstance);
@@ -137,7 +137,7 @@ class DefaultPeerPool extends BasePool implements PoolablePeer {
                }
 
                // Debug message
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL: Adding peer ' . $peerAddress . ':' . $peerPort . ',socketResource=' . $socketInstance->getSocketResource() . ',type=' . $connectionType);
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL: Adding peer ' . $peerAddress . ':' . $peerPort . ',socketResource=' . $socketInstance->getSocketResource() . ',connectionType=' . $connectionType);
 
                // Construct the array
                $socketArray = array(
@@ -294,8 +294,8 @@ class DefaultPeerPool extends BasePool implements PoolablePeer {
                        } // END - if
                } // END - foreach
 
-               // Return the determined socket resource
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL: socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource());
+               // Return the determined socket instance
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL: socketInstance[]=' . gettype($socketInstance));
                return $socketInstance;
        }
 
index 82893fec5cd37065dd568a4381cb0ee4069da4d5..e65c6558f57037899662224f55fbef37816bbece 100644 (file)
@@ -66,7 +66,7 @@ class ???Recipient extends BaseRecipient implements Recipient {
         */
        public function resolveRecipient ($recipient, Listable $listInstance) {
                // Make sure the recipient is valid
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('!!!-RECIPIENT: recipient=' . $recipient);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('!!!-RECIPIENT: recipient=' . $recipient);
                assert($recipient == '|||');
                $this->partialStub('Please implement this method. recipient=' . $recipient);
        }
index 8d7742ee1bcb6894b537575c8dec44772628edf5..10a2b722b1f1e2880e7a88d0d8151f6679efb604 100644 (file)
@@ -72,7 +72,7 @@ class DhtRecipient extends BaseRecipient implements Recipient {
         */
        public function resolveRecipient ($recipient, Listable $listInstance, array $packageData) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-RECIPIENT: recipient=' . $recipient . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-RECIPIENT: recipient=' . $recipient . ' - CALLED!');
 
                // Make sure the recipient is valid
                assert($recipient == NetworkPackage::NETWORK_TARGET_DHT);
@@ -94,12 +94,12 @@ class DhtRecipient extends BaseRecipient implements Recipient {
                        $unl = $recipient[NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_EXTERNAL_ADDRESS];
 
                        // Add it to the list
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-RECIPIENT: Calling listInstance->addEntry(' . $unl . ') ...');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-RECIPIENT: Calling listInstance->addEntry(' . $unl . ') ...');
                        $listInstance->addEntry('unl', $unl);
                } // END - foreach
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-RECIPIENT: recipient=' . $recipient . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-RECIPIENT: recipient=' . $recipient . ' - EXIT!');
        }
 
 }
index 97155687fde69ea1e3400e40bd341dba81d200f3..0924696b2ac3a551f128978d5b26760618ff462d 100644 (file)
@@ -69,7 +69,7 @@ class DirectRecipient extends BaseRecipient implements Recipient {
         */
        public function resolveRecipient ($recipient, Listable $listInstance, array $packageData) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECT-RECIPIENT: recipient=' . $recipient);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECT-RECIPIENT: recipient=' . $recipient);
 
                // "Explode" all recipients
                $recipients = explode(NetworkPackage::PACKAGE_RECIPIENT_SEPARATOR, $recipient);
index 25e2406196a754a85b7662906d1f7a9a362a0e04..9601c2b2c0714d4af2b0d2fd0ed7636e9eef9f21 100644 (file)
@@ -69,7 +69,7 @@ class SelfRecipient extends BaseRecipient implements Recipient {
         */
        public function resolveRecipient ($recipient, Listable $listInstance, array $packageData) {
                // Make sure the recipient is valid
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SELF-RECIPIENT: recipient=' . $recipient);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SELF-RECIPIENT: recipient=' . $recipient);
                // @TODO Add more checks on data
                assert($recipient == NetworkPackage::NETWORK_TARGET_SELF);
 
index 3cdc3f4460e900ed045ef0bb1a91db7d1a90e2e6..582d70683667f3e69de293511d05182d90fcffb9 100644 (file)
@@ -69,7 +69,7 @@ class UpperRecipient extends BaseRecipient implements Recipient {
         */
        public function resolveRecipient ($recipient, Listable $listInstance, array $packageData) {
                // Make sure the recipient is valid
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('UPPER-RECIPIENT: recipient=' . $recipient);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('UPPER-RECIPIENT: recipient=' . $recipient);
                assert($recipient == NetworkPackage::NETWORK_TARGET_UPPER);
 
                // Get all bootstrap nodes
index 3c526d8631619e9c21fd54a544a5a7295d5c3127..46ef6cfaf417aea48ccf458f433fb59d014c3649 100644 (file)
@@ -84,14 +84,14 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
         */
        private function getSubRegistryKey (ShareableInfo $infoInstance) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: infoInstance=' . $infoInstance->__toString() . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: infoInstance=' . $infoInstance->__toString() . ' - CALLED!');
 
                // Get address and port
                $address = $infoInstance->getAddress();
                $port    = $infoInstance->getPort();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: address=' . $address . ',port=' . $port);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: address=' . $address . ',port=' . $port);
 
                // Get connection type and port number and add both together
                $key = sprintf('%s:%s:%s:%s',
@@ -102,7 +102,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
                );
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: key=' .  $key . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: key=' .  $key . ' - EXIT!');
 
                // Return resulting key
                return $key;
@@ -116,13 +116,13 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
         */
        private function getRegistryKeyFromInfo (ShareableInfo $infoInstance) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: this=' . $this->__toString() . ',infoInstance=' . $infoInstance->__toString() . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: this=' . $this->__toString() . ',infoInstance=' . $infoInstance->__toString() . ' - CALLED!');
 
                // Get the key
                $key = $infoInstance->getProtocolName();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: key=' .  $key . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: key=' .  $key . ' - EXIT!');
 
                // Return resulting key
                return $key;
@@ -136,7 +136,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
         */
        private function isInfoRegistered (ShareableInfo $infoInstance) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY:info=' . $infoInstance->getProtocolName() . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY:info=' . $infoInstance->getProtocolName() . ' - CALLED!');
 
                // Get the key
                $key = $this->getRegistryKeyFromInfo($infoInstance);
@@ -145,7 +145,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
                $isRegistered = $this->instanceExists($key);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY:info=' . $infoInstance->getProtocolName() . ',isRegistered=' . intval($isRegistered) . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY:info=' . $infoInstance->getProtocolName() . ',isRegistered=' . intval($isRegistered) . ' - EXIT!');
 
                // Return result
                return $isRegistered;
@@ -161,7 +161,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
         */
        public function isSocketRegistered (ShareableInfo $infoInstance, StorableSocket $socketInstance) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY:info=' . $infoInstance->getProtocolName() . ',socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource() . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY:info=' . $infoInstance->getProtocolName() . ',socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource() . ' - CALLED!');
 
                // Default is not registered
                $isRegistered = FALSE;
@@ -172,7 +172,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
                        $key = $this->getRegistryKeyFromInfo($infoInstance);
 
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: this=' . $this->__toString() . ',info=' . $infoInstance->getProtocolName() . ',socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource() . ',key=' . $key . ' - Trying to get instance ...');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: this=' . $this->__toString() . ',info=' . $infoInstance->getProtocolName() . ',socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource() . ',key=' . $key . ' - Trying to get instance ...');
 
                        // Get the registry
                        $registryInstance = $this->getInstance($key);
@@ -181,12 +181,12 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
                        $socketKey = $this->getSubRegistryKey($infoInstance);
 
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: this=' . $this->__toString() . ',info=' . $infoInstance->getProtocolName() . ',socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource() . ',key=' . $key . ',socketKey=' . $socketKey . ' - Checking existence ...');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: this=' . $this->__toString() . ',info=' . $infoInstance->getProtocolName() . ',socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource() . ',key=' . $key . ',socketKey=' . $socketKey . ' - Checking existence ...');
 
                        // Is it there?
                        if ($registryInstance->instanceExists($socketKey)) {
                                // Debug message
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: Found instance for socketKey=' . $socketKey . ':' . $registryInstance->getInstance($socketKey));
+                               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: Found instance for socketKey=' . $socketKey . ':' . $registryInstance->getInstance($socketKey));
 
                                // Get the instance
                                $registeredInstance = $registryInstance->getInstance($socketKey);
@@ -195,12 +195,12 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
                                $isRegistered = (($registeredInstance instanceof StorableSocket) && ($registeredInstance->equals($socketInstance)));
 
                                // Debug message
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: Final result: isRegistered(' . $socketInstance->getSocketResource() . ')=' . intval($isRegistered));
+                               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: Final result: isRegistered(' . $socketInstance->getSocketResource() . ')=' . intval($isRegistered));
                        } // END - if
                } // END - if
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY:info=' . $infoInstance->getProtocolName() . ',socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource() . ',isRegistered=' . intval($isRegistered) . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY:info=' . $infoInstance->getProtocolName() . ',socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource() . ',isRegistered=' . intval($isRegistered) . ' - EXIT!');
 
                // Return the result
                return $isRegistered;
@@ -217,7 +217,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
         */
        public function registerSocketInstance (ShareableInfo $infoInstance, StorableSocket $socketInstance, array $packageData = array()) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY:info=' . $infoInstance->getProtocolName() . ',socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource() . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY:info=' . $infoInstance->getProtocolName() . ',socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource() . ' - CALLED!');
 
                // Is the socket already registered?
                if ($this->isSocketRegistered($infoInstance, $socketInstance)) {
@@ -241,7 +241,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
                $socketKey = $this->getSubRegistryKey($infoInstance);
 
                // We have a sub-registry, the socket key and the socket, now we need to put all together
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: socketKey=' . $socketKey . ',socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource() . ' - adding socket container instance ...');
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: socketKey=' . $socketKey . ',socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource() . ' - adding socket container instance ...');
                $registryInstance->addInstance($socketKey, $socketInstance);
 
                // Also register all instances from info instance in socket
@@ -257,7 +257,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
         */
        public function getRegisteredSocketResource (Listenable $listenerInstance) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY:listener=' . $listenerInstance->getProtocolName() . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY:listener=' . $listenerInstance->getProtocolName() . ' - CALLED!');
 
                // The socket must be registered before we can return it
                if (!$this->isInfoRegistered($listenerInstance)) {
@@ -278,7 +278,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
                $socketInstance = $registryInstance->getInstance($socketKey);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY:listener=' . $listenerInstance->getProtocolName() . ',socketResource[]=' . gettype($socketInstance) . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY:listener=' . $listenerInstance->getProtocolName() . ',socketResource[]=' . gettype($socketInstance) . ' - EXIT!');
 
                // Return the resource
                return $socketInstance;
@@ -298,12 +298,12 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
                // Get all keys and check them
                foreach ($this->getInstanceRegistry() as $key => $registryInstance) {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: key=' . $key . ',registryInstance=' . $registryInstance->__toString());
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: key=' . $key . ',registryInstance=' . $registryInstance->__toString());
 
                        // This is always a SubRegistry instance
                        foreach ($registryInstance->getInstanceRegistry() as $subKey => $socketInstance) {
                                // Debug message
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: key=' . $key . ',subKey=' . $subKey . ',socketInstance=' . $socketInstance->__toString());
+                               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: key=' . $key . ',subKey=' . $subKey . ',socketInstance=' . $socketInstance->__toString());
 
                                // Is this a StorableSocket instance and is the address the same?
                                if (($socketInstance instanceof StorableSocket) && ($socketInstance->ifAddressMatches($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT]))) {
@@ -318,7 +318,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
                                        $helperInstance = $socketInstance->getHelperInstance();
 
                                        // Debug message
-                                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: key=' . $key . ',subKey=' . $subKey . ',listenerInstance[]=' . gettype($listenerInstance) . ',helperInstance[]=' . gettype($helperInstance));
+                                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: key=' . $key . ',subKey=' . $subKey . ',listenerInstance[]=' . gettype($listenerInstance) . ',helperInstance[]=' . gettype($helperInstance));
 
                                        // Is a listener or helper set?
                                        if ($listenerInstance instanceof Listenable) {
@@ -339,7 +339,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
                                        }
 
                                        // Debug message
-                                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: key=' . $key . ',subKey=' . $subKey . ',infoInstance[' . gettype($infoInstance) . ']=' . $infoInstance->__toString() . ' with protocol ' . $infoInstance->getProtocolName() . ' - FOUND!');
+                                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: key=' . $key . ',subKey=' . $subKey . ',infoInstance[' . gettype($infoInstance) . ']=' . $infoInstance->__toString() . ' with protocol ' . $infoInstance->getProtocolName() . ' - FOUND!');
                                        break;
                                } // END - if
                        } // END - foreach
index 9a426a684608bd391ee57cc461f6a160c232aad3..74be57889bf8c73e48f496bfd58e50d4fbb7290a 100644 (file)
@@ -82,7 +82,7 @@ class BaseUrlSource extends BaseSource {
         */
        protected function enrichCrawlerQueueData (array &$crawlData) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : crawlData()=' . count($crawlData) . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : crawlData()=' . count($crawlData) . ' - CALLED!');
 
                // Check for minimum array elements
                assert(isset($crawlData[self::CRAWL_JOB_ARRAY_START_URL]));
@@ -91,7 +91,7 @@ class BaseUrlSource extends BaseSource {
                // @TODO Add more elements
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : EXIT!');
        }
 
        /**
@@ -102,13 +102,13 @@ class BaseUrlSource extends BaseSource {
         */
        protected function enqueueInFileStack (array $crawlData) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : crawlData()=' . count($crawlData) . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : crawlData()=' . count($crawlData) . ' - CALLED!');
 
                // Get the stack instance and enqueue it
                $this->getStackInstance()->pushNamed(self::STACKER_NAME_URLS, $crawlData);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : EXIT!');
        }
 }
 
index 36b772a7c416413e673fb022a9dfdb22737ba13a..9ad2f51645e54120def12ec7e81edd2823d3d1d1 100644 (file)
@@ -109,7 +109,7 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R
         * @return      $isFound        Whether a CSV file is found
         */
        private function isCsvFileFound () {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : CALLED!');
 
                // Is it valid?
                if (!$this->getDirectoryInstance()->getDirectoryIteratorInstance()->valid()) {
@@ -118,16 +118,16 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R
                } // END - if
 
                // Read next entry
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : this->csvFileImported=' . print_r($this->csvFileImported, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : this->csvFileImported=' . print_r($this->csvFileImported, TRUE));
                $directoryEntry = $this->getDirectoryInstance()->readDirectoryExcept(array_merge(array('.htaccess', '.', '..'), $this->csvFileImported));
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE directoryEntry(' . strlen($directoryEntry) . ')=' . $directoryEntry);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE directoryEntry(' . strlen($directoryEntry) . ')=' . $directoryEntry);
 
                // Is it empty or wrong file extension?
                if ((empty($directoryEntry)) || (substr($directoryEntry, -4, 4) != '.csv')) {
                        // Skip further processing
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE directoryEntry(' . strlen($directoryEntry) . ')=' . $directoryEntry . ' - SKIPPED!');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE directoryEntry(' . strlen($directoryEntry) . ')=' . $directoryEntry . ' - SKIPPED!');
                        return FALSE;
                } // END - if
 
@@ -135,7 +135,7 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R
                $this->lastCsvFileInstance = ObjectFactory::createObjectByConfiguredName('csv_input_file_class', array($this->csvFilePath . '/' . $directoryEntry));
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE  directoryEntry(' . strlen($directoryEntry) . ')=' . $directoryEntry . ' - Instance created - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE  directoryEntry(' . strlen($directoryEntry) . ')=' . $directoryEntry . ' - Instance created - EXIT!');
 
                // Found an entry
                return TRUE;
@@ -167,7 +167,7 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R
         */
        private function saveCsvDataInCrawlerQueue (array $csvData) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : csvData()=' . count($csvData) . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : csvData()=' . count($csvData) . ' - CALLED!');
 
                // The array must have a fixed amount of elements, later enhancements may accept more
                assert(count($csvData) == self::CRAWL_ENTRY_SIZE);
@@ -184,13 +184,13 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R
                );
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : csvArray()=' . count($csvArray) . ' - BEFORE!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : csvArray()=' . count($csvArray) . ' - BEFORE!');
 
                // Then add more data to it
                $this->enrichCrawlerQueueData($csvArray);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : csvArray()=' . count($csvArray) . ' - AFTER!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : csvArray()=' . count($csvArray) . ' - AFTER!');
 
                /*
                 * Then enqueue it in the file stack. The local crawler "task" will
@@ -199,7 +199,7 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R
                $this->enqueueInFileStack($csvArray);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : EXIT!');
        }
 
        /**
@@ -235,7 +235,7 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R
         * @throws      NullPointerException    If lastCsvFileInstance is not set
         */
        private function addCsvFile () {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : CALLED!');
 
                // Is the instance set?
                if (is_null($this->lastCsvFileInstance)) {
@@ -252,7 +252,7 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R
                // ... and finally NULL it (to save some RAM)
                $this->lastCsvFileInstance = NULL;
 
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : EXIT!');
        }
 
        /**
@@ -264,7 +264,7 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R
         */
        private function parseCsvFile () {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : CALLED!');
 
                // Get next entry
                $csvFileInstance = $this->getStackSourceInstance()->popNamed(self::STACK_NAME_CSV_FILE);
@@ -273,7 +273,7 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R
                $csvData = $csvFileInstance->readCsvFileLine($this->columnSeparator);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : csvData[' . gettype($csvData) . ']=' . print_r($csvData, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : csvData[' . gettype($csvData) . ']=' . print_r($csvData, TRUE));
 
                // Expect always an array
                assert(is_array($csvData));
@@ -281,7 +281,7 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R
                // Is the array empty?
                if (count($csvData) == 0) {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : File ' . $csvFileInstance->getFileName() . ' has been fully read.');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : File ' . $csvFileInstance->getFileName() . ' has been fully read.');
 
                        // Try to close it by actually unsetting (destructing) it
                        unset($csvFileInstance);
@@ -303,7 +303,7 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R
                $this->getStackSourceInstance()->pushNamed(self::STACK_NAME_CSV_ENTRY, $csvData);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : EXIT!');
        }
 
        /**
@@ -313,13 +313,13 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R
         */
        private function parseCsvEntry () {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : CALLED!');
 
                // Pop it from stack
                $csvData = $this->getStackSourceInstance()->popNamed(self::STACK_NAME_CSV_ENTRY);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : csvData[' . gettype($csvData) . ']=' . print_r($csvData, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : csvData[' . gettype($csvData) . ']=' . print_r($csvData, TRUE));
 
                // It must have a fixed amount of elements (see method parseCsvFile() for details)
                assert(count($csvData) == self::CRAWL_ENTRY_SIZE);
@@ -328,7 +328,7 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R
                $this->saveCsvDataInCrawlerQueue($csvData);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SOURCE : EXIT!');
        }
 
        /**
@@ -371,7 +371,5 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R
 
                $this->partialStub('Please implement this method.');
        }
-}
 
-// [EOF]
-?>
+}
index 04406a0cd4e1e065c7a9da1b8cda70ca0580809b..8f05ca6b191da0f502547b88c363ed7d059d0800 100644 (file)
@@ -52,7 +52,7 @@ class Communicator???State extends BaseCommunicatorState implements Stateable {
                $stateInstance = new Communicator???State();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('COMMUNICATOR-STATE: Has changed from ' . $communicatorInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('COMMUNICATOR-STATE: Has changed from ' . $communicatorInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
 
                // Set the communicator instance
                $stateInstance->setCommunicatorInstance($communicatorInstance);
@@ -60,7 +60,5 @@ class Communicator???State extends BaseCommunicatorState implements Stateable {
                // Return the prepared instance
                return $stateInstance;
        }
-}
 
-// [EOF]
-?>
+}
index 34f86784be63854748b55166f51524284fdbe177..e03a60c76ccd77f8660dca918c4b2193bb1b572e 100644 (file)
@@ -52,7 +52,7 @@ class Crawler???State extends BaseCrawlerState implements Stateable {
                $stateInstance = new Crawler???State();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('COMMUNICATOR-STATE: Has changed from ' . $crawlerInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('COMMUNICATOR-STATE: Has changed from ' . $crawlerInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
 
                // Set the crawler instance
                $stateInstance->setCrawlerInstance($crawlerInstance);
@@ -60,7 +60,5 @@ class Crawler???State extends BaseCrawlerState implements Stateable {
                // Return the prepared instance
                return $stateInstance;
        }
-}
 
-// [EOF]
-?>
+}
index d4f17b46fa0a84c6a3111ff5cdd8699a877d9786..33b6e167b95028add65970faaf62c2c9868a1f2b 100644 (file)
@@ -52,7 +52,7 @@ class Cruncher???State extends BaseCruncherState implements Stateable {
                $stateInstance = new Cruncher???State();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRUNCHER-STATE: Has changed from ' . $cruncherInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRUNCHER-STATE: Has changed from ' . $cruncherInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
 
                // Set the cruncher instance
                $stateInstance->setCruncherInstance($cruncherInstance);
@@ -70,7 +70,5 @@ class Cruncher???State extends BaseCruncherState implements Stateable {
        public function executeState (Executor $executorInstance) {
                $this->partialStub('This state needs implementation. executorInstance=' . $executorInstance->__toString());
        }
-}
 
-// [EOF]
-?>
+}
index 18021357fb9756b130ca7e366c2c578a800abe93..9e908d6b9e1f6c8eb101d2f2f3cf8a74a61e2acb 100644 (file)
@@ -55,7 +55,7 @@ class DhtActiveState extends BaseDhtState implements Stateable {
                $stateInstance = new DhtActiveState();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-STATE: Has changed from ' . $dhtInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-STATE: Has changed from ' . $dhtInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
 
                // Return the prepared instance
                return $stateInstance;
index 1059659cf1eaa2bf12443979420f36a98c00d652..e03a97a8c8a62bba89b1bbc2d273f8ea68090b63 100644 (file)
@@ -58,7 +58,7 @@ class DhtBootingState extends BaseDhtState implements Stateable {
                $stateInstance = new DhtBootingState();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-STATE: Has changed from ' . $dhtInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-STATE: Has changed from ' . $dhtInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
 
                // Get node instance and enable DHT bootstrap requests
                NodeObjectFactory::createNodeInstance()->enableAcceptDhtBootstrap();
index 974d6f0c7561d1fb1559beed1ff7e50f50fe06ca..71aea4b48a59a287ad5310a9567e6992a0ca02f5 100644 (file)
@@ -55,7 +55,7 @@ class Dht???State extends BaseDhtState implements Stateable {
                $stateInstance = new Dht???State();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-STATE: Has changed from ' . $dhtInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-STATE: Has changed from ' . $dhtInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
 
                // Return the prepared instance
                return $stateInstance;
index 107821756ce6dad3a66937a71ae0bece8ac8d686..da78087471b26daae8a467df2366b0285f17e326 100644 (file)
@@ -57,7 +57,7 @@ class DhtInitState extends BaseDhtState implements Stateable {
                $stateInstance = new DhtInitState();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-STATE: Has changed from ' . $dhtInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-STATE: Has changed from ' . $dhtInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
 
                // Return the prepared instance
                return $stateInstance;
index a80a70e82b0e2fd138923acecb66d25d1cfbe801..8ddde77956ff983bc9558e42f10d466e1e96faf1 100644 (file)
@@ -57,7 +57,7 @@ class DhtVirginState extends BaseDhtState implements Stateable {
                $stateInstance = new DhtVirginState();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-STATE: Has changed from ' . $dhtInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-STATE: Has changed from ' . $dhtInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
 
                // Return the prepared instance
                return $stateInstance;
index c0b037579910a2ffd664b4124f75ac5f934d3261..4bc9d534e28c633610f0e0aa76747623bd738cdf 100644 (file)
@@ -56,7 +56,7 @@ class MinerBootingState extends BaseMinerState implements Stateable {
                $stateInstance = new MinerBootingState();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MINER-STATE: Has changed from ' . $minerInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MINER-STATE: Has changed from ' . $minerInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
 
                // Return the prepared instance
                return $stateInstance;
@@ -84,7 +84,5 @@ class MinerBootingState extends BaseMinerState implements Stateable {
                // Mark producer as booted
                $this->bootedProducer[$executorInstance->__toString()] = TRUE;
        }
-}
 
-// [EOF]
-?>
+}
index 4db5144a115bd82cc6db34e06f16fe4b54ec652d..46b121ffc5c6ad9a48e4a937d8a417d610eeae5b 100644 (file)
@@ -52,7 +52,7 @@ class Miner???State extends BaseMinerState implements Stateable {
                $stateInstance = new Miner???State();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MINER-STATE: Has changed from ' . $minerInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MINER-STATE: Has changed from ' . $minerInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
 
                // Set the miner instance
                $stateInstance->setMinerInstance($minerInstance);
@@ -70,7 +70,5 @@ class Miner???State extends BaseMinerState implements Stateable {
        public function executeState (Executor $executorInstance) {
                $this->partialStub('This state needs implementation. executorInstance=' . $executorInstance->__toString());
        }
-}
 
-// [EOF]
-?>
+}
index cb2d40003421be79bd1ef4ea2f7592528ffcc483..51c034474d33ce1390fc5eec14b53758f2fc9b46 100644 (file)
@@ -55,7 +55,7 @@ class Node???State extends BaseNodeState implements Stateable {
                $stateInstance = new Node???State();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-STATE: Has changed from ' . $nodeInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-STATE: Has changed from ' . $nodeInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
 
                // Set the node instance
                $stateInstance->setNodeInstance($nodeInstance);
@@ -63,7 +63,5 @@ class Node???State extends BaseNodeState implements Stateable {
                // Return the prepared instance
                return $stateInstance;
        }
-}
 
-// [EOF]
-?>
+}
index 285458ea1fcf9b7872f6d607f12778a5997d890e..d24f16cbb05d4c3d98234e78bbc33256dd420507 100644 (file)
@@ -65,7 +65,7 @@ class ConnectionStatisticsHelper extends BaseHubSystem {
         * @return      $isExhausted            Whether the retry count has been reached
         */
        public static function isConnectRetryExhausted (ConnectionHelper $helperInstance) {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-STATISTICS: helperInstance=' . $helperInstance->__toString() . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-STATISTICS: helperInstance=' . $helperInstance->__toString() . ' - CALLED!');
                // Construct config entry
                $configEntry = $helperInstance->getProtocolName() . '_connect_retry_max';
 
@@ -79,7 +79,7 @@ class ConnectionStatisticsHelper extends BaseHubSystem {
                );
 
                // Return it
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-STATISTICS: helperInstance=' . $helperInstance->__toString() . ',isExhausted=' . intval($isExhausted) . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-STATISTICS: helperInstance=' . $helperInstance->__toString() . ',isExhausted=' . intval($isExhausted) . ' - EXIT!');
                return $isExhausted;
        }
 
@@ -90,15 +90,15 @@ class ConnectionStatisticsHelper extends BaseHubSystem {
         * @return      void
         */
        public static function increaseConnectRetry (ConnectionHelper $helperInstance) {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-STATISTICS: helperInstance=' . $helperInstance->__toString() . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-STATISTICS: helperInstance=' . $helperInstance->__toString() . ' - CALLED!');
                // Is the counter there
                if (!isset(self::$connectionStatistics[$helperInstance->getProtocolName()][$helperInstance->__toString()]['retry_count'])) {
                        // First attempt
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-STATISTICS: helperInstance=' . $helperInstance->__toString() . ' - FIRST!');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-STATISTICS: helperInstance=' . $helperInstance->__toString() . ' - FIRST!');
                        self::$connectionStatistics[$helperInstance->getProtocolName()][$helperInstance->__toString()]['retry_count'] = 1;
                } else {
                        // Next attempt
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-STATISTICS: helperInstance=' . $helperInstance->__toString() . ' - INCREMENT!');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-STATISTICS: helperInstance=' . $helperInstance->__toString() . ' - INCREMENT!');
                        self::$connectionStatistics[$helperInstance->getProtocolName()][$helperInstance->__toString()]['retry_count']++;
                }
 
index 27d937c84da06fab57288d2fe2b118455bdaf252..6774f624c85c344eff79c21533bb5602bb70fc3c 100644 (file)
@@ -72,7 +72,7 @@ class RawDataInputStream extends BaseStream implements InputStream {
         */
        public function streamData ($data) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAW-INPUT-STREAM[' . __METHOD__ . ':' . __LINE__ . ': data(' . strlen($data) . ')=' . $data);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAW-INPUT-STREAM: data(' . strlen($data) . ')=' . $data . ' - CALLED!');
 
                // Do we have start and end marker again?
                assert($this->ifStartEndMarkersSet($data));
@@ -102,12 +102,10 @@ class RawDataInputStream extends BaseStream implements InputStream {
                }
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAW-INPUT-STREAM: Length of data is now ' . strlen($data) . ' Bytes.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAW-INPUT-STREAM: Length of data is now ' . strlen($data) . ' Bytes.');
 
                // Return it
                return $data;
        }
-}
 
-// [EOF]
-?>
+}
index c6c4b2b82fb0f62575f6a83da767fd5af3526885..4eccc7ae5c2ec0a234b1a4cfed00994d331fffd6 100644 (file)
@@ -68,14 +68,12 @@ class RawDataOutputStream extends BaseStream implements OutputStream {
                 * [[S]] - Start marker
                 * [[E]] - End marker
                 */
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAW-OUTPUT-STREAM: data()=' . strlen($data) . ' - BEFORE!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAW-OUTPUT-STREAM: data()=' . strlen($data) . ' - BEFORE!');
                $data = BaseRawDataHandler::STREAM_START_MARKER . base64_encode($data) . BaseRawDataHandler::STREAM_END_MARKER;
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAW-OUTPUT-STREAM: data(' . strlen($data) . ')=' . $data);
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAW-OUTPUT-STREAM: data(' . strlen($data) . ')=' . $data);
 
                // Return it
                return $data;
        }
-}
 
-// [EOF]
-?>
+}
index b2d24d840497969119353863ecbc2204618956df..defb26b224d1cb151ca1adb81f858f69b90cf79a 100644 (file)
@@ -114,7 +114,7 @@ class PackageTags extends BaseTag implements Tagable {
         */
        private function extractTagsFromPackageData (array $packageData) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TAGS: packageData=' . print_r($packageData, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TAGS: packageData=' . print_r($packageData, TRUE));
 
                /*
                 * We take a look at the tags (in most cases only one is needed) so
index 011822d47279740c01c9748bf8874e5fce0bdf4e..b11ac8fef100ded4bfb5e8e8e3be0ada0b3f1995 100644 (file)
@@ -83,9 +83,7 @@ class AptProxy???Task extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('APT-PROXY-|||-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 0b050b803ff2ba7e5494546ff85a79b8bc9f49cc..1fa8b30342c9301803826718254a06c8264119b7 100644 (file)
@@ -82,9 +82,7 @@ class AptProxyListenerTask extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('APT-PROXY-LISTENER-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index b3a18694279151b720953fa322230f570a2692ce..95200985b1f6788abb2a9b08ed9570a86720fafa 100644 (file)
@@ -83,9 +83,7 @@ class Chat???Task extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHAT-|||-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index e415e301dc46f20983838e2ec9aa3763d368d441..cecc84acbe7714051e0e63ec812aa670e27bd2b3 100644 (file)
@@ -82,9 +82,7 @@ class ChatTelnetListenerTask extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHAT-TELNET-LISTENER-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 92500cd17ba8a966a48308fd84376bbc13c4a79b..c7384fbcfa3dff9e554820f4107e9cff9aae840d 100644 (file)
@@ -83,9 +83,7 @@ class Crawler???Task extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-|||-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 12b86c2b4af92b7d3edc0b74fa7a19bca4e02dff..b49ecc74889c0bbc65864421769be2831cb0c493 100644 (file)
@@ -80,7 +80,7 @@ class CrawlerNodeCommunicatorTask extends BaseTask implements Taskable, Visitabl
                $stateInstance = Registry::getRegistry()->getInstance('crawler')->getStateInstance();
 
                // Debug message
-               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Executing stateInstance=' . $stateInstance->__toString());
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-NODE-COMMUNICATOR-TASK: Executing stateInstance=' . $stateInstance->__toString());
 
                // We can now invoke that state instance and pass our communicator instance for generating some test units
                $stateInstance->executeState($communicatorInstance);
@@ -93,7 +93,7 @@ class CrawlerNodeCommunicatorTask extends BaseTask implements Taskable, Visitabl
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-NODE-COMMUNICATOR-TASK: Shutting down...');
        }
 }
 
index 21f50facdd7329cba60211f81561e28166ed5ea1..5d1d2ea2e09266b7d727bbd00c06ea98e5ab683b 100644 (file)
@@ -83,9 +83,7 @@ class CrawlerDocumentParserTask extends BaseTask implements Taskable, Visitable
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-DOCUMENT-PARSER-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index d08064d674666ada3c21e203599d12b9ba41fbc6..1c0e1f86a4a035cf291f01ffc94613161cef7ce0 100644 (file)
@@ -83,9 +83,7 @@ class CrawlerMimeSnifferTask extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-MIME-SNIFFER-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 3785b5c2aaf75c295bd6ea03dd3b45a77055697a..bc22789d869f88cd8d2349dede29c520cdf57a69 100644 (file)
@@ -83,9 +83,7 @@ class CrawlerPingTask extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-PING-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 342d5c0c2f3ab8f3fa63631561bb99a06f9a8105..7bbd554b0fe98dfe693690cfdc4e521bf2e00309 100644 (file)
@@ -83,9 +83,7 @@ class CrawlerRemoteJobPublisherTask extends BaseTask implements Taskable, Visita
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-REMOTE-JOB-PUBLISHER-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index d47394f4a4fb60b997f6636f83fda5efe3427950..6c7763f6d77870fc3f880227b9dc61d8ffcddee1 100644 (file)
@@ -83,9 +83,7 @@ class Crawler???ScannerTask extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 581e2da31d7d3f382f0bb647a31eeccb42070f95..8e6b59aad032e5134b0530c7f4ff8acbdef84644 100644 (file)
@@ -86,9 +86,7 @@ class CrawlerUploadedListScannerTask extends BaseTask implements Taskable, Visit
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-UPLOADED-LIST-SCANNER-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 1b1b51731b61d93e1d0cfac541b2c5b1c3412faf..4e60fd5aef3ebe9894520b9acd0c70f5dd8771d2 100644 (file)
@@ -83,9 +83,7 @@ class CrawlerSnippetExtractorTask extends BaseTask implements Taskable, Visitabl
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-SNIPPET-EXTRACTOR-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 2d0cab98876d923708d1c678beccfe6165e5146d..7d91182f979d69f9392891a76cd69e49b6318207 100644 (file)
@@ -83,9 +83,7 @@ class CrawlerStructureAnalyzerTask extends BaseTask implements Taskable, Visitab
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-STRUCTURE-ANALYZER-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 9ef774d796e572b9d0ebf87845cc4dc9e5eaa66d..23c981f4f7d66c52cc73d6cbf91ce213e02480a8 100644 (file)
@@ -83,9 +83,7 @@ class CrawlerLocalUrlCrawlerTask extends BaseTask implements Taskable, Visitable
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-LOCAL-URL-CRAWLER-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 0a0ea736bae201a3feb33059d2ecc80948a90168..9712af21651c5a952986ba74dd40044451fe6008 100644 (file)
@@ -83,9 +83,7 @@ class CrawlerRemoteUrlCrawlerTask extends BaseTask implements Taskable, Visitabl
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-REMOTE-URL-CRAWLER-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index c038eac31be882fb976463c9bf3223c55bc5ac5b..4c478cc3bf3048095de96be3bcda899b01ad9025 100644 (file)
@@ -94,9 +94,7 @@ class CrawlerUrlSource???Task extends BaseUrlSourceTask implements Taskable, Vis
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-URL-SOURCE-|||-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index beda4f4b45c0584175ef9e1759b76372d2df1dc4..864cc18a3004c49825039747be379893ec4c92f3 100644 (file)
@@ -94,9 +94,7 @@ class CrawlerUrlSourceFoundRssTask extends BaseUrlSourceTask implements Taskable
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-URL-SOURCE-FOUND-RSS-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index ea52e9b1ebfbf3861bc56dd6039b7271ceeb7f27..0e3f9c4e670c291dfcc0094d6c112b29b63603eb 100644 (file)
@@ -94,9 +94,7 @@ class CrawlerUrlSourceLocalStartTask extends BaseUrlSourceTask implements Taskab
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-URL-SOURCE-LOCAL-START-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 2155c75e7744dce0b3a2aeed558f5a64989e57c6..8add513895a80db8435f0d58f89c37c45ae92859 100644 (file)
@@ -94,9 +94,7 @@ class CrawlerUrlSourceRssStartTask extends BaseUrlSourceTask implements Taskable
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-URL-SOURCE-RSS-START-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index d1ddc638f50e31c092731fc75d92bc1453762dc8..85fea288db20f739b3cf0464a1a972577411a5cb 100644 (file)
@@ -94,9 +94,7 @@ class CrawlerUrlSourceUploadedListTask extends BaseUrlSourceTask implements Task
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-URL-SOURCE-UPLOADED-LIST-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index a8811be409f309194a34c262d4f91d3767b23ec1..882933389aeabd417fa1429f77f8596924df0fd4 100644 (file)
@@ -83,9 +83,7 @@ class Cruncher???Task extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRUNCHER-|||-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index b7536bfd3668dca0b47013415131aafa39f50af8..b0ec5ee2ca581365173f910e7f49b208ceda99bf 100644 (file)
@@ -78,7 +78,7 @@ class CruncherKeyProducerTask extends BaseTask implements Taskable, Visitable {
                $stateInstance = Registry::getRegistry()->getInstance('cruncher')->getStateInstance();
 
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Executing stateInstance=' . $stateInstance->__toString());
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRUNCHER-KEY-PRODUCER-TASK: Executing stateInstance=' . $stateInstance->__toString());
 
                // We can now invoke that state instance and pass our producer instance for generating some test units
                $stateInstance->executeState($producerInstance);
@@ -91,9 +91,7 @@ class CruncherKeyProducerTask extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRUNCHER-KEY-PRODUCER-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 892fd7609759706ef7b5dcda02c7edeac4b20bb1..2b08ed3e042738c771cad8996b509936aa76fa79 100644 (file)
@@ -78,7 +78,7 @@ class CruncherTestUnitProducerTask extends BaseTask implements Taskable, Visitab
                $stateInstance = Registry::getRegistry()->getInstance('cruncher')->getStateInstance();
 
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Executing stateInstance=' . $stateInstance->__toString());
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRUNCHER-TEST-UNIT-PRODUCER-TASK: Executing stateInstance=' . $stateInstance->__toString());
 
                // We can now invoke that state instance and pass our producer instance for generating some test units
                $stateInstance->executeState($producerInstance);
@@ -91,9 +91,7 @@ class CruncherTestUnitProducerTask extends BaseTask implements Taskable, Visitab
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRUNCHER-TEST-UNIT-PRODUCER-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 1612c4a5cc8fb5fe5454ed595c22500f1f09d54d..15a306cf06a51396d973a83864cfc60bd8d338c4 100644 (file)
@@ -92,9 +92,7 @@ class CruncherWorkUnitFetcherTask extends BaseTask implements Taskable, Visitabl
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRUNCHER-WORK-UNIT-FETCHER-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 1c5a9d0a126a88c005ffa80b288f22b5d177cc15..b6c6d9c33e6bcd8352311528877bf9a893846a68 100644 (file)
@@ -92,9 +92,7 @@ class MinerBlockFetcherTask extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MINER-BLOCK-FETCHER-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 0c38c8d462c783ee39268600ab49ea5bd8255f9e..bc6ed58de97d6597d9eead0931c22e0c77f13c27 100644 (file)
@@ -79,7 +79,7 @@ class MinerRealGenesisBlockProducerTask extends BaseTask implements Taskable, Vi
                $stateInstance = Registry::getRegistry()->getInstance('miner')->getStateInstance();
 
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Executing stateInstance=' . $stateInstance->__toString());
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MINER-GENESIS-BLOCK-PRODUCER-TASK: Executing stateInstance=' . $stateInstance->__toString());
 
                // We can now invoke that state instance and pass our producer instance for generating some test units
                $stateInstance->executeState($producerInstance);
@@ -92,9 +92,7 @@ class MinerRealGenesisBlockProducerTask extends BaseTask implements Taskable, Vi
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MINER-GENESIS-BLOCK-PRODUCER-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 7c47c875a89c93c13e83120afff60f8a2fb0d0f0..c1ff8f3d7a919459ad56c9a5a70e8aaed41a04bd 100644 (file)
@@ -78,7 +78,7 @@ class MinerTestGenesisBlockProducerTask extends BaseTask implements Taskable, Vi
                $stateInstance = Registry::getRegistry()->getInstance('miner')->getStateInstance();
 
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Executing stateInstance=' . $stateInstance->__toString());
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MINER-TEST-GENESIS-BLOCK-PRODUCER-TASK: Executing stateInstance=' . $stateInstance->__toString());
 
                // We can now invoke that state instance and pass our producer instance for generating some test units
                $stateInstance->executeState($producerInstance);
@@ -91,9 +91,7 @@ class MinerTestGenesisBlockProducerTask extends BaseTask implements Taskable, Vi
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MINER-TEST-GENESIS-BLOCK-PRODUCER-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 577d8f6ffc1469e6a018fdc1d815f3e50241f6ae..57d413d08bbf10d3ee74d8a509c612f5fbaa527a 100644 (file)
@@ -83,9 +83,7 @@ class Miner???Task extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MINER-|||-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 2e9aedaf235759941214aeca2ef337bb3946cde4..a89138a437d6cde71e7df511ff4bf1cef58314f4 100644 (file)
@@ -79,7 +79,7 @@ class MinerNodeCommunicatorTask extends BaseTask implements Taskable, Visitable
                $stateInstance = $communicatorInstance->getStateInstance();
 
                // Debug message
-               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Executing stateInstance=' . $stateInstance->__toString());
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MINER-NODE-COMMUNICATOR-TASK: Executing stateInstance=' . $stateInstance->__toString());
 
                // We can now invoke that state instance and pass our communicator instance for generating some test units
                $stateInstance->executeState($communicatorInstance);
@@ -92,7 +92,7 @@ class MinerNodeCommunicatorTask extends BaseTask implements Taskable, Visitable
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MINER-NODE-COMMUNICATOR-TASK: Shutting down...');
        }
 }
 
index 4bf0f6e88f63876c8d31258345a57b8fb9c3f9c6..99e20b28ee19f998039a5abda49094a173ec65e2 100644 (file)
@@ -83,9 +83,7 @@ class NetworkPackage???Task extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-|||-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 8d850d6df8df1853f14237c2a848b257064ea5db..9073efe3689a19b840efdb0d12dabc40ca6b0c95 100644 (file)
@@ -65,8 +65,14 @@ class NetworkPackageReaderTask extends BaseTask implements Taskable, Visitable {
         * @todo        Also visit some sub-objects?
         */
        public function accept (Visitor $visitorInstance) {
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-READER-TASK: visitorInstance=%s - CALLED!', $visitorInstance->__toString()));
+
                // Visit this task
                $visitorInstance->visitTask($this);
+
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: EXIT!');
        }
 
        /**
@@ -75,11 +81,17 @@ class NetworkPackageReaderTask extends BaseTask implements Taskable, Visitable {
         * @return      void
         */
        public function executeTask () {
-               // "Cache" package instance
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: CALLED!');
+
+               // Get package instance
                $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
 
                // Do we have something to handle?
                if ($packageInstance->isProcessedMessagePending()) {
+                       // Trace message
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling packageInstance->handleProcessedMessage() ...');
+
                        /*
                         * A previously proccessed message is waiting for being
                         * "interpreted". This is done by trying to find a configuration
@@ -87,6 +99,9 @@ class NetworkPackageReaderTask extends BaseTask implements Taskable, Visitable {
                         */
                        $packageInstance->handleProcessedMessage();
                } elseif ($packageInstance->isNewMessageArrived()) {
+                       // Trace message
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling packageInstance->handleNewlyArrivedMessage() ...');
+
                        /*
                         * A fully "decoded" message has been received and added for being
                         * processed. Processing a message should not take long, so mostly
@@ -96,6 +111,9 @@ class NetworkPackageReaderTask extends BaseTask implements Taskable, Visitable {
                         */
                        $packageInstance->handleNewlyArrivedMessage();
                } elseif ($packageInstance->isIncomingRawDataHandled()) {
+                       // Trace message
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling packageInstance->assembleDecodedDataToPackage() ...');
+
                        /*
                         * Incoming decoded data has been handled (see below) so it needs to
                         * be assembled back to a "package array". Please see NetworkPackage
@@ -103,17 +121,29 @@ class NetworkPackageReaderTask extends BaseTask implements Taskable, Visitable {
                         */
                        $packageInstance->assembleDecodedDataToPackage();
                } elseif ($packageInstance->ifMultipleMessagesPending()) {
+                       // Trace message
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling packageInstance->handleMultipleMessages() ...');
+
                        /*
                         * Some raw data contained multiple messages which where now splitted.
                         */
                        $packageInstance->handleMultipleMessages();
                } elseif ($packageInstance->isNewRawDataPending()) {
+                       // Trace message
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling packageInstance->handleIncomingDecodedData() ...');
+
                        // Raw, decoded data has been received
                        $packageInstance->handleIncomingDecodedData();
                } elseif ($packageInstance->ifAssemblerHasPendingDataLeft()) {
+                       // Trace message
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling packageInstance->handleAssemblerPendingData() ...');
+
                        // Handle any pending data from the package assembler
                        $packageInstance->handleAssemblerPendingData();
-               } // END - if
+               }
+
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: EXIT!');
        }
 
        /**
@@ -123,7 +153,7 @@ class NetworkPackageReaderTask extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Shutting down...');
        }
 
 }
index dc1c5220b3dcf765b9522b6e9f5886eb1135d723..d9609e6d21c6022aabc26648356427bc6e17817a 100644 (file)
@@ -65,8 +65,14 @@ class NetworkPackageWriterTask extends BaseTask implements Taskable, Visitable {
         * @todo        Also visit some sub-objects?
         */
        public function accept (Visitor $visitorInstance) {
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-WRITER-TASK: visitorInstance=%s - CALLED!', $visitorInstance->__toString()));
+
                // Visit this task
                $visitorInstance->visitTask($this);
+
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: EXIT!');
        }
 
        /**
@@ -75,23 +81,41 @@ class NetworkPackageWriterTask extends BaseTask implements Taskable, Visitable {
         * @return      void
         */
        public function executeTask () {
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: CALLED!');
+
                // "Cache" package instance
                $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
 
                // Do we have something to deliver?
                if ($packageInstance->isEncodedDataPending()) {
+                       // Trace message
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Calling packageInstance->sendEncodedData() ...');
+
                        // Sent encoded (raw) data
                        $packageInstance->sendEncodedData();
                } elseif ($packageInstance->isPackageWaitingForDelivery()) {
+                       // Trace message
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Calling packageInstance->sendWaitingPackage() ...');
+
                        // Sent it finally out
                        $packageInstance->sendWaitingPackage();
                } elseif ($packageInstance->isPackageDeclared()) {
+                       // Trace message
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Calling packageInstance->processDeclaredPackage() ...');
+
                        // Prepare package for delivery
                        $packageInstance->processDeclaredPackage();
                } elseif ($packageInstance->isPackageEnqueued()) {
+                       // Trace message
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Calling packageInstance->declareEnqueuedPackage() ...');
+
                        // Okay, then deliver (better discover its recipients) this package
                        $packageInstance->declareEnqueuedPackage();
                }
+
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: EXIT!');
        }
 
        /**
@@ -101,7 +125,7 @@ class NetworkPackageWriterTask extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Shutting down...');
        }
 
 }
index de74d8cee52eab01140848828a751a1936110343..b83eca7ac6f15ddcb268abceae87424c90a0b14b 100644 (file)
@@ -85,9 +85,7 @@ class NodeAnnouncementTask extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-ANNOUNCEMENT-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 9f896b5933e7d64cf644408bdea5b8e1c3059001..556e032b2de9a8816ff16e64b2906dc68a99055d 100644 (file)
@@ -120,9 +120,7 @@ class NodeChunkAssemblerTask extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-CHUNK-ASSEMBLER-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 1cfd8566c80250365a9c28f684e0e179c4b9beb8..ca0ddc3811b6555ba51936486949ba2012fcef28 100644 (file)
@@ -83,9 +83,7 @@ class Node???Task extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-|||-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index bcbaa61955c413a244943845816e3fbd43a9c51b..a570de132b81fc6e0ddc306b1f98af9ba2267a07 100644 (file)
@@ -94,9 +94,7 @@ class NodePackageDecoderTask extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-PACKAGE-DECODER-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index fac682a0dd029529e616a3e4e2693ef6eb2acd8d..6f642a28eed50672058a79fdded94183e9e29d82 100644 (file)
@@ -83,9 +83,7 @@ class NodeDht???Task extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-DHT-|||-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index c2465718d952feca1a89d32d19ed54baca332667..c00f05218fb45ca4c5bfdac6c65efd868ceef3ca 100644 (file)
@@ -85,7 +85,7 @@ class NodeDhtBootstrapTask extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-DHT-BOOTSTRAP-TASK: Shutting down...');
        }
 
 }
index e9c0df869b904e33bf3b36860af1f2aa5c93fd99..ffac959576e21ba451af766b50c24c255d73b76c 100644 (file)
@@ -85,7 +85,7 @@ class NodeDhtInitializationTask extends BaseTask implements Taskable, Visitable
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-DHT-INITIALIZATION-TASK: Shutting down...');
        }
 
 }
index 625e8e5324db41806093358541d338b1b8243c0e..92aeffe5875679022dd762de7d6b1ea3e337e03b 100644 (file)
@@ -85,7 +85,7 @@ class NodeDhtLateBootstrapTask extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-DHT-LATE-BOOTSTRAP-TASK: Shutting down...');
        }
 
 }
index 01bbf446d1e5ca8c00223ff2d7cba732d6692441..babedfe6fc13d9827610321a26969ff32b3e3ba1 100644 (file)
@@ -92,7 +92,7 @@ class NodeDhtPublicationCheckTask extends BaseTask implements Taskable, Visitabl
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-PUBLICATION-CHECK-TASK: Shutting down...');
        }
 
 }
index 268df78279feb3f61c53d3538d48c866226cbb99..d25f6dcbae1abac12b2c70580a6388bcd0a337a5 100644 (file)
@@ -92,7 +92,7 @@ class NodeDhtPublicationTask extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-DHT-PUBLICATION-TASK: Shutting down...');
        }
 
 }
index cd9ddadac8f4c84b604b12f16d7f8caff8e72b32..34c11cf063d9a7e23801f96570478de19d087845 100644 (file)
@@ -92,7 +92,7 @@ class NodeDhtQueryTask extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-DHT-QUERY-TASK: Shutting down...');
        }
 
 }
index 2fe9803cbf9953b87e4b5d0ee84e8d13d378f6bc..b5eb564c01877961dcd0575a9b593b1c5611715d 100644 (file)
@@ -68,7 +68,7 @@ class NodeSocketListenerTask extends BaseTask implements Taskable, Visitable {
                $nodeInstance = NodeObjectFactory::createNodeInstance();
 
                // Visit the pool listener task
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('LISTENER-TASK: Going to visit object ' . $nodeInstance->getListenerPoolInstance()->__toString() . ' ...');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('LISTENER-TASK: Going to visit object ' . $nodeInstance->getListenerPoolInstance()->__toString() . ' ...');
                $nodeInstance->getListenerPoolInstance()->accept($visitorInstance);
 
                // Visit this task
@@ -92,9 +92,7 @@ class NodeSocketListenerTask extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-SOCKET-LISTENER-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 3688dde7e20fffdaf3c29f183a188ba55f75b263..f2fc8c5f697df4e4adf7b08aa7007c3495f14a94 100644 (file)
@@ -94,9 +94,7 @@ class NodePingTask extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-PING-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 0a979eefb22c7f8755a9cf480a2d439e8a1a5d83..700654dc622d909e6e0e09a5ff082de54de14a6d 100644 (file)
@@ -85,9 +85,7 @@ class NodeSelfConnectTask extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-SELF-CONNECTTASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 2a54b5aa6e487f80bb3a001fe9ef46bf17bf29e0..8aaa8f045a65bd35614748d4955b1312fe69dbcf 100644 (file)
@@ -86,9 +86,7 @@ class NodePackageTagsInitTask extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-PACKAGE-TAGS-INIT-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 40040e0fe8bf0d073e4afe3b0acb2fca75ea46f5..dd548905788a333411121d05f7d1941265ea71bf 100644 (file)
@@ -82,9 +82,7 @@ class NodeUpdateCheckTask extends BaseTask implements Taskable, Visitable {
         * @todo        0% done
         */
        public function doShutdown () {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-UPDATE-CHECK-TASK: Shutting down...');
        }
-}
 
-// [EOF]
-?>
+}
index 011ee327188db9e5523dd5c97ecb9f34b3bbd1da..ab791df49bb4e80852de112945ba01a641b52a61 100644 (file)
@@ -241,31 +241,31 @@ class HubTools extends BaseHubSystem {
         */
        public static function determineOwnInternalAddress () {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: CALLED!');
 
                // Is the internal_address config entry set?
                if (FrameworkConfiguration::getSelfInstance()->getConfigEntry('allow_publish_internal_address') == 'N') {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: Calling self::determineOwnExternalAddress() as allow_publish_internal_address=N is set ...');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: Calling self::determineOwnExternalAddress() as allow_publish_internal_address=N is set ...');
 
                        // Not allowed to publish internal address, so use external
                        $unl = self::determineOwnExternalAddress();
                } elseif (FrameworkConfiguration::getSelfInstance()->getConfigEntry('internal_address') != '') {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: Getting config entry internal_address ...');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: Getting config entry internal_address ...');
 
                        // Use it as internal address
                        $unl = FrameworkConfiguration::getSelfInstance()->getConfigEntry('internal_address');
                } else {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: Calling self::determineInternalUniversalNodeLocator() ...');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: Calling self::determineInternalUniversalNodeLocator() ...');
 
                        // Determine own internal address
                        $unl = self::determineInternalUniversalNodeLocator();
                }
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: unl=' . $unl . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: unl=' . $unl . ' - EXIT!');
 
                // Return it
                return $unl;
@@ -278,7 +278,7 @@ class HubTools extends BaseHubSystem {
         */
        public static function determineInternalUniversalNodeLocator () {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: CALLED!');
 
                // Is there cache? (This shortens a lot calls)
                if (!isset($GLOBALS[__METHOD__])) {
@@ -295,7 +295,7 @@ class HubTools extends BaseHubSystem {
                } // END - if
 
                // Return it
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: unl=' . $GLOBALS[__METHOD__] . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: unl=' . $GLOBALS[__METHOD__] . ' - EXIT!');
                return $GLOBALS[__METHOD__];
        }
 
@@ -306,7 +306,7 @@ class HubTools extends BaseHubSystem {
         */
        public static function determineExternalUniversalNodeLocator () {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: CALLED!');
 
                // Is there cache? (This shortens a lot calls)
                if (!isset($GLOBALS[__METHOD__])) {
@@ -323,7 +323,7 @@ class HubTools extends BaseHubSystem {
                } // END - if
 
                // Return it
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: unl=' . $GLOBALS[__METHOD__] . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: unl=' . $GLOBALS[__METHOD__] . ' - EXIT!');
                return $GLOBALS[__METHOD__];
        }
 
index e6609bf146e7f04ddb9c0f02bfc30e11182f873b..38c50eb1820f4f8b57edff8831481687a726d229 100644 (file)
@@ -72,7 +72,7 @@ class RawDataPoolMonitorVisitor extends BaseVisitor implements PoolVisitor, List
         */
        public function visitPool (Poolable $poolInstance) {
                // A pool doesn't normally have any raw data waiting
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: poolInstance=' . $poolInstance->__toString() . ' - CALLED!');
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAWDATA-MONITOR-VISITOR: poolInstance=' . $poolInstance->__toString() . ' - CALLED!');
        }
 
        /**
@@ -87,7 +87,7 @@ class RawDataPoolMonitorVisitor extends BaseVisitor implements PoolVisitor, List
                 * traffic. This is why its method monitorIncomingRawData() is not
                 * called.
                 */
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: listenerInstance=' . $listenerInstance->__toString() . ' - CALLED!');
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAWDATA-MONITOR-VISITOR: listenerInstance=' . $listenerInstance->__toString() . ' - CALLED!');
        }
 
        /**
@@ -98,11 +98,9 @@ class RawDataPoolMonitorVisitor extends BaseVisitor implements PoolVisitor, List
         */
        public function visitDecorator (BaseDecorator $decoratorInstance) {
                // Do monitor here
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visiting ' . $listenerInstance->__toString() . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAWDATA-MONITOR-VISITOR: Visiting decoratorInstance=' . $decoratorInstance->__toString() . ' - CALLED!');
                $decoratorInstance->monitorIncomingRawData();
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visiting ' . $listenerInstance->__toString() . ' - FINISH');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAWDATA-MONITOR-VISITOR: Visiting decoratorInstance=' . $decoratorInstance->__toString() . ' - FINISH');
        }
-}
 
-// [EOF]
-?>
+}
index fab8b1bb5d7d50e9b63fe08832e873cff3a67e78..cd1802a17558f49a92f9bbbef0b6adb466ec3993 100644 (file)
@@ -67,13 +67,13 @@ class ShutdownListenerPoolVisitor extends BaseVisitor implements PoolVisitor {
         */
        public function visitPool (Poolable $poolInstance) {
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visit of ' . $poolInstance->__toString() . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SHUTDOWN-LISTENER-POOL-VISITOR: Visit of ' . $poolInstance->__toString() . ' - CALLED!');
 
                // Pre-shutdown the pool
                $poolInstance->preShutdown();
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visit of ' . $poolInstance->__toString() . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SHUTDOWN-LISTENER-POOL-VISITOR: Visit of ' . $poolInstance->__toString() . ' - EXIT!');
        }
 
        /**
@@ -84,13 +84,13 @@ class ShutdownListenerPoolVisitor extends BaseVisitor implements PoolVisitor {
         */
        public function visitDecorator (Listenable $decoratorInstance) {
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visit of ' . $decoratorInstance->__toString() . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SHUTDOWN-LISTENER-POOL-VISITOR: Visit of ' . $decoratorInstance->__toString() . ' - CALLED!');
 
                // Pre-shutdown the pool
                $decoratorInstance->doShutdown();
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visit of ' . $decoratorInstance->__toString() . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SHUTDOWN-LISTENER-POOL-VISITOR: Visit of ' . $decoratorInstance->__toString() . ' - EXIT!');
        }
 
        /**
@@ -101,13 +101,13 @@ class ShutdownListenerPoolVisitor extends BaseVisitor implements PoolVisitor {
         */
        public function visitListener (Listenable $listenerInstance) {
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visit of ' . $listenerInstance->__toString() . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SHUTDOWN-LISTENER-POOL-VISITOR: Visit of ' . $listenerInstance->__toString() . ' - CALLED!');
 
                // Pre-shutdown the pool
                $listenerInstance->doShutdown();
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visit of ' . $listenerInstance->__toString() . ' - EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SHUTDOWN-LISTENER-POOL-VISITOR: Visit of ' . $listenerInstance->__toString() . ' - EXIT!');
        }
 }
 
index 4ab5664c0585770431ace64983f37a8f6894f7c4..d615b6944ccc0c82479379cb53a7227d399220de 100644 (file)
@@ -72,9 +72,9 @@ class ActiveTaskVisitor extends BaseVisitor implements TaskVisitor, PoolVisitor,
         */
        public function visitTask (Taskable $taskInstance) {
                // Execute the task from this visitor
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visiting task ' . $taskInstance->__toString() . ' - CALLED!');
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('ACTIVE-TASK-VISITOR: Visiting task ' . $taskInstance->__toString() . ' - CALLED!');
                $taskInstance->executeTask();
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visiting task ' . $taskInstance->__toString() . ' - EXIT!');
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('ACTIVE-TASK-VISITOR: Visiting task ' . $taskInstance->__toString() . ' - EXIT!');
        }
 
        /**
@@ -99,9 +99,9 @@ class ActiveTaskVisitor extends BaseVisitor implements TaskVisitor, PoolVisitor,
         */
        public function visitListener (Listenable $listenerInstance) {
                // Do "listen" here
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visiting ' . $listenerInstance->__toString() . ' - CALLED!');
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('ACTIVE-TASK-VISITOR: Visiting listenerInstance=' . $listenerInstance->__toString() . ' - CALLED!');
                $listenerInstance->doListen();
-               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visiting ' . $listenerInstance->__toString() . ' - FINISH');
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('ACTIVE-TASK-VISITOR: Visiting listenerInstance=' . $listenerInstance->__toString() . ' - FINISH');
        }
 
        /**
index 391824b0e23bbcf2192f4e52a25bb2cc84d91338..ad4c2a7e205ca84e6f8b277a66a8abdae47a788e 100644 (file)
@@ -881,7 +881,7 @@ $cfg->setConfigEntry('peer_init_state_class', 'Hub\State\Peer\InitPeerState');
 $cfg->setConfigEntry('peer_connected_state_class', 'Hub\State\Peer\ConnectedPeerState');
 
 // CFG: PEER-PROBLEM-STATE-CLASS
-$cfg->setConfigEntry('peer_problem_state_class', 'Hub\State\Peer;\ProblemPeerState');
+$cfg->setConfigEntry('peer_problem_state_class', 'Hub\State\Peer\ProblemPeerState');
 
 // CFG: PEER-CONNECTION-REFUSED-STATE-CLASS
 $cfg->setConfigEntry('peer_connection_refused_state_class', 'Hub\State\Peer\ConnectionRefusedPeerState');
diff --git a/core b/core
index dc46df7fb4a0358cb7554c33b6f08d9ff8418c66..0a6b81dde16619b6d4466cca1ff8ad52226e9384 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit dc46df7fb4a0358cb7554c33b6f08d9ff8418c66
+Subproject commit 0a6b81dde16619b6d4466cca1ff8ad52226e9384