* from given template instance and pushing it on the 'undeclared' stack.
*
* @param $helperInstance An instance of a HelpableHub class
- * @param $nodeInstance An instance of a NodeHelper class
* @return void
*/
- function enqueueRawDataFromTemplate (HelpableHub $helperInstance, NodeHelper $nodeInstance);
+ function enqueueRawDataFromTemplate (HelpableHub $helperInstance);
/**
* Checks whether a package has been enqueued for delivery.
return $this->assemblerInstance;
}
+ /**
+ * Setter for node id
+ *
+ * @param $nodeId Our new node id
+ * @return void
+ */
+ private final function setNodeId ($nodeId) {
+ // Set it config now
+ $this->getConfigInstance()->setConfigEntry('node_id', (string) $nodeId);
+ }
+
+ /**
+ * Getter for node id
+ *
+ * @return $nodeId Current node id
+ */
+ private final function getNodeId () {
+ // Get it from config
+ return $this->getConfigInstance()->getConfigEntry('node_id');
+ }
+
+ /**
+ * Setter for session id
+ *
+ * @param $sessionId Our new session id
+ * @return void
+ */
+ private final function setSessionId ($sessionId) {
+ $this->getConfigInstance()->setConfigEntry('session_id', (string) $sessionId);
+ }
+
+ /**
+ * Getter for session id
+ *
+ * @return $sessionId Current session id
+ */
+ public final function getSessionId () {
+ return $this->getConfigInstance()->getConfigEntry('session_id');
+ }
+
/**
* Constructs a callable method name from given socket error code. If the
* method is not found, a generic one is used.
$packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
// Next, feed the content in. The network package class is a pipe-through class.
- $packageInstance->enqueueRawDataFromTemplate($this, $nodeInstance);
+ $packageInstance->enqueueRawDataFromTemplate($this);
}
/**
$packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
// Next, feed the content in. The network package class is a pipe-through class.
- $packageInstance->enqueueRawDataFromTemplate($this, $nodeInstance);
+ $packageInstance->enqueueRawDataFromTemplate($this);
}
/**
NodeStateFactory::createNodeStateInstanceByName('init', $this);
}
- /**
- * Setter for node id
- *
- * @param $nodeId Our new node id
- * @return void
- */
- private final function setNodeId ($nodeId) {
- // Set it config now
- $this->getConfigInstance()->setConfigEntry('node_id', (string) $nodeId);
- }
-
- /**
- * Getter for node id
- *
- * @return $nodeId Current node id
- */
- private final function getNodeId () {
- // Get it from config
- return $this->getConfigInstance()->getConfigEntry('node_id');
- }
-
- /**
- * Setter for session id
- *
- * @param $sessionId Our new session id
- * @return void
- */
- private final function setSessionId ($sessionId) {
- $this->getConfigInstance()->setConfigEntry('session_id', (string) $sessionId);
- }
-
- /**
- * Getter for session id
- *
- * @return $sessionId Current session id
- */
- public final function getSessionId () {
- return $this->getConfigInstance()->getConfigEntry('session_id');
- }
-
/**
* Setter for query instance
*
* @param $helperInstance An instance of a HelpableHub class
* @param $nodeInstance An instance of a NodeHelper class
* @return $hash Hash for given package content
- * @todo $helperInstance is unused
*/
- private function getHashFromContent ($content, HelpableHub $helperInstance, NodeHelper $nodeInstance) {
+ private function getHashFromContent ($content) {
// Create the hash
// @TODO crc32() is very weak, but it needs to be fast
$hash = crc32(
$content .
self::PACKAGE_CHECKSUM_SEPARATOR .
- $nodeInstance->getSessionId() .
+ $this->getSessionId() .
self::PACKAGE_CHECKSUM_SEPARATOR .
$this->getCompressorInstance()->getCompressorExtension()
);
* from given template instance and pushing it on the 'undeclared' stack.
*
* @param $helperInstance An instance of a HelpableHub class
- * @param $nodeInstance An instance of a NodeHelper class
* @return void
*/
- public function enqueueRawDataFromTemplate (HelpableHub $helperInstance, NodeHelper $nodeInstance) {
+ public function enqueueRawDataFromTemplate (HelpableHub $helperInstance) {
// Get the raw content ...
$content = $helperInstance->getTemplateInstance()->getRawTemplateData();
// - separator
self::PACKAGE_MASK_SEPARATOR,
// 4.) Checksum
- $this->getHashFromContent($content, $helperInstance, $nodeInstance)
+ $this->getHashFromContent($content)
);
// Now prepare the temporary array and push it on the 'undeclared' stack
self::PACKAGE_DATA_RECIPIENT => $helperInstance->getRecipientType(),
self::PACKAGE_DATA_CONTENT => $content,
self::PACKAGE_DATA_STATUS => self::PACKAGE_STATUS_NEW,
- self::PACKAGE_DATA_SIGNATURE => $this->generatePackageSignature($content, $nodeInstance->getSessionId())
+ self::PACKAGE_DATA_SIGNATURE => $this->generatePackageSignature($content, $this->getSessionId())
));
}
* Also make sure the error code is SOCKET_ERROR_UNHANDLED because we
* only want to handle unhandled packages here.
*/
+ /* NOISY-DEBUG: */ $this->debugOutput('NETWORK-PACKAGE: errorCode=' . $decodedData[BaseRawDataHandler::PACKAGE_ERROR_CODE]);
assert($decodedData[BaseRawDataHandler::PACKAGE_ERROR_CODE] == BaseRawDataHandler::SOCKET_ERROR_UNHANDLED);
// Remove the last chunk SEPARATOR (because it is being added and we don't need it)
./application/hub/interfaces/helper/connections/class_ConnectionHelper.php:38: * @todo We may want to implement a filter for ease notification of other objects like our pool
./application/hub/interfaces/helper/messages/class_MessageHelper.php:10: * @todo Please find another name for this interface
./application/hub/interfaces/nodes/class_NodeHelper.php:10: * @todo We need to find a better name for this interface
-./application/hub/main/class_BaseHubSystem.php:400: // @TODO On some systems it is 134, on some 107?
+./application/hub/main/class_BaseHubSystem.php:440: // @TODO On some systems it is 134, on some 107?
./application/hub/main/commands/console/class_HubConsoleChatCommand.php:107: * @todo Should we add some more filters?
./application/hub/main/commands/console/class_HubConsoleChatCommand.php:58: * @todo Try to create a ChatActivationTask or so
./application/hub/main/commands/console/class_HubConsoleCruncherCommand.php:107: * @todo Should we add some more filters?
./application/hub/main/nodes/boot/class_HubBootNode.php:119: // @TODO Add some filters here
./application/hub/main/nodes/boot/class_HubBootNode.php:58: * @todo add some more special bootstrap things for this boot node
./application/hub/main/nodes/boot/class_HubBootNode.php:99: * @todo Unfinished method
-./application/hub/main/nodes/class_BaseHubNode.php:384: * @todo Try to make this method more generic so we can move it in BaseFrameworkSystem
-./application/hub/main/nodes/class_BaseHubNode.php:424: * @todo Change the first if() block to check for a specific state
-./application/hub/main/nodes/class_BaseHubNode.php:597: // @TODO Add some criteria, e.g. if the node is active or so
+./application/hub/main/nodes/class_BaseHubNode.php:344: * @todo Try to make this method more generic so we can move it in BaseFrameworkSystem
+./application/hub/main/nodes/class_BaseHubNode.php:384: * @todo Change the first if() block to check for a specific state
+./application/hub/main/nodes/class_BaseHubNode.php:557: // @TODO Add some criteria, e.g. if the node is active or so
./application/hub/main/nodes/list/class_HubListNode.php:58: * @todo Implement more bootstrap steps
./application/hub/main/nodes/list/class_HubListNode.php:68: * @todo Unfinished method
./application/hub/main/nodes/list/class_HubListNode.php:91: // @TODO Add some filters here
./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:23: * @todo Needs to add functionality for handling the object's type
-./application/hub/main/package/class_NetworkPackage.php:248: * @todo $helperInstance is unused
-./application/hub/main/package/class_NetworkPackage.php:252: // @TODO crc32() is very weak, but it needs to be fast
-./application/hub/main/package/class_NetworkPackage.php:434: // @TODO We may want to do somthing more here?
-./application/hub/main/package/class_NetworkPackage.php:562: // @TODO Add some logging here
-./application/hub/main/package/class_NetworkPackage.php:692: // @TODO Add some logging here
-./application/hub/main/package/class_NetworkPackage.php:812: // @TODO Add some content here
-./application/hub/main/package/class_NetworkPackage.php:851: * @todo This may be enchanced for outgoing packages?
+./application/hub/main/package/class_NetworkPackage.php:256: // @TODO crc32() is very weak, but it needs to be fast
+./application/hub/main/package/class_NetworkPackage.php:438: // @TODO We may want to do somthing more here?
+./application/hub/main/package/class_NetworkPackage.php:565: // @TODO Add some logging here
+./application/hub/main/package/class_NetworkPackage.php:695: // @TODO Add some logging here
+./application/hub/main/package/class_NetworkPackage.php:816: // @TODO Add some content here
+./application/hub/main/package/class_NetworkPackage.php:855: * @todo This may be enchanced for outgoing packages?
./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