*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
* @license GNU GPL 3.0 or any newer version
* @link http://www.ship-simu.org
*
* @param $requestInstance An instance of a Requestable class
* @return $nodeInstance An instance of this hub-node class
*/
- public final static function createHubBootNode (Requestable $requestInstance) {
+ public static final function createHubBootNode (Requestable $requestInstance) {
// Get a new instance
$nodeInstance = new HubBootNode();
// Now check if the IP address matches one of the bootstrap nodes
if ($this->ifAddressMatchesBootstrappingNodes($this->getConfigInstance()->detectServerAddress())) {
// Get our port from configuration
- $ourPort = $this->getConfigInstance()->getConfigEntry('node_tcp_listen_port');
+ $ourPort = $this->getConfigInstance()->getConfigEntry('boot_node_tcp_listen_port');
// Extract port
$bootPort = substr($this->getBootIpPort(), -strlen($ourPort), strlen($ourPort));
// It is the same!
$this->debugOutput('BOOTSTRAP: IP/port matches bootstrapping node ' . $this->getBootIpPort() . '.');
- // Now, does the mode match (should be 'boot'!)
- if ($this->getRequestInstance()->getRequestElement('mode') == 'boot') {
+ // Now, does the mode match
+ if ($this->getRequestInstance()->getRequestElement('mode') == BaseHubNode::NODE_TYPE_BOOT) {
// Output debug message
$this->debugOutput('BOOTSTRAP: Our node is a valid bootstrapping node.');
} else {
// Output warning
- $this->debugOutput('BOOTSTRAP: WARNING: Mismatching mode ' . $this->getRequestInstance()->getRequestElement('mode') . '!=boot detected.');
+ $this->debugOutput('BOOTSTRAP: WARNING: Mismatching mode ' . $this->getRequestInstance()->getRequestElement('mode') . '!=' . BaseHubNode::NODE_TYPE_BOOT . ' detected.');
}
} else {
// IP does match, but no port
*
* @return void
*/
- public function addExtraHubFilters () {
+ public function addExtraNodeFilters () {
// Get the application instance from registry
$applicationInstance = Registry::getRegistry()->getInstance('app');
}
}
-//
+// [EOF]
?>