// Try to bootstrap the node and pass the request instance to it for
// extra arguments which mostly override config entries or enable special
// features within the hub (none is ready at this development stage)
- $this->getDebugInstance()->output('BOOTSTRAP: Beginning with bootstrap...');
+ $this->debugOutput('BOOTSTRAP: Beginning with bootstrap...');
$nodeInstance->doBootstrapping();
- $this->getDebugInstance()->output('BOOTSTRAP: Bootstrap finished.');
+ $this->debugOutput('BOOTSTRAP: Bootstrap finished.');
// ----------------------- Init all query queues ----------------------
// After the bootstrap is done we need to initialize the queues which
$this->setPoolInstance($poolInstance);
// Output message
- $this->getDebugInstance()->output('LISTENER: TCP listener now ready on IP ' . $this->getListenAddress() . ', port ' . $this->getListenPort() . ' for service.');
+ $this->debugOutput('LISTENER: TCP listener now ready on IP ' . $this->getListenAddress() . ', port ' . $this->getListenPort() . ' for service.');
}
}
$this->setSocketResource($socket);
// Output message
- $this->getDebugInstance()->output('LISTENER: UDP listener now ready on IP ' . $this->getListenAddress() . ', port ' . $this->getListenPort() . ' for service.');
+ $this->debugOutput('LISTENER: UDP listener now ready on IP ' . $this->getListenAddress() . ', port ' . $this->getListenPort() . ' for service.');
}
}
// Is the port the same?
if ($bootPort == $ourPort) {
// It is the same!
- $this->getDebugInstance()->output('BOOTSTRAP: IP/port matches bootstrapping node ' . $this->getBootIpPort() . '.');
+ $this->debugOutput('BOOTSTRAP: IP/port matches bootstrapping node ' . $this->getBootIpPort() . '.');
// Now, does the mode match (should be 'boot'!)
if ($this->getRequestInstance()->getRequestElement('mode') == 'boot') {
// Output debug message
- $this->getDebugInstance()->output('BOOTSTRAP: Our node is a valid bootstrapping node.');
+ $this->debugOutput('BOOTSTRAP: Our node is a valid bootstrapping node.');
} else {
// Output warning
- $this->getDebugInstance()->output('BOOTSTRAP: WARNING: Mismatching mode ' . $this->getRequestInstance()->getRequestElement('mode') . '!=boot detected.');
+ $this->debugOutput('BOOTSTRAP: WARNING: Mismatching mode ' . $this->getRequestInstance()->getRequestElement('mode') . '!=boot detected.');
}
} else {
// IP does match, but no port
- $this->getDebugInstance()->output('BOOTSTRAP: WARNING: Our IP ' . $_SERVER['SERVER_ADDR'] . ' does match a known bootstrap-node but not the port ' . $ourPort . '/' . $bootPort . '.');
+ $this->debugOutput('BOOTSTRAP: WARNING: Our IP ' . $_SERVER['SERVER_ADDR'] . ' does match a known bootstrap-node but not the port ' . $ourPort . '/' . $bootPort . '.');
}
} else {
// Node does not match any know bootstrap-node
- $this->getDebugInstance()->output('BOOTSTRAP: WARNING: Our IP ' . $_SERVER['SERVER_ADDR'] . ' does not match any known bootstrap-nodes.');
+ $this->debugOutput('BOOTSTRAP: WARNING: Our IP ' . $_SERVER['SERVER_ADDR'] . ' does not match any known bootstrap-nodes.');
}
// This might not be all...
$this->bootIpPort = $ipPort;
// Output message
- $this->getDebugInstance()->output('BOOTSTRAP: ' . __FUNCTION__ . '[' . __LINE__ . ']: IP matches remote address ' . $ipPort . '.');
+ $this->debugOutput('BOOTSTRAP: ' . __FUNCTION__ . '[' . __LINE__ . ']: IP matches remote address ' . $ipPort . '.');
// Stop further searching
break;
$this->bootIpPort = $ipPort;
// Output message
- $this->getDebugInstance()->output('BOOTSTRAP: ' . __FUNCTION__ . '[' . __LINE__ . ']: IP matches listen address ' . $ipPort . '.');
+ $this->debugOutput('BOOTSTRAP: ' . __FUNCTION__ . '[' . __LINE__ . ']: IP matches listen address ' . $ipPort . '.');
// Stop further searching
break;
$app = $this->getApplicationInstance();
// Output all lines
- $this->getDebugInstance()->output(' ');
- $this->getDebugInstance()->output($app->getAppName() . ' v' . $app->getAppVersion() . ' - ' . $this->getRequestInstance()->getRequestElement('mode') . ' mode active');
- $this->getDebugInstance()->output('Copyright (c) 2007 - 2008 Roland Haeder, 2009 Hub Developer Team');
- $this->getDebugInstance()->output(' ');
- $this->getDebugInstance()->output('This program comes with ABSOLUTELY NO WARRANTY; for details see docs/COPYING.');
- $this->getDebugInstance()->output('This is free software, and you are welcome to redistribute it under certain');
- $this->getDebugInstance()->output('conditions; see docs/COPYING for details.');
- $this->getDebugInstance()->output(' ');
+ $this->debugOutput(' ');
+ $this->debugOutput($app->getAppName() . ' v' . $app->getAppVersion() . ' - ' . $this->getRequestInstance()->getRequestElement('mode') . ' mode active');
+ $this->debugOutput('Copyright (c) 2007 - 2008 Roland Haeder, 2009 Hub Developer Team');
+ $this->debugOutput(' ');
+ $this->debugOutput('This program comes with ABSOLUTELY NO WARRANTY; for details see docs/COPYING.');
+ $this->debugOutput('This is free software, and you are welcome to redistribute it under certain');
+ $this->debugOutput('conditions; see docs/COPYING for details.');
+ $this->debugOutput(' ');
}
/**
$this->setNodeId($this->getField(NodeInformationDatabaseWrapper::DB_COLUMN_NODE_ID));
// Output message
- $this->getDebugInstance()->output('BOOTSTRAP: Re-using found node-id: ' . $this->getNodeId() . '');
+ $this->debugOutput('BOOTSTRAP: Re-using found node-id: ' . $this->getNodeId() . '');
} else {
// Get an RNG instance (Random Number Generator)
$rngInstance = ObjectFactory::createObjectByConfiguredName('rng_class');
$wrapperInstance->registerNodeId($this, $this->getRequestInstance());
// Output message
- $this->getDebugInstance()->output('BOOTSTRAP: Created new node-id: ' . $this->getNodeId() . '');
+ $this->debugOutput('BOOTSTRAP: Created new node-id: ' . $this->getNodeId() . '');
}
}
$listenerInstance->setNodeInstance($nodeInstance);
// This is the last line before the return statement to output some debug output
- $listenerInstance->getDebugInstance()->output('POOL: ' . __CLASS__ . ': Initialization finished.');
+ $listenerInstance->debugOutput('POOL: ' . __CLASS__ . ': Initialization finished.');
// Return the prepared instance
return $listenerInstance;
parent::addInstance($listenerInstance->getProtocol(), 'listener', $listenerInstance);
// Debug message
- $this->getDebugInstance()->output(
+ $this->debugOutput(
'POOL: Listener ' . $listenerInstance->__toString() .
' listening to ' . $listenerInstance->getListenAddress() . ':' .
$listenerInstance->getListenPort() . ' added to listener pool.'