application/hub/interfaces/discovery/class_DiscoverableSocket.php svneol=native#text/plain
application/hub/interfaces/executor/.htaccess svneol=native#text/plain
application/hub/interfaces/executor/class_Executor.php svneol=native#text/plain
+application/hub/interfaces/filter/.htaccess -text svneol=unset#text/plain
+application/hub/interfaces/filter/class_FilterablePackage.php svneol=native#text/plain
application/hub/interfaces/handler/.htaccess -text svneol=unset#text/plain
application/hub/interfaces/handler/chunks/.htaccess -text svneol=unset#text/plain
application/hub/interfaces/handler/chunks/class_HandleableChunks.php svneol=native#text/plain
application/hub/main/discovery/socket/.htaccess -text svneol=unset#text/plain
application/hub/main/discovery/socket/class_PackageSocketDiscovery.php svneol=native#text/plain
application/hub/main/factories/.htaccess -text svneol=unset#text/plain
+application/hub/main/factories/chain/.htaccess -text svneol=unset#text/plain
+application/hub/main/factories/chain/class_PackageFilterChainFactory.php svneol=native#text/plain
application/hub/main/factories/chunks/.htaccess -text svneol=unset#text/plain
application/hub/main/factories/chunks/class_ChunkHandlerFactory.php svneol=native#text/plain
application/hub/main/factories/discovery/.htaccess -text svneol=unset#text/plain
application/hub/main/filter/bootstrap/node/class_NodeBootstrapInitQueuesFilter.php svneol=native#text/plain
application/hub/main/filter/bootstrap/node/class_NodeBootstrapListenerPoolFilter.php svneol=native#text/plain
application/hub/main/filter/bootstrap/node/class_NodeBootstrapRestoreNodeListFilter.php svneol=native#text/plain
+application/hub/main/filter/chains/.htaccess -text svneol=unset#text/plain
+application/hub/main/filter/chains/class_PackageFilterChain.php svneol=native#text/plain
application/hub/main/filter/chat/.htaccess svneol=native#text/plain
application/hub/main/filter/chat/class_ChatInitializationFilter.php svneol=native#text/plain
application/hub/main/filter/chat/class_ChatPhpRequirementsFilter.php svneol=native#text/plain
application/hub/main/filter/shutdown/node/class_NodeShutdownFlushNodeListFilter.php svneol=native#text/plain
application/hub/main/filter/shutdown/node/class_NodeShutdownNodeFilter.php svneol=native#text/plain
application/hub/main/filter/shutdown/node/class_NodeShutdownTaskHandlerFilter.php svneol=native#text/plain
+application/hub/main/filter/tags/.htaccess -text svneol=unset#text/plain
+application/hub/main/filter/tags/class_PackageAnnouncementTagFilter.php svneol=native#text/plain
application/hub/main/filter/task/.htaccess -text svneol=unset#text/plain
application/hub/main/filter/task/chat/.htaccess svneol=native#text/plain
application/hub/main/filter/task/chat/class_ChatTaskHandlerInitializerFilter.php svneol=native#text/plain
// CFG: NODE-SHUTDOWN-NODE-FILTER
$cfg->setConfigEntry('node_shutdown_node_filter', 'NodeShutdownNodeFilter');
+// CFG: PACKAGE-FILTER-CHAIN-CLASS
+$cfg->setConfigEntry('package_filter_chain_class', 'PackageFilterChain');
+
+// CFG: PACKAGE-TAG-ANNOUNCEMENT-FILTER
+$cfg->setConfigEntry('package_tag_announcement_filter', 'PackageAnnouncementTagFilter');
+
// CFG: NEWS-READER-CLASS
$cfg->setConfigEntry('news_reader_class', 'ConsoleNewsReader');
// CFG: STACKER-PACKAGE-NEW-MESSAGE-MAX-SIZE
$cfg->setConfigEntry('stacker_package_new_message_max_size', 400);
+// CFG: STACKER-PACKAGE-PROCESSED-MESSAGE-MAX-SIZE
+$cfg->setConfigEntry('stacker_package_processed_message_max_size', 400);
+
// CFG: STACKER-PACKAGE-BACKBUFFER-MAX-SIZE
$cfg->setConfigEntry('stacker_package_backbuffer_max_size', 1000);
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A class for package filters
+ *
+ * @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
+ *
+ * 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 FilterablePackage extends Filterable {
+ /**
+ * Processes the given raw message content.
+ *
+ * @param $messageContent Raw message content
+ * @param $packageInstance An instance of a Receivable class
+ * @return void
+ */
+ function processMessage ($messageContent, Receivable $packageInstance);
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A factory class for network packages
+ *
+ * @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 PackageFilterChainFactory extends ObjectFactory {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Returns a filter chain by given tags array.
+ *
+ * @param $tags An array with tags from a package
+ * @return $chainInstance An instance of a filter chain class
+ */
+ public static final function createChainByTagsArray (array $tags) {
+ // Get a registry key from tags array, this does mostly call implode()
+ $registryKey = Registry::getRegistryKeyFromArray('package_filter_chain', $tags);
+
+ // Is the registry key there?
+ if (Registry::getRegistry()->instanceExists($registryKey)) {
+ // Yes, then use that instance
+ $chainInstance = Registry::getRegistry()->getInstance($registryKey);
+ } else {
+ // Initialize a filter chain class
+ $chainInstance = ObjectFactory::createObjectByConfiguredName('package_filter_chain_class');
+
+ // "Walk" through all tags entries
+ foreach ($tags as $tag) {
+ /*
+ * Now create a filter instance of this tag. This way all tags
+ * got rudymentary verified, if an exception is coming here, it
+ * simply means the tag is not valid. This however should be
+ * handled some calls before this method is called.
+ */
+ $filterInstance = ObjectFactory::createObjectByConfiguredName('package_tag_' . $tag . '_filter');
+
+ // Add this filter to the chain
+ $chainInstance->addFilter($filterInstance);
+ } // END - foreach
+
+ // Add the finished chain to the registry
+ Registry::getRegistry()->addInstance($registryKey, $chainInstance);
+ }
+
+ // Return the chain instance
+ return $chainInstance;
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A filter chain for processing network packages (or better messages)
+ *
+ * @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
+ *
+ * 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 PackageFilterChain extends FilterChain {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this class
+ *
+ * @return $chainInstance An instance of this class
+ */
+ public static final function createPackageFilterChain () {
+ // Get a new instance
+ $chainInstance = new PackageFilterChain();
+
+ // Return the prepared instance
+ return $chainInstance;
+ }
+
+ /**
+ * Processes the given raw message content through all filters
+ *
+ * @param $messageContent Raw message content
+ * @param $packageInstance An instance of a Receivable class
+ * @return void
+ * @todo This may be slow if a message with a lot tags arrived
+ */
+ public function processMessage ($messageContent, Receivable $packageInstance) {
+ // Get all filters and "run" them
+ foreach ($this->getFilters() as $filterInstance) {
+ // Try to process it
+ try {
+ $filterInstance->processMessage($messageContent, $packageInstance);
+ } catch (FilterChainException $e) {
+ // This exception can be thrown to just skip any further processing
+ $this->debugOutput('Failed to execute lase filter ' . $filterInstance->__toString() . ': ' . $e->getMessage());
+ break;
+ }
+ } // END - foreach
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A AnnouncementTag filter for Package
+ *
+ * @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 PackageAnnouncementTagFilter extends BaseFilter implements FilterablePackage {
+ /**
+ * Constants for message data array
+ */
+ const MESSAGE_ARRAY_DATA = 'message_data';
+ const MESSAGE_ARRAY_TYPE = 'message_type';
+
+ /**
+ * Array with all data XML nodes (which hold the actual data) and their values
+ */
+ private $dataXmlNodes = array();
+
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+
+ // Init array
+ $this->dataXmlNodes = array(
+ XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_EXTERNAL_IP => '',
+ XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_NODE_STATUS => '',
+ XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_SESSION_ID => '',
+ XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_TCP_PORT => 9060,
+ XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_UDP_PORT => 9060
+ );
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public final static function createPackageAnnouncementTagFilter () {
+ // Get a new instance
+ $filterInstance = new PackageAnnouncementTagFilter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter with given request and response objects
+ *
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
+ * @return void
+ * @throws UnsupportedOperationException If this method is called, please use processMessage() instead!
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Please don't call this method
+ throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
+ }
+
+ /**
+ * Processes the given raw message content. The method renderXmlContent
+ * may throw (not the method itself) several exceptions:
+ *
+ * InvalidXmlNodeException - If an invalid XML node has been found (e.g.
+ * wrong/out-dated template used)
+ * XmlNodeMismatchException - Again might be caused by invalid XML node
+ * usage
+ * XmlParserException - If the XML message is damaged or not
+ * well-formed
+ *
+ * @param $messageContent Raw message content
+ * @param $packageInstance An instance of a Receivable class
+ * @return void
+ * @todo Exceptions from renderXmlContent() are currently unhandled
+ */
+ public function processMessage ($messageContent, Receivable $packageInstance) {
+ // Get a template instance from the factory
+ $templateInstance = XmlTemplateEngineFactory::createXmlTemplateEngineInstance('node_announcement_template_class');
+
+ // And render the XML content (aka message)
+ $templateInstance->renderXmlContent($messageContent);
+
+ /*
+ * The template system now stores all required data as 'general'
+ * variables, so simply get them. If there is an invalid XML node
+ * inside the message, the above method call will cause exceptions.
+ */
+ foreach ($this->dataXmlNodes as $key => $dummy) {
+ // Get the variable from template engine
+ $value = $templateInstance->readAnnouncementData($key);
+
+ /*
+ * If value is NULL, a variable hasn't been found. This could mean
+ * that *this* node is running an out-dated software or the other
+ * peer is using an out-dated announcement.xml template.
+ */
+ if (is_null($value)) {
+ // Output a warning
+ $this->debugOutput('ANNOUNCEMENT-TAG: Found not fully supported variable ' . $key . ' - skipping.');
+
+ // Skip this part, don't write NULLs to the array
+ continue;
+ } // END - if
+
+ // Debug message
+ $this->debugOutput('ANNOUNCEMENT-TAG: key=' . $key . ',value=' . $value);
+
+ // Set it now
+ $this->dataXmlNodes[$key] = $value;
+ } // END - foreach
+
+ // Construct an array for pushing it on next stack
+ $messageArray = array(
+ // Message data itself
+ self::MESSAGE_ARRAY_DATA => $this->dataXmlNodes,
+ // Message type (which is 'announcement')
+ self::MESSAGE_ARRAY_TYPE => 'announcement'
+ );
+
+ // Push the processed message back on stack
+ $packageInstance->getStackerInstance()->pushNamed(NetworkPackage::STACKER_NAME_PROCESSED_MESSAGE);
+ }
+}
+
+// [EOF]
+?>
$this->getFragmenterInstance()->resetSerialNumber();
// "Walk" through all (content) chunks
- foreach ($this->finalPackageChunks['content'] as $serialNumber=>$content) {
+ foreach ($this->finalPackageChunks['content'] as $serialNumber => $content) {
// Get next serial number
$nextSerial = $this->getFragmenterInstance()->getNextHexSerialNumber();
$this->rawPackageData = '';
// That went well, so start assembling all chunks
- foreach ($this->finalPackageChunks['content'] as $serialNumber=>$content) {
+ foreach ($this->finalPackageChunks['content'] as $serialNumber => $content) {
// Debug message
//* NOISY-DEBUG: */ $this->debugOutput('CHUNK-HANDLER: serialNumber=' . $serialNumber . ' - validating ...');
//* NOISY-DEBUG: */ $this->debugOutput('finalPackageChunks=' . print_r($this->finalPackageChunks,true) . 'chunkHashes=' . print_r($this->chunkHashes,true));
*/
const STACKER_NAME_DECODED_CHUNKED = 'package_chunked_decoded';
+ /**************************************************************************
+ * Stacker for incoming messages *
+ **************************************************************************/
+
/**
* Stacker name for new messages
*/
const STACKER_NAME_NEW_MESSAGE = 'package_new_message';
+ /**
+ * Stacker name for processed messages
+ */
+ const STACKER_NAME_PROCESSED_MESSAGE = 'package_processed_message';
+
/**************************************************************************
* Stacker for other/internal purposes *
**************************************************************************/
self::STACKER_NAME_DECODED_HANDLED,
self::STACKER_NAME_DECODED_CHUNKED,
self::STACKER_NAME_NEW_MESSAGE,
+ self::STACKER_NAME_PROCESSED_MESSAGE,
self::STACKER_NAME_BACK_BUFFER
) as $stackerName) {
// Init this stacker
* Handles newly arrived messages
*
* @return void
+ * @todo Implement verification of all sent tags here?
*/
public function handleNewlyArrivedMessage () {
// Get it from the stacker, it is the full array with the decoded message
$decodedContent = $this->getStackerInstance()->popNamed(self::STACKER_NAME_NEW_MESSAGE);
- die('decodedContent='.print_r($decodedContent,true));
+ // Now get a filter chain back from factory with given tags array
+ $chainInstance = PackageFilterChainFactory::createChainByTagsArray($decodedContent[self::PACKAGE_CONTENT_TAGS]);
+
+ /*
+ * Process the message through all filters, note that all other
+ * elements from $decodedContent are no longer needed.
+ */
+ $chainInstance->processMessage($decodedContent[self::PACKAGE_CONTENT_MESSAGE], $this);
}
}
$connectionInstance = NULL;
// Get all keys and check them
- foreach ($this->getInstanceRegistry() as $key=>$registryInstance) {
+ foreach ($this->getInstanceRegistry() as $key => $registryInstance) {
// This is always a SubRegistry instance
- foreach ($registryInstance->getInstanceRegistry() as $subKey=>$containerInstance) {
+ foreach ($registryInstance->getInstanceRegistry() as $subKey => $containerInstance) {
// This is a ConnectionContainer instance, so does the recipient match?
if ($containerInstance->ifAddressMatches($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT])) {
// Found one, so get the protocol instance and abort any further search
$protocolInstance = NULL;
// Get all keys and check them
- foreach ($this->getInstanceRegistry() as $key=>$registryInstance) {
+ foreach ($this->getInstanceRegistry() as $key => $registryInstance) {
// This is always a SubRegistry instance
- foreach ($registryInstance->getInstanceRegistry() as $subKey=>$containerInstance) {
+ foreach ($registryInstance->getInstanceRegistry() as $subKey => $containerInstance) {
// This is a SocketContainer instance, so does the recipient match?
if ($containerInstance->ifAddressMatches($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT])) {
// Found one, so get the protocol instance and abort any further search
public function executeTask () {
// Do we have something to handle?
if ($this->getPackageInstance()->isNewMessageArrived()) {
- // Okay, then handle newly arrived message
+ /*
+ * A fully "decoded" message has been received and added for being
+ * processed. Processing a message should not take long, so mostly
+ * this step involves reading all data through a XML template engine
+ * as "XML variables" from the content (which must be a well-formed
+ * XML) and then pushing it on the next stack "processed messages".
+ */
$this->getPackageInstance()->handleNewlyArrivedMessage();
} elseif ($this->getPackageInstance()->isIncomingDecodedDataHandled()) {
/*
- * We have handled decoded data so we should validate it, if we have
- * all chunks/fragments together, and assemble it into an abstract
- * network package.
+ * Incoming decoded data has been handled (see below) so it needs to
+ * be assembled back to a "package array". Please see NetworkPackage
+ * for further details (what array elements are required et cetera).
*/
$this->getPackageInstance()->assembleDecodedDataToPackage();
} elseif ($this->getPackageInstance()->isNewRawDataPending($this->getListenerPoolInstance())) {
- // We have to handle raw data from the socket
+ // Raw, decoded data has been received
$this->getPackageInstance()->handleIncomingDecodedData();
} elseif ($this->getPackageInstance()->ifAssemblerHasPendingDataLeft()) {
- // Okay, handle it here
+ // Handle any pending data from the package assembler
$this->getPackageInstance()->handleAssemblerPendingData();
} // END - if
}
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
class XmlAnnouncementTemplateEngine extends BaseTemplateEngine implements CompileableTemplate, Registerable {
+ /**
+ * Some XML nodes must be available for later data extraction
+ */
+ const ANNOUNCEMENT_DATA_EXTERNAL_IP = 'external-ip';
+ const ANNOUNCEMENT_DATA_NODE_STATUS = 'node-status';
+ const ANNOUNCEMENT_DATA_SESSION_ID = 'session-id';
+ const ANNOUNCEMENT_DATA_TCP_PORT = 'tcp-port';
+ const ANNOUNCEMENT_DATA_UDP_PORT = 'udp-port';
+
/**
* Main nodes in the XML tree
*/
/**
* Sub nodes in the XML tree
*/
- private $subNodes = array(
- 'announcement-data',
- 'listener',
- 'hub-listener',
- 'client-listener',
- 'node-status',
- 'tcp-port',
- 'udp-port',
- 'session-id',
- 'external-ip',
- 'object-type-list',
- );
+ private $subNodes = array();
/**
* Current main node
protected function __construct () {
// Call parent constructor
parent::__construct(__CLASS__);
+
+ // Init array
+ $this->subNodes = array(
+ 'announcement-data',
+ 'listener',
+ self::ANNOUNCEMENT_DATA_NODE_STATUS,
+ self::ANNOUNCEMENT_DATA_TCP_PORT,
+ self::ANNOUNCEMENT_DATA_UDP_PORT,
+ self::ANNOUNCEMENT_DATA_SESSION_ID,
+ self::ANNOUNCEMENT_DATA_EXTERNAL_IP,
+ 'object-type-list',
+ );
}
/**
} // END - if
}
+ /**
+ * Read announcement variables by calling readVariable() with 'general' as
+ * variable stack.
+ *
+ * @param $key Key to read from
+ * @return $value Value from variable
+ */
+ public function readAnnouncementData ($key) {
+ // Read the variable
+ $value = parent::readVariable($key, 'general');
+
+ // Return value
+ return $value;
+ }
+
/**
* Getter for cache file (FQFN)
*
*/
private function startNodeStatus () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement', 'node-status');
+ $this->getStackerInstance()->pushNamed('announcement', self::ANNOUNCEMENT_DATA_NODE_STATUS);
}
/**
$this->getStackerInstance()->pushNamed('announcement', 'listener');
}
- /**
- * Starts the client listener
- *
- * @return void
- */
- private function startClientListener () {
- // Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement', 'client-listener');
- }
-
- /**
- * Starts the hub listener
- *
- * @return void
- */
- private function startHubListener () {
- // Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement', 'hub-listener');
- }
-
/**
* Starts the TCP port
*
*/
private function startTcpPort () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement', 'tcp-port');
+ $this->getStackerInstance()->pushNamed('announcement', self::ANNOUNCEMENT_DATA_TCP_PORT);
}
/**
*/
private function startUdpPort () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement', 'udp-port');
+ $this->getStackerInstance()->pushNamed('announcement', self::ANNOUNCEMENT_DATA_UDP_PORT);
}
/**
*/
private function startSessionId () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement', 'session-id');
+ $this->getStackerInstance()->pushNamed('announcement', self::ANNOUNCEMENT_DATA_SESSION_ID);
}
/**
*/
private function startExternalIp () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement', 'external-ip');
+ $this->getStackerInstance()->pushNamed('announcement', self::ANNOUNCEMENT_DATA_EXTERNAL_IP);
}
/**
$this->getStackerInstance()->popNamed('announcement');
}
- /**
- * Finishes the hub listener
- *
- * @return void
- */
- private function finishHubListener () {
- // Pop the last entry
- $this->getStackerInstance()->popNamed('announcement');
- }
-
- /**
- * Finishes the client listener
- *
- * @return void
- */
- private function finishClientListener () {
- // Pop the last entry
- $this->getStackerInstance()->popNamed('announcement');
- }
-
/**
* Finishes the listener
*
./application/hub/main/filter/bootstrap/chat/class_ChatBootstrapGenericActivationFilter.php:54: * @todo Maybe we want to do somthing more here?
./application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrapBufferQueueInitializerFilter.php:54: * @todo 0% done
./application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrapGenericActivationFilter.php:54: * @todo Maybe we want to do somthing more here?
+./application/hub/main/filter/chains/class_PackageFilterChain.php:54: * @todo This may be slow if a message with a lot tags arrived
./application/hub/main/filter/chat/class_ChatInitializationFilter.php:54: * @todo 0% done
./application/hub/main/filter/chat/class_ChatPhpRequirementsFilter.php:55: * @todo Add more test and try to add an extra message to the thrown exception
./application/hub/main/filter/chat/class_ChatWelcomeTeaserFilter.php:55: * @todo Handle over the $responseInstance to outputConsoleTeaser()
./application/hub/main/filter/shutdown/node/class_NodeShutdownDeinitQueuesFilter.php:55: * @todo 0% done
./application/hub/main/filter/shutdown/node/class_NodeShutdownFlushNodeListFilter.php:55: * @todo 0% done
./application/hub/main/filter/shutdown/node/class_NodeShutdownTaskHandlerFilter.php:55: * @todo 0% done
+./application/hub/main/filter/tags/class_PackageAnnouncementTagFilter.php:95: * @todo Exceptions from renderXmlContent() are currently unhandled
./application/hub/main/filter/task/chat/class_ChatTaskHandlerInitializerFilter.php:55: * @todo 5% done
./application/hub/main/filter/task/cruncher/class_CruncherTaskHandlerInitializerFilter.php:55: * @todo 5% done
./application/hub/main/filter/task/node/class_NodeTaskHandlerInitializerFilter.php:55: * @todo Maybe some more tasks needs to be added?
./application/hub/main/nodes/regular/class_HubRegularNode.php:58: * @todo Implement this method
./application/hub/main/nodes/regular/class_HubRegularNode.php:68: * @todo Unfinished method
./application/hub/main/nodes/regular/class_HubRegularNode.php:91: // @TODO Add some filters here
+./application/hub/main/package/class_NetworkPackage.php:1060: * @todo Implement verification of all sent tags here?
./application/hub/main/package/class_NetworkPackage.php:23: * @todo Needs to add functionality for handling the object's type
-./application/hub/main/package/class_NetworkPackage.php:277: // @TODO crc32() is very weak, but it needs to be fast
-./application/hub/main/package/class_NetworkPackage.php:348: // @TODO crc32() is very weak, but it needs to be fast
-./application/hub/main/package/class_NetworkPackage.php:502: // @TODO We may want to do somthing more here?
-./application/hub/main/package/class_NetworkPackage.php:540: * @todo Unfinished area, signatures are currently NOT fully supported
-./application/hub/main/package/class_NetworkPackage.php:647: // @TODO Add some logging here
-./application/hub/main/package/class_NetworkPackage.php:779: // @TODO Add some logging here
-./application/hub/main/package/class_NetworkPackage.php:930: * @todo This may be enchanced for outgoing packages?
-./application/hub/main/package/class_NetworkPackage.php:961: * @todo Unsupported feature of "signed" messages commented out
+./application/hub/main/package/class_NetworkPackage.php:287: // @TODO crc32() is very weak, but it needs to be fast
+./application/hub/main/package/class_NetworkPackage.php:358: // @TODO crc32() is very weak, but it needs to be fast
+./application/hub/main/package/class_NetworkPackage.php:512: // @TODO We may want to do somthing more here?
+./application/hub/main/package/class_NetworkPackage.php:550: * @todo Unfinished area, signatures are currently NOT fully supported
+./application/hub/main/package/class_NetworkPackage.php:657: // @TODO Add some logging here
+./application/hub/main/package/class_NetworkPackage.php:789: // @TODO Add some logging here
+./application/hub/main/package/class_NetworkPackage.php:940: * @todo This may be enchanced for outgoing packages?
+./application/hub/main/package/class_NetworkPackage.php:971: * @todo Unsupported feature of "signed" messages commented out
./application/hub/main/package/fragmenter/class_PackageFragmenter.php:275: * @todo Implement a way to send non-announcement packages with extra-salt
./application/hub/main/package/fragmenter/class_PackageFragmenter.php:427: * @todo $helperInstance is unused
./application/hub/main/producer/cruncher/keys/class_CruncherKeyProducer.php:106: // @TODO Do something with it