application/hub/interfaces/handler/task/class_HandleableTask.php svneol=native#text/plain
application/hub/interfaces/helper/.htaccess -text svneol=unset#text/plain
application/hub/interfaces/helper/connections/.htaccess -text
+application/hub/interfaces/helper/dht/.htaccess -text svneol=unset#text/plain
+application/hub/interfaces/helper/dht/class_HelpableDht.php svneol=native#text/plain
application/hub/interfaces/helper/hub/.htaccess -text svneol=unset#text/plain
application/hub/interfaces/helper/hub/class_HelpableHub.php svneol=native#text/plain
application/hub/interfaces/helper/messages/.htaccess svneol=native#text/plain
application/hub/interfaces/helper/messages/class_MessageHelper.php svneol=native#text/plain
+application/hub/interfaces/helper/node/.htaccess -text svneol=unset#text/plain
+application/hub/interfaces/helper/node/class_HelpableNode.php svneol=native#text/plain
application/hub/interfaces/helper/nodes/.htaccess -text svneol=unset#text/plain
application/hub/interfaces/helper/nodes/class_NodeHelper.php svneol=native#text/plain
application/hub/interfaces/listener/.htaccess -text svneol=unset#text/plain
application/hub/main/handler/tasks/.htaccess -text svneol=unset#text/plain
application/hub/main/handler/tasks/class_TaskHandler.php svneol=native#text/plain
application/hub/main/helper/.htaccess -text svneol=unset#text/plain
+application/hub/main/helper/class_ svneol=native#text/plain
+application/hub/main/helper/class_BaseHubSystemHelper.php svneol=native#text/plain
application/hub/main/helper/connection/.htaccess -text svneol=unset#text/plain
application/hub/main/helper/connection/class_BaseConnectionHelper.php svneol=native#text/plain
application/hub/main/helper/connection/tcp/.htaccess -text svneol=unset#text/plain
application/hub/main/helper/connection/tcp/class_TcpConnectionHelper.php svneol=native#text/plain
application/hub/main/helper/connection/udp/.htaccess -text svneol=unset#text/plain
application/hub/main/helper/connection/udp/class_UdpConnectionHelper.php svneol=native#text/plain
+application/hub/main/helper/dht/.htaccess -text svneol=unset#text/plain
+application/hub/main/helper/dht/class_DhtBootstrapHelper.php svneol=native#text/plain
application/hub/main/helper/hub/.htaccess -text svneol=unset#text/plain
application/hub/main/helper/hub/announcement/.htaccess -text svneol=unset#text/plain
application/hub/main/helper/hub/announcement/class_HubAnnouncementHelper.php svneol=native#text/plain
application/hub/main/helper/messages/class_BaseMessageHelper.php svneol=native#text/plain
application/hub/main/helper/messages/crypto/.htaccess svneol=native#text/plain
application/hub/main/helper/messages/crypto/class_CryptoRandomUnitMessageHelper.php svneol=native#text/plain
+application/hub/main/helper/node/.htaccess -text svneol=unset#text/plain
+application/hub/main/helper/node/announcement/.htaccess -text svneol=unset#text/plain
+application/hub/main/helper/node/announcement/class_NodeAnnouncementHelper.php svneol=native#text/plain
+application/hub/main/helper/node/answer/.htaccess -text svneol=unset#text/plain
+application/hub/main/helper/node/answer/announcement/.htaccess -text svneol=unset#text/plain
+application/hub/main/helper/node/answer/announcement/class_NodeAnnouncementMessageAnswerHelper.php svneol=native#text/plain
+application/hub/main/helper/node/answer/class_BaseHubAnswerHelper.php svneol=native#text/plain
+application/hub/main/helper/node/answer/requests/.htaccess -text svneol=unset#text/plain
+application/hub/main/helper/node/answer/requests/class_NodeRequestNodeListMessageAnswerHelper.php svneol=native#text/plain
+application/hub/main/helper/node/class_ svneol=native#text/plain
+application/hub/main/helper/node/class_BaseNodeHelper.php svneol=native#text/plain
+application/hub/main/helper/node/connection/.htaccess -text svneol=unset#text/plain
+application/hub/main/helper/node/connection/class_NodeSelfConnectHelper.php svneol=native#text/plain
+application/hub/main/helper/node/requests/.htaccess -text svneol=unset#text/plain
+application/hub/main/helper/node/requests/class_NodeRequestNodeListHelper.php svneol=native#text/plain
application/hub/main/helper/work_units/.htaccess svneol=native#text/plain
application/hub/main/helper/work_units/class_BaseWorkUnitHelper.php svneol=native#text/plain
application/hub/main/helper/work_units/cruncher/.htaccess svneol=native#text/plain
application/hub/main/template/answer/.htaccess -text svneol=unset#text/plain
application/hub/main/template/answer/announcement/.htaccess -text svneol=unset#text/plain
application/hub/main/template/answer/requests/.htaccess -text svneol=unset#text/plain
+application/hub/main/template/bootstrap/.htaccess -text svneol=unset#text/plain
+application/hub/main/template/bootstrap/class_XmlBootstrapTemplateEngine.php svneol=native#text/plain
application/hub/main/template/connect/.htaccess -text svneol=unset#text/plain
application/hub/main/template/connect/class_XmlSelfConnectTemplateEngine.php svneol=native#text/plain
application/hub/main/template/entries/.htaccess -text svneol=unset#text/plain
$cfg->setConfigEntry('list_group_class', 'ListGroupList');
// CFG: NODE-ANNOUNCEMENT-HELPER-CLASS
-$cfg->setConfigEntry('node_announcement_helper_class', 'HubAnnouncementHelper');
+$cfg->setConfigEntry('node_announcement_helper_class', 'NodeAnnouncementHelper');
// CFG: NODE-SELF-CONNECT-HELPER-CLASS
-$cfg->setConfigEntry('node_self_connect_helper_class', 'HubSelfConnectHelper');
+$cfg->setConfigEntry('node_self_connect_helper_class', 'NodeSelfConnectHelper');
+
+// CFG: DHT-BOOTSTRAP-HELPER-CLASS
+$cfg->setConfigEntry('dht_bootstrap_helper_class', 'DhtBootstrapHelper');
// CFG: DEFAULT-CONSOLE-COMMAND
$cfg->setConfigEntry('default_console_command', 'main');
// CFG: NODE-REQUEST-NODE-LIST-ENTRIES-TEMPLATE-CLASS
$cfg->setConfigEntry('node_request_node_list_entries_template_class', 'XmlRequestNodeListEntryTemplateEngine');
+// CFG: DHT-BOOTSTRAP-TEMPLATE-CLASS
+$cfg->setConfigEntry('dht_bootstrap_template_class', 'XmlBootstrapTemplateEngine');
+
// CFG: NODE-MESSAGE-TEMPLATE-EXTENSION
$cfg->setConfigEntry('node_message_template_extension', '.xml');
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * An interface for hub helper classes
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+interface HelpableDht extends Helper {
+ /**
+ * Loads the descriptor XML file
+ *
+ * @return void
+ */
+ function loadDescriptorXml ();
+
+ /**
+ * Send a package out
+ *
+ * @param $dhtInstance An instance of a Distributable class
+ * @return void
+ */
+ function sendPackage (Distributable $dhtInstance);
+}
+
+// [EOF]
+?>
<?php
-/**
- * An interface for hub helper classes
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-interface HelpableHub extends Helper {
- /**
- * Loads the descriptor XML file
- *
- * @param $nodeInstance An instance of a NodeHelper class
- * @return void
- */
- function loadDescriptorXml (NodeHelper $nodeInstance);
-
- /**
- * Send a package out
- *
- * @param $nodeInstance An instance of a NodeHelper class
- * @return void
- */
- function sendPackage (NodeHelper $nodeInstance);
-}
-
-// [EOF]
+// @DEPRECATED
?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * An interface for hub helper classes
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+interface HelpableNode extends Helper {
+ /**
+ * Loads the descriptor XML file
+ *
+ * @param $nodeInstance An instance of a NodeHelper class
+ * @return void
+ */
+ function loadDescriptorXml (NodeHelper $nodeInstance);
+
+ /**
+ * Send a package out
+ *
+ * @param $nodeInstance An instance of a NodeHelper class
+ * @return void
+ */
+ function sendPackage (NodeHelper $nodeInstance);
+}
+
+// [EOF]
+?>
* from given helper's template instance and pushing it on the 'undeclared'
* stack.
*
- * @param $helperInstance An instance of a HelpableHub class
+ * @param $helperInstance An instance of a HelpableNode class
* @param $protocol Name of used protocol (TCP/UDP)
* @return void
*/
- function enqueueRawDataFromTemplate (HelpableHub $helperInstance, $protocol);
+ function enqueueRawDataFromTemplate (HelpableNode $helperInstance, $protocol);
/**
* Checks whether a package has been enqueued for delivery.
--- /dev/null
+<?php
+/**
+ * A ??? !!! helper class
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ * @todo Find an interface for hub helper
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class !!!???Helper extends BaseHubSystemHelper implements Helpable!!! {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+
+ // Set recipient type
+ $this->setRecipientType(NetworkPackage::NETWORK_TARGET_!!!);
+
+ // Set package tags
+ $this->setPackageTags(array('???'));
+ }
+
+ /**
+ * Creates the helper class
+ *
+ * @return $helperInstance A prepared instance of this helper
+ */
+ public final static function create!!!???Helper () {
+ // Get new instance
+ $helperInstance = new !!!???Helper();
+
+ // Return the prepared instance
+ return $helperInstance;
+ }
+
+ /**
+ * Loads the descriptor XML file
+ *
+ * @return void
+ */
+ public function loadDescriptorXml () {
+ $this->partialStub('Please implement this method.');
+ }
+
+ /**
+ * Do the helped attempt by delivering a package to ourselfs
+ *
+ * @param $|||Instance An instance of a !!!Helper class
+ * @return void
+ */
+ public function sendPackage (!!!Helper $|||Instance) {
+ // Sanity check: Is the ||| in the approx. state? (///)
+ $|||Instance->getStateInstance()->validate!!!StateIs+++();
+
+ // Compile the template, this inserts the loaded ||| data into the gaps.
+ $this->getTemplateInstance()->compileTemplate();
+
+ // Get a singleton network package instance
+ $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
+
+ // Next, feed the content in. The network package class is a pipe-through class.
+ $packageInstance->enqueueRawDataFromTemplate($this, NetworkPackage::PROTOCOL_TCP);
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A general hub helper class. This class does not extend BaseHelper.
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class BaseHubSystemHelper extends BaseHubSystem {
+ /**
+ * Recipient type
+ */
+ private $recipientType = 'invalid';
+
+ /**
+ * Package tags
+ */
+ private $packageTags = array();
+
+ /**
+ * Protected constructor
+ *
+ * @param $className Name of the concrete class
+ * @return void
+ */
+ protected function __construct ($className) {
+ // Call parent constructor
+ parent::__construct($className);
+ }
+
+ /**
+ * Setter for recipient type
+ *
+ * @return $recipientType Type of a recipient (the helper is made for)
+ */
+ protected final function setRecipientType ($recipientType) {
+ $this->recipientType = $recipientType;
+ }
+
+ /**
+ * Getter for recipient type
+ *
+ * @return $recipientType Type of a recipient (the helper is made for)
+ */
+ public final function getRecipientType () {
+ return $this->recipientType;
+ }
+
+ /**
+ * Getter for package tags in a simple array
+ *
+ * @return $packageTags An array with all tags for the currently handled package
+ */
+ public final function getPackageTags () {
+ return $this->packageTags;
+ }
+
+ /**
+ * Setter for package tags in a simple array
+ *
+ * @param $packageTags An array with all tags for the currently handled package
+ * @return void
+ */
+ public final function setPackageTags (array $packageTags) {
+ $this->packageTags = $packageTags;
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A Bootstrap Dht helper class
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ * @todo Find an interface for hub helper
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class DhtBootstrapHelper extends BaseHubSystemHelper implements HelpableDht {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+
+ // Set recipient type
+ $this->setRecipientType(NetworkPackage::NETWORK_TARGET_DHT);
+ }
+
+ /**
+ * Creates the helper class
+ *
+ * @return $helperInstance A prepared instance of this helper
+ */
+ public final static function createDhtBootstrapHelper () {
+ // Get new instance
+ $helperInstance = new DhtBootstrapHelper();
+
+ // Return the prepared instance
+ return $helperInstance;
+ }
+
+ /**
+ * Loads the announcement descriptor for parsing
+ *
+ * @return void
+ */
+ public function loadDescriptorXml () {
+ // Debug message
+ self::createDebugInstance(__CLASS__)->debugOutput('HELPER: Starting with DHT boostrap ...');
+
+ // Get a XML template instance
+ $templateInstance = XmlTemplateEngineFactory::createXmlTemplateEngineInstance('dht_bootstrap_template_class');
+
+ // Set it for later use
+ $this->setTemplateInstance($templateInstance);
+
+ // Read the XML descriptor
+ $templateInstance->loadXmlTemplate();
+
+ // Render the XML content
+ $templateInstance->renderXmlContent();
+ }
+ }
+
+ /**
+ * Do the helped attempt by delivering a package to ourselfs
+ *
+ * @param $dhtInstance An instance of a Distributable class
+ * @return void
+ */
+ public function sendPackage (Distributable $dhtInstance) {
+ // Sanity check: Is the dht in the approx. state? (init)
+ $dhtInstance->getStateInstance()->validateDhtStateIsInitialized();
+
+ // Compile the template, this inserts the loaded dht data into the gaps.
+ $this->getTemplateInstance()->compileTemplate();
+
+ // Get a singleton network package instance
+ $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
+
+ // Next, feed the content in. The network package class is a pipe-through class.
+ $packageInstance->enqueueRawDataFromTemplate($this, NetworkPackage::PROTOCOL_TCP);
+ }
+}
+
+// [EOF]
+?>
<?php
-/**
- * A helper class for announcing this node to other nodes
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- * @todo Find an interface for hub helper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class HubAnnouncementHelper extends BaseHubHelper implements HelpableHub {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
-
- // Set recipient type
- $this->setRecipientType(NetworkPackage::NETWORK_TARGET_UPPER_NODES);
-
- // Set package tags
- $this->setPackageTags(array('announcement'));
- }
-
- /**
- * Creates the helper class
- *
- * @return $helperInstance A prepared instance of this helper
- */
- public static final function createHubAnnouncementHelper () {
- // Get new instance
- $helperInstance = new HubAnnouncementHelper();
-
- // Return the prepared instance
- return $helperInstance;
- }
-
- /**
- * Loads the announcement descriptor for parsing
- *
- * @param $nodeInstance An instance of a NodeHelper class
- * @return void
- */
- public function loadDescriptorXml (NodeHelper $nodeInstance) {
- // Debug message
- self::createDebugInstance(__CLASS__)->debugOutput('HELPER: Starting with announcement to upper hubs...');
-
- // Get a XML template instance
- $templateInstance = XmlTemplateEngineFactory::createXmlTemplateEngineInstance('node_announcement_template_class');
-
- // Set it for later use
- $this->setTemplateInstance($templateInstance);
-
- // Read the XML descriptor
- $templateInstance->loadXmlTemplate();
-
- // Render the XML content
- $templateInstance->renderXmlContent();
- }
-
- /**
- * Publishes the node's descriptor XML to all found upper nodes when the
- * node has not yet published it's descriptor to a bootstrap node. This is
- * done by getting the raw XML content and inserting all variables into
- * the code. After this wents fine, the rendered content got "packaged"
- * for network delivery.
- *
- * @param $nodeInstance An instance of a NodeHelper class
- * @return void
- */
- public function sendPackage (NodeHelper $nodeInstance) {
- // Sanity check: Is the node in the approx. state? (active)
- $nodeInstance->getStateInstance()->validateNodeStateIsActiveOrReachable();
-
- // Compile the template, this inserts the loaded node data into the gaps.
- $this->getTemplateInstance()->compileTemplate();
-
- // Get a singleton network package instance
- $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
-
- // Next, feed the content in. The network package class is a pipe-through class.
- $packageInstance->enqueueRawDataFromTemplate($this, NetworkPackage::PROTOCOL_TCP);
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A AnnouncementMessageAnswer node helper class
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- * @todo Find an interface for hub helper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class NodeAnnouncementMessageAnswerHelper extends BaseHubAnswerHelper implements HelpableHub {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
-
- // Init package tags
- $this->setPackageTags(array('announcement_answer'));
- }
-
- /**
- * Creates the helper class
- *
- * @param $messageData An array with all message data
- * @return $helperInstance A prepared instance of this helper
- */
- public final static function createNodeAnnouncementMessageAnswerHelper (array $messageData) {
- // Get new instance
- $helperInstance = new NodeAnnouncementMessageAnswerHelper();
-
- // Set session id of other peer as recipient
- $helperInstance->setRecipientType($messageData[XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_SESSION_ID]);
-
- // Set message data
- $helperInstance->setMessageData($messageData);
-
- // Return the prepared instance
- return $helperInstance;
- }
-
- /**
- * Loads the descriptor XML file
- *
- * @param $nodeInstance An instance of a NodeHelper class
- * @return void
- */
- public function loadDescriptorXml (NodeHelper $nodeInstance) {
- // Debug message
- self::createDebugInstance(__CLASS__)->debugOutput('HELPER: Attempting to answer an announcement...');
-
- // Get a XML template instance
- $templateInstance = XmlTemplateEngineFactory::createXmlTemplateEngineInstance('node_announcement_answer_template_class');
-
- // Set it for later use
- $this->setTemplateInstance($templateInstance);
-
- // Read the XML descriptor
- $templateInstance->loadXmlTemplate();
-
- // Render the XML content
- $templateInstance->renderXmlContent();
- }
-
- /**
- * Send out announcement answer package
- *
- * @param $nodeInstance An instance of a NodeHelper class
- * @return void
- */
- public function sendPackage (NodeHelper $nodeInstance) {
- // Sanity check: Is the node in the approx. state? (active/reachable)
- $nodeInstance->getStateInstance()->validateNodeStateIsActiveOrReachable();
-
- // Compile the template, this inserts the loaded node data into the gaps.
- $this->getTemplateInstance()->compileTemplate();
-
- // Get a singleton network package instance
- $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
-
- // Next, feed the content in. The network package class is a pipe-through class.
- $packageInstance->enqueueRawDataFromTemplate($this, NetworkPackage::PROTOCOL_TCP);
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A general hub message answer helper class
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class BaseHubAnswerHelper extends BaseHubHelper {
- /**
- * Message data array
- */
- private $messageData = array();
-
- /**
- * Protected constructor
- *
- * @param $className Name of the concrete class
- * @return void
- */
- protected function __construct ($className) {
- // Call parent constructor
- parent::__construct($className);
- }
-
- /**
- * Setter for message data
- *
- * @return $messageData An array with message data
- */
- protected final function setMessageData (array $messageData) {
- $this->messageData = $messageData;
- }
-
- /**
- * Getter for message data
- *
- * @return $messageData An array with message data
- */
- public final function getMessageData () {
- return $this->messageData;
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A RequestNodeListMessageAnswer node helper class
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- * @todo Find an interface for hub helper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class NodeRequestNodeListMessageAnswerHelper extends BaseHubAnswerHelper implements HelpableHub {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
-
- // Init package tags
- $this->setPackageTags(array('request_node_list_answer'));
- }
-
- /**
- * Creates the helper class
- *
- * @param $messageData An array with all message data
- * @return $helperInstance A prepared instance of this helper
- */
- public final static function createNodeRequestNodeListMessageAnswerHelper (array $messageData) {
- // Get new instance
- $helperInstance = new NodeRequestNodeListMessageAnswerHelper();
-
- // Set session id of other peer as recipient
- $helperInstance->setRecipientType($messageData[XmlRequestNodeListTemplateEngine::REQUEST_DATA_SESSION_ID]);
-
- // Set message data
- $helperInstance->setMessageData($messageData);
-
- // Return the prepared instance
- return $helperInstance;
- }
-
- /**
- * Loads the descriptor XML file
- *
- * @param $nodeInstance An instance of a NodeHelper class
- * @return void
- */
- public function loadDescriptorXml (NodeHelper $nodeInstance) {
- // Debug message
- self::createDebugInstance(__CLASS__)->debugOutput('HELPER: Attempting to answer a request: node-list...');
-
- // Get a XML template instance
- $templateInstance = XmlTemplateEngineFactory::createXmlTemplateEngineInstance('node_request_node_list_answer_template_class');
-
- // Set it for later use
- $this->setTemplateInstance($templateInstance);
-
- // Read the XML descriptor
- $templateInstance->loadXmlTemplate();
-
- // "Cache" entries instance for next foreach loop
- $entriesInstance = $templateInstance->getTemplateInstance();
-
- // Is must not be NULL (then it can only be a template instance)
- assert(!is_null($entriesInstance));
-
- // Render the XML content
- $templateInstance->renderXmlContent();
- }
-
- /**
- * Send out request-node-list answer package
- *
- * @param $nodeInstance An instance of a NodeHelper class
- * @return void
- */
- public function sendPackage (NodeHelper $nodeInstance) {
- // Sanity check: Is the node in the approx. state? (active/reachable)
- $nodeInstance->getStateInstance()->validateNodeStateIsActiveOrReachable();
-
- // Compile the template, this inserts the loaded node data into the gaps.
- $this->getTemplateInstance()->compileTemplate();
-
- // Get a singleton network package instance
- $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
-
- // Next, feed the content in. The network package class is a pipe-through class.
- $packageInstance->enqueueRawDataFromTemplate($this, NetworkPackage::PROTOCOL_TCP);
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A ??? hub helper class
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- * @todo Find an interface for hub helper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class Hub???Helper extends BaseHubHelper implements HelpableHub {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
-
- // Set recipient type
- $this->setRecipientType(NetworkPackage::NETWORK_TARGET_!!!);
- }
-
- /**
- * Creates the helper class
- *
- * @return $helperInstance A prepared instance of this helper
- */
- public final static function createHub???Helper () {
- // Get new instance
- $helperInstance = new Hub???Helper();
-
- // Return the prepared instance
- return $helperInstance;
- }
-
- /**
- * Loads the descriptor XML file
- *
- * @return void
- */
- public function loadDescriptorXml () {
- $this->partialStub('Please implement this method.');
- }
-
- /**
- * Do the helped attempt by delivering a package to ourselfs
- *
- * @param $nodeInstance An instance of a NodeHelper class
- * @return void
- */
- public function sendPackage (NodeHelper $nodeInstance) {
- // Sanity check: Is the node in the approx. state? (active)
- $nodeInstance->getStateInstance()->validateNodeStateIsActive();
-
- // Compile the template, this inserts the loaded node data into the gaps.
- $this->getTemplateInstance()->compileTemplate();
-
- // Get a singleton network package instance
- $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
-
- // Next, feed the content in. The network package class is a pipe-through class.
- $packageInstance->enqueueRawDataFromTemplate($this, NetworkPackage::PROTOCOL_|||);
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A general hub helper class. This class does not extend BaseHelper.
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class BaseHubHelper extends BaseHubSystem {
- /**
- * Recipient type
- */
- private $recipientType = 'invalid';
-
- /**
- * Package tags
- */
- private $packageTags = array();
-
- /**
- * Protected constructor
- *
- * @param $className Name of the concrete class
- * @return void
- */
- protected function __construct ($className) {
- // Call parent constructor
- parent::__construct($className);
- }
-
- /**
- * Setter for recipient type
- *
- * @return $recipientType Type of a recipient (the helper is made for)
- */
- protected final function setRecipientType ($recipientType) {
- $this->recipientType = $recipientType;
- }
-
- /**
- * Getter for recipient type
- *
- * @return $recipientType Type of a recipient (the helper is made for)
- */
- public final function getRecipientType () {
- return $this->recipientType;
- }
-
- /**
- * Getter for package tags in a simple array
- *
- * @return $packageTags An array with all tags for the currently handled package
- */
- public final function getPackageTags () {
- return $this->packageTags;
- }
-
- /**
- * Setter for package tags in a simple array
- *
- * @param $packageTags An array with all tags for the currently handled package
- * @return void
- */
- public final function setPackageTags (array $packageTags) {
- $this->packageTags = $packageTags;
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A SelfConnect hub helper class
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- * @todo Find an interface for hub helper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class HubSelfConnectHelper extends BaseHubHelper implements HelpableHub {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
-
- // Set recipient type
- $this->setRecipientType(NetworkPackage::NETWORK_TARGET_SELF);
-
- // Set package tags
- $this->setPackageTags(array('self_connect'));
- }
-
- /**
- * Creates the helper class
- *
- * @return $helperInstance A prepared instance of this helper
- */
- public static final function createHubSelfConnectHelper () {
- // Get new instance
- $helperInstance = new HubSelfConnectHelper();
-
- // Return the prepared instance
- return $helperInstance;
- }
-
- /**
- * Loads the descriptor XML file
- *
- * @param $nodeInstance An instance of a NodeHelper class
- * @return void
- */
- public function loadDescriptorXml (NodeHelper $nodeInstance) {
- // Debug message
- self::createDebugInstance(__CLASS__)->debugOutput('HELPER: Attempting self-connect...');
-
- // Get a XML template instance
- $templateInstance = XmlTemplateEngineFactory::createXmlTemplateEngineInstance('node_self_connect_template_class');
-
- // Set it for later use
- $this->setTemplateInstance($templateInstance);
-
- // Read the XML descriptor
- $templateInstance->loadXmlTemplate();
-
- // Render the XML content
- $templateInstance->renderXmlContent();
- }
-
- /**
- * Do the self-connect attempt by delivering a package to ourselfs
- *
- * @param $nodeInstance An instance of a NodeHelper class
- * @return void
- */
- public function sendPackage (NodeHelper $nodeInstance) {
- // Sanity check: Is the node in the approx. state? (active)
- $nodeInstance->getStateInstance()->validateNodeStateIsActiveOrAnnounced();
-
- // Compile the template, this inserts the loaded node data into the gaps.
- $this->getTemplateInstance()->compileTemplate();
-
- // Get a singleton network package instance
- $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
-
- // Next, feed the content in. The network package class is a pipe-through class.
- $packageInstance->enqueueRawDataFromTemplate($this, NetworkPackage::PROTOCOL_TCP);
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A ??? hub helper class
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- * @todo Find an interface for hub helper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class NodeRequestNodeListHelper extends BaseHubHelper implements HelpableHub {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
-
- // Set recipient type
- $this->setRecipientType(NetworkPackage::NETWORK_TARGET_UPPER_NODES);
-
- // Set package tags
- $this->setPackageTags(array('request_node_list'));
- }
-
- /**
- * Creates the helper class
- *
- * @return $helperInstance A prepared instance of this helper
- */
- public final static function createNodeRequestNodeListHelper () {
- // Get new instance
- $helperInstance = new NodeRequestNodeListHelper();
-
- // Return the prepared instance
- return $helperInstance;
- }
-
- /**
- * Loads the descriptor XML file
- *
- * @param $nodeInstance An instance of a NodeHelper class
- * @return void
- */
- public function loadDescriptorXml (NodeHelper $nodeInstance) {
- // Debug message
- self::createDebugInstance(__CLASS__)->debugOutput('HELPER: Attempting to request: node-list...');
-
- // Get a XML template instance
- $templateInstance = XmlTemplateEngineFactory::createXmlTemplateEngineInstance('node_request_node_list_template_class');
-
- // Set it for later use
- $this->setTemplateInstance($templateInstance);
-
- // Read the XML descriptor
- $templateInstance->loadXmlTemplate();
-
- // Render the XML content
- $templateInstance->renderXmlContent();
- }
-
- /**
- * Do the helped attempt by delivering a package to ourselfs
- *
- * @param $nodeInstance An instance of a NodeHelper class
- * @return void
- */
- public function sendPackage (NodeHelper $nodeInstance) {
- // Sanity check: Is the node in the approx. state? (active)
- $nodeInstance->getStateInstance()->validateNodeStateIsAnnouncementCompleted();
-
- // Compile the template, this inserts the loaded node data into the gaps.
- $this->getTemplateInstance()->compileTemplate();
-
- // Get a singleton network package instance
- $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
-
- // Next, feed the content in. The network package class is a pipe-through class.
- $packageInstance->enqueueRawDataFromTemplate($this, NetworkPackage::PROTOCOL_TCP);
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
--- /dev/null
+Deny from all
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A helper class for announcing this node to other nodes
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ * @todo Find an interface for hub helper
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class NodeAnnouncementHelper extends BaseNodeHelper implements HelpableNode {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+
+ // Set recipient type
+ $this->setRecipientType(NetworkPackage::NETWORK_TARGET_UPPER_NODES);
+
+ // Set package tags
+ $this->setPackageTags(array('announcement'));
+ }
+
+ /**
+ * Creates the helper class
+ *
+ * @return $helperInstance A prepared instance of this helper
+ */
+ public static final function createNodeAnnouncementHelper () {
+ // Get new instance
+ $helperInstance = new NodeAnnouncementHelper();
+
+ // Return the prepared instance
+ return $helperInstance;
+ }
+
+ /**
+ * Loads the announcement descriptor for parsing
+ *
+ * @param $nodeInstance An instance of a NodeHelper class
+ * @return void
+ */
+ public function loadDescriptorXml (NodeHelper $nodeInstance) {
+ // Debug message
+ self::createDebugInstance(__CLASS__)->debugOutput('HELPER: Starting with announcement to upper hubs...');
+
+ // Get a XML template instance
+ $templateInstance = XmlTemplateEngineFactory::createXmlTemplateEngineInstance('node_announcement_template_class');
+
+ // Set it for later use
+ $this->setTemplateInstance($templateInstance);
+
+ // Read the XML descriptor
+ $templateInstance->loadXmlTemplate();
+
+ // Render the XML content
+ $templateInstance->renderXmlContent();
+ }
+
+ /**
+ * Publishes the node's descriptor XML to all found upper nodes when the
+ * node has not yet published it's descriptor to a bootstrap node. This is
+ * done by getting the raw XML content and inserting all variables into
+ * the code. After this wents fine, the rendered content got "packaged"
+ * for network delivery.
+ *
+ * @param $nodeInstance An instance of a NodeHelper class
+ * @return void
+ */
+ public function sendPackage (NodeHelper $nodeInstance) {
+ // Sanity check: Is the node in the approx. state? (active)
+ $nodeInstance->getStateInstance()->validateNodeStateIsActiveOrReachable();
+
+ // Compile the template, this inserts the loaded node data into the gaps.
+ $this->getTemplateInstance()->compileTemplate();
+
+ // Get a singleton network package instance
+ $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
+
+ // Next, feed the content in. The network package class is a pipe-through class.
+ $packageInstance->enqueueRawDataFromTemplate($this, NetworkPackage::PROTOCOL_TCP);
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A AnnouncementMessageAnswer node helper class
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ * @todo Find an interface for hub helper
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class NodeAnnouncementMessageAnswerHelper extends BaseHubAnswerHelper implements HelpableNode {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+
+ // Init package tags
+ $this->setPackageTags(array('announcement_answer'));
+ }
+
+ /**
+ * Creates the helper class
+ *
+ * @param $messageData An array with all message data
+ * @return $helperInstance A prepared instance of this helper
+ */
+ public final static function createNodeAnnouncementMessageAnswerHelper (array $messageData) {
+ // Get new instance
+ $helperInstance = new NodeAnnouncementMessageAnswerHelper();
+
+ // Set session id of other peer as recipient
+ $helperInstance->setRecipientType($messageData[XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_SESSION_ID]);
+
+ // Set message data
+ $helperInstance->setMessageData($messageData);
+
+ // Return the prepared instance
+ return $helperInstance;
+ }
+
+ /**
+ * Loads the descriptor XML file
+ *
+ * @param $nodeInstance An instance of a NodeHelper class
+ * @return void
+ */
+ public function loadDescriptorXml (NodeHelper $nodeInstance) {
+ // Debug message
+ self::createDebugInstance(__CLASS__)->debugOutput('HELPER: Attempting to answer an announcement...');
+
+ // Get a XML template instance
+ $templateInstance = XmlTemplateEngineFactory::createXmlTemplateEngineInstance('node_announcement_answer_template_class');
+
+ // Set it for later use
+ $this->setTemplateInstance($templateInstance);
+
+ // Read the XML descriptor
+ $templateInstance->loadXmlTemplate();
+
+ // Render the XML content
+ $templateInstance->renderXmlContent();
+ }
+
+ /**
+ * Send out announcement answer package
+ *
+ * @param $nodeInstance An instance of a NodeHelper class
+ * @return void
+ */
+ public function sendPackage (NodeHelper $nodeInstance) {
+ // Sanity check: Is the node in the approx. state? (active/reachable)
+ $nodeInstance->getStateInstance()->validateNodeStateIsActiveOrReachable();
+
+ // Compile the template, this inserts the loaded node data into the gaps.
+ $this->getTemplateInstance()->compileTemplate();
+
+ // Get a singleton network package instance
+ $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
+
+ // Next, feed the content in. The network package class is a pipe-through class.
+ $packageInstance->enqueueRawDataFromTemplate($this, NetworkPackage::PROTOCOL_TCP);
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A general hub message answer helper class
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class BaseHubAnswerHelper extends BaseNodeHelper {
+ /**
+ * Message data array
+ */
+ private $messageData = array();
+
+ /**
+ * Protected constructor
+ *
+ * @param $className Name of the concrete class
+ * @return void
+ */
+ protected function __construct ($className) {
+ // Call parent constructor
+ parent::__construct($className);
+ }
+
+ /**
+ * Setter for message data
+ *
+ * @return $messageData An array with message data
+ */
+ protected final function setMessageData (array $messageData) {
+ $this->messageData = $messageData;
+ }
+
+ /**
+ * Getter for message data
+ *
+ * @return $messageData An array with message data
+ */
+ public final function getMessageData () {
+ return $this->messageData;
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A RequestNodeListMessageAnswer node helper class
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ * @todo Find an interface for hub helper
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class NodeRequestNodeListMessageAnswerHelper extends BaseHubAnswerHelper implements HelpableNode {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+
+ // Init package tags
+ $this->setPackageTags(array('request_node_list_answer'));
+ }
+
+ /**
+ * Creates the helper class
+ *
+ * @param $messageData An array with all message data
+ * @return $helperInstance A prepared instance of this helper
+ */
+ public final static function createNodeRequestNodeListMessageAnswerHelper (array $messageData) {
+ // Get new instance
+ $helperInstance = new NodeRequestNodeListMessageAnswerHelper();
+
+ // Set session id of other peer as recipient
+ $helperInstance->setRecipientType($messageData[XmlRequestNodeListTemplateEngine::REQUEST_DATA_SESSION_ID]);
+
+ // Set message data
+ $helperInstance->setMessageData($messageData);
+
+ // Return the prepared instance
+ return $helperInstance;
+ }
+
+ /**
+ * Loads the descriptor XML file
+ *
+ * @param $nodeInstance An instance of a NodeHelper class
+ * @return void
+ */
+ public function loadDescriptorXml (NodeHelper $nodeInstance) {
+ // Debug message
+ self::createDebugInstance(__CLASS__)->debugOutput('HELPER: Attempting to answer a request: node-list...');
+
+ // Get a XML template instance
+ $templateInstance = XmlTemplateEngineFactory::createXmlTemplateEngineInstance('node_request_node_list_answer_template_class');
+
+ // Set it for later use
+ $this->setTemplateInstance($templateInstance);
+
+ // Read the XML descriptor
+ $templateInstance->loadXmlTemplate();
+
+ // "Cache" entries instance for next foreach loop
+ $entriesInstance = $templateInstance->getTemplateInstance();
+
+ // Is must not be NULL (then it can only be a template instance)
+ assert(!is_null($entriesInstance));
+
+ // Render the XML content
+ $templateInstance->renderXmlContent();
+ }
+
+ /**
+ * Send out request-node-list answer package
+ *
+ * @param $nodeInstance An instance of a NodeHelper class
+ * @return void
+ */
+ public function sendPackage (NodeHelper $nodeInstance) {
+ // Sanity check: Is the node in the approx. state? (active/reachable)
+ $nodeInstance->getStateInstance()->validateNodeStateIsActiveOrReachable();
+
+ // Compile the template, this inserts the loaded node data into the gaps.
+ $this->getTemplateInstance()->compileTemplate();
+
+ // Get a singleton network package instance
+ $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
+
+ // Next, feed the content in. The network package class is a pipe-through class.
+ $packageInstance->enqueueRawDataFromTemplate($this, NetworkPackage::PROTOCOL_TCP);
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A ??? hub helper class
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ * @todo Find an interface for hub helper
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class Node???Helper extends BaseNodeHelper implements HelpableNode {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+
+ // Set recipient type
+ $this->setRecipientType(NetworkPackage::NETWORK_TARGET_!!!);
+ }
+
+ /**
+ * Creates the helper class
+ *
+ * @return $helperInstance A prepared instance of this helper
+ */
+ public final static function createNode???Helper () {
+ // Get new instance
+ $helperInstance = new Node???Helper();
+
+ // Return the prepared instance
+ return $helperInstance;
+ }
+
+ /**
+ * Loads the descriptor XML file
+ *
+ * @return void
+ */
+ public function loadDescriptorXml () {
+ $this->partialStub('Please implement this method.');
+ }
+
+ /**
+ * Do the helped attempt by delivering a package to ourselfs
+ *
+ * @param $nodeInstance An instance of a NodeHelper class
+ * @return void
+ */
+ public function sendPackage (NodeHelper $nodeInstance) {
+ // Sanity check: Is the node in the approx. state? (active)
+ $nodeInstance->getStateInstance()->validateNodeStateIsActive();
+
+ // Compile the template, this inserts the loaded node data into the gaps.
+ $this->getTemplateInstance()->compileTemplate();
+
+ // Get a singleton network package instance
+ $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
+
+ // Next, feed the content in. The network package class is a pipe-through class.
+ $packageInstance->enqueueRawDataFromTemplate($this, NetworkPackage::PROTOCOL_|||);
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A general node helper class
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class BaseNodeHelper extends BaseHubSystemHelper {
+ /**
+ * Protected constructor
+ *
+ * @param $className Name of the concrete class
+ * @return void
+ */
+ protected function __construct ($className) {
+ // Call parent constructor
+ parent::__construct($className);
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A SelfConnect hub helper class
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ * @todo Find an interface for hub helper
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class NodeSelfConnectHelper extends BaseNodeHelper implements HelpableNode {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+
+ // Set recipient type
+ $this->setRecipientType(NetworkPackage::NETWORK_TARGET_SELF);
+
+ // Set package tags
+ $this->setPackageTags(array('self_connect'));
+ }
+
+ /**
+ * Creates the helper class
+ *
+ * @return $helperInstance A prepared instance of this helper
+ */
+ public static final function createNodeSelfConnectHelper () {
+ // Get new instance
+ $helperInstance = new NodeSelfConnectHelper();
+
+ // Return the prepared instance
+ return $helperInstance;
+ }
+
+ /**
+ * Loads the descriptor XML file
+ *
+ * @param $nodeInstance An instance of a NodeHelper class
+ * @return void
+ */
+ public function loadDescriptorXml (NodeHelper $nodeInstance) {
+ // Debug message
+ self::createDebugInstance(__CLASS__)->debugOutput('HELPER: Attempting self-connect...');
+
+ // Get a XML template instance
+ $templateInstance = XmlTemplateEngineFactory::createXmlTemplateEngineInstance('node_self_connect_template_class');
+
+ // Set it for later use
+ $this->setTemplateInstance($templateInstance);
+
+ // Read the XML descriptor
+ $templateInstance->loadXmlTemplate();
+
+ // Render the XML content
+ $templateInstance->renderXmlContent();
+ }
+
+ /**
+ * Do the self-connect attempt by delivering a package to ourselfs
+ *
+ * @param $nodeInstance An instance of a NodeHelper class
+ * @return void
+ */
+ public function sendPackage (NodeHelper $nodeInstance) {
+ // Sanity check: Is the node in the approx. state? (active)
+ $nodeInstance->getStateInstance()->validateNodeStateIsActiveOrAnnounced();
+
+ // Compile the template, this inserts the loaded node data into the gaps.
+ $this->getTemplateInstance()->compileTemplate();
+
+ // Get a singleton network package instance
+ $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
+
+ // Next, feed the content in. The network package class is a pipe-through class.
+ $packageInstance->enqueueRawDataFromTemplate($this, NetworkPackage::PROTOCOL_TCP);
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A ??? hub helper class
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ * @todo Find an interface for hub helper
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class NodeRequestNodeListHelper extends BaseNodeHelper implements HelpableNode {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+
+ // Set recipient type
+ $this->setRecipientType(NetworkPackage::NETWORK_TARGET_UPPER_NODES);
+
+ // Set package tags
+ $this->setPackageTags(array('request_node_list'));
+ }
+
+ /**
+ * Creates the helper class
+ *
+ * @return $helperInstance A prepared instance of this helper
+ */
+ public final static function createNodeRequestNodeListHelper () {
+ // Get new instance
+ $helperInstance = new NodeRequestNodeListHelper();
+
+ // Return the prepared instance
+ return $helperInstance;
+ }
+
+ /**
+ * Loads the descriptor XML file
+ *
+ * @param $nodeInstance An instance of a NodeHelper class
+ * @return void
+ */
+ public function loadDescriptorXml (NodeHelper $nodeInstance) {
+ // Debug message
+ self::createDebugInstance(__CLASS__)->debugOutput('HELPER: Attempting to request: node-list...');
+
+ // Get a XML template instance
+ $templateInstance = XmlTemplateEngineFactory::createXmlTemplateEngineInstance('node_request_node_list_template_class');
+
+ // Set it for later use
+ $this->setTemplateInstance($templateInstance);
+
+ // Read the XML descriptor
+ $templateInstance->loadXmlTemplate();
+
+ // Render the XML content
+ $templateInstance->renderXmlContent();
+ }
+
+ /**
+ * Do the helped attempt by delivering a package to ourselfs
+ *
+ * @param $nodeInstance An instance of a NodeHelper class
+ * @return void
+ */
+ public function sendPackage (NodeHelper $nodeInstance) {
+ // Sanity check: Is the node in the approx. state? (active)
+ $nodeInstance->getStateInstance()->validateNodeStateIsAnnouncementCompleted();
+
+ // Compile the template, this inserts the loaded node data into the gaps.
+ $this->getTemplateInstance()->compileTemplate();
+
+ // Get a singleton network package instance
+ $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
+
+ // Next, feed the content in. The network package class is a pipe-through class.
+ $packageInstance->enqueueRawDataFromTemplate($this, NetworkPackage::PROTOCOL_TCP);
+ }
+}
+
+// [EOF]
+?>
* from given helper's template instance and pushing it on the 'undeclared'
* stack.
*
- * @param $helperInstance An instance of a HelpableHub class
+ * @param $helperInstance An instance of a HelpableNode class
* @param $protocol Name of used protocol (TCP/UDP)
* @return void
*/
- public function enqueueRawDataFromTemplate (HelpableHub $helperInstance, $protocolName) {
+ public function enqueueRawDataFromTemplate (HelpableNode $helperInstance, $protocolName) {
// Get the raw content ...
$content = $helperInstance->getTemplateInstance()->getRawTemplateData();
//* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('content(' . strlen($content) . ')=' . $content);
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * An Bootstrap template engine class for XML templates
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ * @todo This template engine does not make use of setTemplateType()
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class XmlBootstrapTemplateEngine extends BaseXmlTemplateEngine implements CompileableTemplate, Registerable {
+ /**
+ * Some XML nodes must be available for later data extraction
+ */
+ const BOOTSTRAP_DATA_SESSION_ID = 'session-id';
+ const BOOTSTRAP_DATA_NODE_STATUS = 'node-status';
+ const BOOTSTRAP_DATA_NODE_MODE = 'node-mode';
+ const BOOTSTRAP_DATA_EXTERNAL_IP = 'external-ip';
+ const BOOTSTRAP_DATA_INTERNAL_IP = 'internal-ip';
+ const BOOTSTRAP_DATA_LISTEN_PORT = 'listen-port';
+
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+
+ // Init array
+ $this->subNodes = array(
+ 'bootstrap-data',
+ 'listener',
+ self::BOOTSTRAP_DATA_NODE_STATUS,
+ self::BOOTSTRAP_DATA_NODE_MODE,
+ self::BOOTSTRAP_DATA_LISTEN_PORT,
+ self::BOOTSTRAP_DATA_SESSION_ID,
+ self::BOOTSTRAP_DATA_EXTERNAL_IP,
+ self::BOOTSTRAP_DATA_INTERNAL_IP,
+ 'object-type-list',
+ );
+ }
+
+ /**
+ * Creates an instance of the class TemplateEngine and prepares it for usage
+ *
+ * @return $templateInstance An instance of TemplateEngine
+ * @throws BasePathIsEmptyException If the provided $templateBasePath is empty
+ * @throws InvalidBasePathStringException If $templateBasePath is no string
+ * @throws BasePathIsNoDirectoryException If $templateBasePath is no
+ * directory or not found
+ * @throws BasePathReadProtectedException If $templateBasePath is
+ * read-protected
+ */
+ public static final function createXmlBootstrapTemplateEngine () {
+ // Get a new instance
+ $templateInstance = new XmlBootstrapTemplateEngine();
+
+ // Init template instance
+ $templateInstance->initXmlTemplateEngine('node', 'bootstrap');
+
+ // Return the prepared instance
+ return $templateInstance;
+ }
+
+ /**
+ * Currently not used
+ *
+ * @param $resource XML parser resource (currently ignored)
+ * @param $characters Characters to handle
+ * @return void
+ */
+ public function characterHandler ($resource, $characters) {
+ // Trim all spaces away
+ $characters = trim($characters);
+
+ // Is this string empty?
+ if (empty($characters)) {
+ // Then skip it silently
+ return false;
+ } // END - if
+
+ /*
+ * Assign the found characters to variable and use the last entry from
+ * stack as the name.
+ */
+ parent::assignVariable($this->getStackerInstance()->getNamed('node_bootstrap'), $characters);
+ }
+
+ /**
+ * Getter for cache file (FQFN)
+ *
+ * @return $fqfn Full-qualified file name of the menu cache
+ */
+ public function getMenuCacheFqfn () {
+ $this->partialStub('Please implement this method.');
+ }
+
+ /**
+ * Starts the bootstrap
+ *
+ * @return void
+ */
+ protected function startBootstrap () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('node_bootstrap', 'node_bootstrap');
+ }
+
+ /**
+ * Starts the bootstrap data
+ *
+ * @return void
+ */
+ protected function startBootstrapData () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('node_bootstrap', 'bootstrap-data');
+ }
+
+ /**
+ * Starts the node status
+ *
+ * @return void
+ */
+ protected function startNodeStatus () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('node_bootstrap', self::BOOTSTRAP_DATA_NODE_STATUS);
+ }
+
+ /**
+ * Starts the node-mode
+ *
+ * @return void
+ */
+ protected function startNodeMode () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('node_bootstrap', self::BOOTSTRAP_DATA_NODE_MODE);
+ }
+
+ /**
+ * Starts the listener
+ *
+ * @return void
+ */
+ protected function startListener () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('node_bootstrap', 'listener');
+ }
+
+ /**
+ * Starts the TCP/UDP listen port
+ *
+ * @return void
+ */
+ protected function startListenPort () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('node_bootstrap', self::BOOTSTRAP_DATA_LISTEN_PORT);
+ }
+
+ /**
+ * Starts the session id
+ *
+ * @return void
+ */
+ protected function startSessionId () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('node_bootstrap', self::BOOTSTRAP_DATA_SESSION_ID);
+ }
+
+ /**
+ * Starts the public ip
+ *
+ * @return void
+ */
+ protected function startExternalIp () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('node_bootstrap', self::BOOTSTRAP_DATA_EXTERNAL_IP);
+ }
+
+ /**
+ * Starts the private ip
+ *
+ * @return void
+ */
+ protected function startInternalIp () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('node_bootstrap', self::BOOTSTRAP_DATA_INTERNAL_IP);
+ }
+
+ /**
+ * Starts the object type list
+ *
+ * @return void
+ */
+ protected function startObjectTypeList () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('node_bootstrap', 'object-type-list');
+ }
+
+ /**
+ * Starts the object type
+ *
+ * @return void
+ */
+ protected function startObjectType () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('node_bootstrap', 'object-type');
+ }
+
+ /**
+ * Finishes the object type
+ *
+ * @return void
+ */
+ protected function finishObjectType () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('node_bootstrap');
+ }
+
+ /**
+ * Finishes the object type list
+ *
+ * @return void
+ */
+ protected function finishObjectTypeList () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('node_bootstrap');
+ }
+
+ /**
+ * Finishes the session id
+ *
+ * @return void
+ */
+ protected function finishSessionId () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('node_bootstrap');
+ }
+
+ /**
+ * Finishes the private ip
+ *
+ * @return void
+ */
+ protected function finishInternalIp () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('node_bootstrap');
+ }
+
+ /**
+ * Finishes the public ip
+ *
+ * @return void
+ */
+ protected function finishExternalIp () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('node_bootstrap');
+ }
+
+ /**
+ * Finishes the TCP/UDP listen port
+ *
+ * @return void
+ */
+ protected function finishListenPort () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('node_bootstrap');
+ }
+
+ /**
+ * Finishes the listener
+ *
+ * @return void
+ */
+ protected function finishListener () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('node_bootstrap');
+ }
+
+ /**
+ * Finishes the node mode
+ *
+ * @return void
+ */
+ protected function finishNodeMode () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('node_bootstrap');
+ }
+
+ /**
+ * Finishes the node status
+ *
+ * @return void
+ */
+ protected function finishNodeStatus () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('node_bootstrap');
+ }
+
+ /**
+ * Finishes the bootstrap data
+ *
+ * @return void
+ */
+ protected function finishBootstrapData () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('node_bootstrap');
+ }
+
+ /**
+ * Finishes the bootstrap
+ *
+ * @return void
+ */
+ protected function finishBootstrap () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('node_bootstrap');
+ }
+}
+
+// [EOF]
+?>