$excepts = [];
// Check if we have some peers left
- /* EXTREME-NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: Calling socket_select(%d,%d,%d,0%d) ...', strtoupper($this->getSocketProtocol()), count($readers), count($writers), count($excepts), self::$configEntries['socket_select_timeout']));
+ /* EXTREME-NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: Invoking socket_select(%d,%d,%d,0%d) ...', strtoupper($this->getSocketProtocol()), count($readers), count($writers), count($excepts), self::$configEntries['socket_select_timeout']));
$left = socket_select(
$readers,
$writers,
$dataSetInstance = $this->prepareLocalDataSetInstance();
// "Insert" this dataset instance completely into the database
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-FRONTEND: Calling this->queryInsertDataSet(' . $dataSetInstance->__toString() . ') ...');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-FRONTEND: Invoking this->queryInsertDataSet(' . $dataSetInstance->__toString() . ') ...');
$this->queryInsertDataSet($dataSetInstance);
// Debug message
*/
public function removeNonPublicDataFromArray(array $data) {
// Currently call only inner method
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-FRONTEND: Calling parent::removeNonPublicDataFromArray(data) ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-FRONTEND: Invoking parent::removeNonPublicDataFromArray(data) ...');
$data = parent::removeNonPublicDataFromArray($data);
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-FRONTEND: data[]=' . gettype($data));
*/
public function removeNonPublicDataFromArray(array $data) {
// Currently call only inner method
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-FRONTEND: Calling parent::removeNonPublicDataFromArray(data) ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-FRONTEND: Invoking parent::removeNonPublicDataFromArray(data) ...');
$data = parent::removeNonPublicDataFromArray($data);
// Return cleaned data
$discoveryInstance = PackageDiscoveryFactory::createPackageDiscoveryInstance();
// ... then disover all recipient (might be only one), this package may shall be forwarded
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('PACKAGE-DECODER: Calling discoveryInstance->discoverRawRecipients(%s) ...', $packageInstance->__toString()));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('PACKAGE-DECODER: Invoking discoveryInstance->discoverRawRecipients(%s) ...', $packageInstance->__toString()));
$discoveryInstance->discoverRawRecipients($packageInstance);
// Check for 'recipient' field (the 'sender' field and others are ignored here)
assert(is_array($entry));
// Remove any non-public data the database layer desires
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-DHT: Calling this->getFrontendInstance()->removeNonPublicDataFromArray(data) ...');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-DHT: Invoking this->getFrontendInstance()->removeNonPublicDataFromArray(data) ...');
$entry = $this->getFrontendInstance()->removeNonPublicDataFromArray($entry);
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-DHT: entry[]=' . gettype($entry));
$this->publishHelperInstance->getTemplateInstance()->assignMultipleVariables($entry);
// "Publish" the descriptor by sending it to the bootstrap/list nodes
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-DHT: Calling this->publishHelperInstance->sendPackage(' . $this->__toString() . ') ...');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-DHT: Invoking this->publishHelperInstance->sendPackage(' . $this->__toString() . ') ...');
$this->publishHelperInstance->sendPackage($this);
}
$helperInstance->getTemplateInstance()->compileConfigInVariables();
// "Publish" the descriptor by sending it to the bootstrap/list nodes
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NODE-DHT-FACADE: Calling helperInstance->sendPackage(%s) ...', $this->__toString()));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NODE-DHT-FACADE: Invoking helperInstance->sendPackage(%s) ...', $this->__toString()));
$helperInstance->sendPackage($this);
// Change state
));
// Try to solve it
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('RECIPIENT-DISCOVERY: Calling recipientInstance->resolveRecipientByPackageInstance(%s, %s) ...', $packageInstance->__toString(), $this->getListInstance()->__toString()));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('RECIPIENT-DISCOVERY: Invoking recipientInstance->resolveRecipientByPackageInstance(%s, %s) ...', $packageInstance->__toString(), $this->getListInstance()->__toString()));
$recipientInstance->resolveRecipientByPackageInstance($packageInstance, $this->getListInstance());
} catch (FrameworkException $e) {
// Could not find class, what ever failed
assert($listenerInstance instanceof Listenable);
// Trace message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('PACKAGE-SOCKET-DISCOVERY: Calling listenerInstance->ifListenerAcceptsPackageData(%s) ...', $packageInstance->__toString()));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('PACKAGE-SOCKET-DISCOVERY: Invoking listenerInstance->ifListenerAcceptsPackageData(%s) ...', $packageInstance->__toString()));
// Does the listener want that package?
if ($listenerInstance->ifListenerAcceptsPackageData($packageInstance)) {
$helperInstance->getTemplateInstance()->compileConfigInVariables();
// Deliver the package
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-DATA-HANDLER: Calling helperInstance->sendPackage(%s) ...', $nodeInstance->__toString()));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-DATA-HANDLER: Invoking helperInstance->sendPackage(%s) ...', $nodeInstance->__toString()));
$helperInstance->sendPackage($nodeInstance);
// Debug message
$helperInstance->getTemplateInstance()->compileConfigInVariables();
// Deliver the package
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NODE-DHT-FACADE: Calling helperInstance->sendPackage(%s) ...', $nodeInstance->__toString()));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NODE-DHT-FACADE: Invoking helperInstance->sendPackage(%s) ...', $nodeInstance->__toString()));
$helperInstance->sendPackage($nodeInstance);
// Debug message
* shall be delivered has already been added for all entries from the
* list.
*/
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-HANDLER: Calling discoveryInstance->clearRecipients() ...');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-HANDLER: Invoking discoveryInstance->clearRecipients() ...');
$discoveryInstance->clearRecipients();
// Trace message
$infoInstance = ConnectionInfoFactory::createConnectionInfoInstance($helperInstance->getProtocolName(), 'helper');
// Will the info instance with connection helper data
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-HANDLER: Calling infoInstance->fillWithConnectionHelperInformation(%s) ...', $helperInstance->__toString()));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-HANDLER: Invoking infoInstance->fillWithConnectionHelperInformation(%s) ...', $helperInstance->__toString()));
$infoInstance->fillWithConnectionHelperInformation($helperInstance);
// Is it not there?
}
// Make sure the connection is up
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-HANDLER: Calling helperInstance->stateInstance->validatePeerStateConnected() ...');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-HANDLER: Invoking helperInstance->stateInstance->validatePeerStateConnected() ...');
$helperInstance->getStateInstance()->validatePeerStateConnected();
// Enqueue it again on the out-going queue, the connection is up and working at this point
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-HANDLER: Calling this->stackInstance->pushNamed(%s, %s) ...', self::STACKER_NAME_OUTGOING, $packageInstance->__toString()));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-HANDLER: Invoking this->stackInstance->pushNamed(%s, %s) ...', self::STACKER_NAME_OUTGOING, $packageInstance->__toString()));
$this->getStackInstance()->pushNamed(self::STACKER_NAME_OUTGOING, $packageInstance);
// Trace message
$encodedDataArray[self::RAW_INDEX_SOCKET_INSTANCE] = NULL;
// And deliver it
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-HANDLER: Calling socketInstance->writeBufferToSocketByArray(%d,%d) ...', count($encodedDataArray), $sentBytes));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-HANDLER: Invoking socketInstance->writeBufferToSocketByArray(%d,%d) ...', count($encodedDataArray), $sentBytes));
if (!$socketInstance->writeBufferToSocketByArray($encodedDataArray, $sentBytes)) {
// Something bad happened while writing to socket
$socketInstance->handleSocketError(__METHOD__, __LINE__);
*/
public function isNewRawDataPending () {
// Visit the pool. This monitors the pool for incoming raw data.
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-HANDLER: Calling this->getListenerPoolInstance()->accept(%s) ... - CALLED!', $this->getVisitorInstance()));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-HANDLER: Invoking this->getListenerPoolInstance()->accept(%s) ... - CALLED!', $this->getVisitorInstance()));
$this->getListenerPoolInstance()->accept($this->getVisitorInstance());
// Check for new data arrival
*/
public function handleAssemblerPendingData () {
// Handle it
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-HANDLER: Calling this->getAssemblerInstance()->handlePendingData() ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-HANDLER: Invoking this->getAssemblerInstance()->handlePendingData() ...');
$this->getAssemblerInstance()->handlePendingData();
}
*/
public function handleMultipleMessages () {
// Handle it
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-HANDLER: Calling this->getAssemblerInstance()->handleMultipleMessages() ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-HANDLER: Invoking this->getAssemblerInstance()->handleMultipleMessages() ...');
$this->getAssemblerInstance()->handleMultipleMessages();
}
}
// Was some raw data been collected?
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-CONNECTION-HELPER: rawData()=%d - after loop ...', strlen($rawData)));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-CONNECTION-HELPER: rawData()=%d - after loop ...', gettype($rawData), strlen($rawData)));
if (empty($rawData)) {
// That should not happen
throw new LogicException('rawData should not be empty at this point.');
$bufferSize = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($this->getProtocolName() . '_buffer_length');
// Encode the raw data with our output-stream
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-CONNECTION-HELPER: bufferSize=%d, socketResource[%s]=%s', $bufferSize, gettype($this->getSocketInstance()->getSocketResource()), $this->getSocketInstance()->getSocketResource()));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-CONNECTION-HELPER: bufferSize=%d,rawData()=%d, socketResource[%s]=%s', $bufferSize, strlen($rawData), gettype($this->getSocketInstance()->getSocketResource()), $this->getSocketInstance()->getSocketResource()));
$encodedDataArray = [
NetworkPackageHandler::RAW_INDEX_FINAL_HASH => $this->currentFinalHash,
NetworkPackageHandler::RAW_INDEX_ENCODED_DATA => $this->getOutputStreamInstance()->streamData($rawData),
$handlerInstance = NetworkPackageHandlerFactory::createNetworkPackageHandlerInstance();
// Next, feed the content in. The network package class is a pipe-through class.
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-SELF-CONNECT-HELPER: Calling handlerInstance->enqueueRawDataFromTemplate(' . $this->__toString() . ') ...');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-SELF-CONNECT-HELPER: Invoking handlerInstance->enqueueRawDataFromTemplate(' . $this->__toString() . ') ...');
$handlerInstance->enqueueRawDataFromTemplate($this);
// Trace message
$socketPort = 0;
// Get peer name
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-INFO: Calling socketInstance->determineSocketPeerName(%s,%d) ...', $socketAddress, $socketPort));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-INFO: Invoking socketInstance->determineSocketPeerName(%s,%d) ...', $socketAddress, $socketPort));
if (!$socketInstance->determineSocketPeerName($socketAddress, $socketPort)) {
// Did not work
throw new InvalidSocketException(array($this, $socketInstance->getSocketResource()), self::EXCEPTION_INVALID_SOCKET);
}
// Will the info instance with listener data
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: Calling infoInstance->fillWithSocketPeerInformation(%s) ...', strtoupper($this->getProtocolName()), $socketInstance->__toString()));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: Invoking infoInstance->fillWithSocketPeerInformation(%s) ...', strtoupper($this->getProtocolName()), $socketInstance->__toString()));
$infoInstance->fillWithSocketPeerInformation($socketInstance);
// Init peer address/port
$this->getRegistryInstance()->registerSocketInstance($infoInstance, $socketInstance);
// Invoke private method
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: Calling this->handleIncomingSocket(%s) ...', strtoupper($this->getProtocolName()), $socketInstance->__toString()));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: Invoking this->handleIncomingSocket(%s) ...', strtoupper($this->getProtocolName()), $socketInstance->__toString()));
$this->handleIncomingSocket($socketInstance);
// Trace message
*/
public final function getListenAddress () {
// Trace message
- //* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getProtocolName()) . '-LISTENER-DECORATOR: Calling this->getListenerInstance()->getListenAddress() ...');
+ //* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getProtocolName()) . '-LISTENER-DECORATOR: Invoking this->getListenerInstance()->getListenAddress() ...');
return $this->getListenerInstance()->getListenAddress();
}
*/
public final function getListenPort () {
// Trace message
- //* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getProtocolName()) . '-LISTENER-DECORATOR: Calling this->getListenerInstance()->getListenPort() ...');
+ //* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getProtocolName()) . '-LISTENER-DECORATOR: Invoking this->getListenerInstance()->getListenPort() ...');
return $this->getListenerInstance()->getListenPort();
}
$visitorInstance->visitDecorator($this);
// Trace message
- //* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER-DECORATOR: Calling visitorInstance->visitListener(%s) ...', strtoupper($this->getProtocolName()), $this->getListenerInstance()->__toString()));
+ //* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER-DECORATOR: Invoking visitorInstance->visitListener(%s) ...', strtoupper($this->getProtocolName()), $this->getListenerInstance()->__toString()));
// Visit the covered class
$visitorInstance->visitListener($this->getListenerInstance());
*/
public function doListen() {
// Trace message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER: Calling this->doListenSocketSelect() ... - CALLED!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER: Invoking this->doListenSocketSelect() ... - CALLED!');
// Call super method
$this->doListenSocketSelect('');
*/
public function doListen () {
// Trace message
- /* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER: Calling this->getListenerInstance()->doListen() ...');
+ /* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER: Invoking this->getListenerInstance()->doListen() ...');
// Handle generic TCP package
$this->getListenerInstance()->doListen();
*/
public function ifListenerAcceptsPackageData (DeliverablePackage $packageInstance) {
// Debug message
- /* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER: Calling this->getListenerInstance()->ifListenerAcceptsPackageData() ...');
+ /* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER: Invoking this->getListenerInstance()->ifListenerAcceptsPackageData() ...');
// Call inner method, no decoration is wanted in this method
return $this->getListenerInstance()->ifListenerAcceptsPackageData($packageInstance);
*/
public function doListen () {
// Trace message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-LISTENER: Calling this->doListenSocketSelect() ... - CALLED!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-LISTENER: Invoking this->doListenSocketSelect() ... - CALLED!');
// Call super method
$this->doListenSocketSelect();
*/
public function doListen () {
// Trace message
- /* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CLIENT-TCP-LISTENER: Calling this->getListenerInstance() ...');
+ /* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CLIENT-TCP-LISTENER: Invoking this->getListenerInstance() ...');
// Handle generic TCP package
$this->getListenerInstance()->doListen();
*/
public function doListen () {
// Trace message
- /* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HUB-TCP-LISTENER: Calling this->getListenerInstance() ...');
+ /* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HUB-TCP-LISTENER: Invoking this->getListenerInstance() ...');
// Handle generic TCP package
$this->getListenerInstance()->doListen();
*/
public function doListen () {
// Trace message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('UDP-LISTENER: Calling this->doListenSocketSelect() ... - CALLED!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('UDP-LISTENER: Invoking this->doListenSocketSelect() ... - CALLED!');
// Call super method
$this->doListenSocketSelect();
*/
public function doListen () {
// Trace message
- /* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CLIENT-UDP-LISTENER: Calling this->getListenerInstance() ...');
+ /* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CLIENT-UDP-LISTENER: Invoking this->getListenerInstance() ...');
// Handle generic UDP packages first
$this->getListenerInstance()->doListen();
*/
public function doListen () {
// Trace message
- /* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HUB-UDP-LISTENER: Calling this->getListenerInstance() ...');
+ /* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HUB-UDP-LISTENER: Invoking this->getListenerInstance() ...');
// Handle generic UDP package first
$this->getListenerInstance()->doListen();
* "tables". This allows a smooth update for the underlaying
* database table.
*/
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-HUB-NODE: Calling this->generatePrivateKeyAndHash(%s) ...', $this->getSearchInstance()->__toString()));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-HUB-NODE: Invoking this->generatePrivateKeyAndHash(%s) ...', $this->getSearchInstance()->__toString()));
$this->generatePrivateKeyAndHash($this->getSearchInstance());
} else {
// Get the node id from result and set it
$helperInstance->getTemplateInstance()->compileConfigInVariables();
// "Publish" the descriptor by sending it to the bootstrap/list nodes
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-HUB-NODE: Calling helperInstance->sendPackage(%s) ...', $this->__toString()));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-HUB-NODE: Invoking helperInstance->sendPackage(%s) ...', $this->__toString()));
$helperInstance->sendPackage($this);
// Change the state, this should be the last line except debug output
$helperInstance->getTemplateInstance()->compileConfigInVariables();
// And send the package away
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-HUB-NODE: Calling helperInstance->sendPackage(%s) ...', $this->__toString()));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-HUB-NODE: Invoking helperInstance->sendPackage(%s) ...', $this->__toString()));
$helperInstance->sendPackage($this);
// Debug output
}
// Add it to the list
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('DHT-RECIPIENT: Calling listInstance->addEntry(%s) ...', $recipient[NodeDistributedHashTableDatabaseFrontend::DB_COLUMN_EXTERNAL_ADDRESS]));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('DHT-RECIPIENT: Invoking listInstance->addEntry(%s) ...', $recipient[NodeDistributedHashTableDatabaseFrontend::DB_COLUMN_EXTERNAL_ADDRESS]));
$listInstance->addEntry('unl', $recipient[NodeDistributedHashTableDatabaseFrontend::DB_COLUMN_EXTERNAL_ADDRESS]);
}
$infoInstance = ConnectionInfoFactory::createConnectionInfoInstance($listenerInstance->getProtocolName(), 'helper');
// Fill info instance with listener data
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SOCKET-REGISTRY: key=%s,subKey=%s: Calling infoInstance->fillWithListenerInformation(%s) ...', $key, $subKey, $listenerInstance->__toString()));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SOCKET-REGISTRY: key=%s,subKey=%s: Invoking infoInstance->fillWithListenerInformation(%s) ...', $key, $subKey, $listenerInstance->__toString()));
$infoInstance->fillWithListenerInformation($listenerInstance);
} elseif ($helperInstance instanceof ConnectionHelper) {
// Found a helper, so get the info instance first
$infoInstance = ConnectionInfoFactory::createConnectionInfoInstance($helperInstance->getProtocolName(), 'helper');
// Helper is found
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SOCKET-REGISTRY: key=%s,subKey=%s: Calling infoInstance->fillWithHelperInformation(%s) ...', $key, $subKey, $helperInstance->__toString()));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SOCKET-REGISTRY: key=%s,subKey=%s: Invoking infoInstance->fillWithHelperInformation(%s) ...', $key, $subKey, $helperInstance->__toString()));
$infoInstance->fillWithConnectionHelperInformation($helperInstance);
} else {
// Not supported state!
* A CSV file has been found and "imported" (added to stack). Now
* the file can be read line by line and checked every one of it.
*/
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-UPLOADED-LIST-URL-SOURCE: Calling this->parseCsvEntry() ...');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-UPLOADED-LIST-URL-SOURCE: Invoking this->parseCsvEntry() ...');
$this->parseCsvEntry();
} elseif ($this->isCsvFileAdded()) {
/*
* A CSV file has been found and "imported" (added to stack). Now
* the file can be read line by line and checked every one of it.
*/
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-UPLOADED-LIST-URL-SOURCE: Calling this->parseCsvFile() ...');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-UPLOADED-LIST-URL-SOURCE: Invoking this->parseCsvFile() ...');
$this->parseCsvFile();
} elseif ($this->isCsvFileFound() && !$this->isLastCsvFileImported()) {
/*
* CSV-like as you may wish to provide meta data such as crawl
* depth, handling of 3rd-party URLs and such.
*/
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-UPLOADED-LIST-URL-SOURCE: Calling this->addCsvFile() ...');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-UPLOADED-LIST-URL-SOURCE: Invoking this->addCsvFile() ...');
$this->addCsvFile();
}
}
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MINER-STATE: Calling prepareBlockProduction() on ' . $executorInstance->__toString() . ' ...');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('MINER-STATE: Invoking executorInstance->prepareBlockProduction(%s) ...', $executorInstance->__toString()));
// Now prepare the unit production to maybe become 'virgin' or 'active' if work/test units are there
$executorInstance->prepareBlockProduction($this);
* "interpreted". This is done by trying to find a configuration
* entry based on 'message_type' element.
*/
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling handlerInstance->handleProcessedMessage() ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Invoking handlerInstance->handleProcessedMessage() ...');
$handlerInstance->handleProcessedMessage();
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: After handlerInstance->handleProcessedMessage() ...');
} elseif ($handlerInstance->isDecodedPackageXmlPending()) {
* A fully "decoded" package has arrived. This is raw XML and needs
* to be parsed to a message.
*/
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling handlerInstance->handleDecodedPackageXml() ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Invoking handlerInstance->handleDecodedPackageXml() ...');
$handlerInstance->handleDecodedPackageXml();
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: After handlerInstance->handleDecodedPackageXml() ...');
} elseif ($handlerInstance->isNewMessageArrived()) {
* as "XML variables" from the content (which must be a well-formed
* XML) and then pushing it on the next stack "processed messages".
*/
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling handlerInstance->handleNewlyArrivedMessage() ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Invoking handlerInstance->handleNewlyArrivedMessage() ...');
$handlerInstance->handleNewlyArrivedMessage();
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: After handlerInstance->handleNewlyArrivedMessage() ...');
} elseif ($handlerInstance->isIncomingRawDataHandled()) {
* PackageData for further details (what array elements are
* required et cetera).
*/
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling handlerInstance->assembleDecodedDataToPackage() ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Invoking handlerInstance->assembleDecodedDataToPackage() ...');
$handlerInstance->assembleDecodedDataToPackage();
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: After handlerInstance->assembleDecodedDataToPackage() ...');
} elseif ($handlerInstance->ifMultipleMessagesPending()) {
* Some raw data contained multiple messages which where now
* splitted.
*/
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling handlerInstance->handleMultipleMessages() ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Invoking handlerInstance->handleMultipleMessages() ...');
$handlerInstance->handleMultipleMessages();
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: After handlerInstance->handleMultipleMessages() ...');
} elseif ($handlerInstance->isNewRawDataPending()) {
// Raw, decoded data has been received
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling handlerInstance->handleIncomingDecodedData() ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Invoking handlerInstance->handleIncomingDecodedData() ...');
$handlerInstance->handleIncomingDecodedData();
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: After handlerInstance->handleIncomingDecodedData() ...');
} elseif ($handlerInstance->ifAssemblerHasPendingDataLeft()) {
// Handle any pending data from the package assembler
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling handlerInstance->handleAssemblerPendingData() ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Invoking handlerInstance->handleAssemblerPendingData() ...');
$handlerInstance->handleAssemblerPendingData();
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: After handlerInstance->handleAssemblerPendingData() ...');
}
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-WRITER-TASK: handlerInstance=%s', $handlerInstance->__toString()));
if ($handlerInstance->isEncodedDataPending()) {
// Sent encoded (raw) data
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Calling handlerInstance->sendEncodedData() ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Invoking handlerInstance->sendEncodedData() ...');
$handlerInstance->sendEncodedData();
} elseif ($handlerInstance->isPackageWaitingForDelivery()) {
// Sent it finally out
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Calling handlerInstance->sendWaitingPackage() ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Invoking handlerInstance->sendWaitingPackage() ...');
$handlerInstance->sendWaitingPackage();
} elseif ($handlerInstance->isPackageDeclared()) {
// Prepare package for delivery
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Calling handlerInstance->processDeclaredPackage() ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Invoking handlerInstance->processDeclaredPackage() ...');
$handlerInstance->processDeclaredPackage();
} elseif ($handlerInstance->isPackageEnqueued()) {
// Okay, then deliver (better discover its recipients) this package
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Calling handlerInstance->declareEnqueuedPackage() ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Invoking handlerInstance->declareEnqueuedPackage() ...');
$handlerInstance->declareEnqueuedPackage();
}
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NODE-PACKAGE-DECODER-TASK: decoderInstance=%s', $decoderInstance->__toString()));
if ($decoderInstance->ifDeocedPackagesLeft()) {
// Some decoded packages have arrived (for this node)
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-PACKAGE-DECODER-TASK: Calling decoderInstance->handleDecodedPackage() ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-PACKAGE-DECODER-TASK: Invoking decoderInstance->handleDecodedPackage() ...');
$decoderInstance->handleDecodedPackage();
} elseif ($decoderInstance->ifUnhandledRawPackageDataLeft()) {
// Handle raw data as last option to prevent that the stack runs full
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-PACKAGE-DECODER-TASK: Calling decoderInstance->handleRawPackageData() ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-PACKAGE-DECODER-TASK: Invoking decoderInstance->handleRawPackageData() ...');
$decoderInstance->handleRawPackageData();
}
self::$cachedAddresses['external'] = $unl;
} else {
// Determine own external address by connecting to home server at 188.138.90.169
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HUB-TOOLS: Calling self::determineExternalUniversalNodeLocator() ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HUB-TOOLS: Invoking self::determineExternalUniversalNodeLocator() ...');
$unl = self::determineExternalUniversalNodeLocator();
self::$cachedAddresses['external'] = $unl;
}
$unl = self::$cachedAddresses['internal'];
} elseif (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('allow_publish_internal_address') == 'N') {
// Not allowed to publish internal address, so use external
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HUB-TOOLS: Calling self::determineOwnExternalAddress() as allow_publish_internal_address=N is set ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HUB-TOOLS: Invoking self::determineOwnExternalAddress() as allow_publish_internal_address=N is set ...');
$unl = self::determineOwnExternalAddress();
self::$cachedAddresses['internal'] = $unl;
} elseif (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('internal_address') != '') {
self::$cachedAddresses['internal'] = $unl;
} else {
// Determine own internal address
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HUB-TOOLS: Calling self::determineInternalUniversalNodeLocator() ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HUB-TOOLS: Invoking self::determineInternalUniversalNodeLocator() ...');
$unl = self::determineInternalUniversalNodeLocator();
self::$cachedAddresses['internal'] = $unl;
}