]> git.mxchange.org Git - hub.git/commitdiff
WIP-continued:
authorRoland Häder <roland@mxchange.org>
Thu, 29 Oct 2020 17:16:02 +0000 (18:16 +0100)
committerRoland Häder <roland@mxchange.org>
Thu, 29 Oct 2020 17:16:02 +0000 (18:16 +0100)
- rewrites towards DeliverableMessage (not Package) interface

Signed-off-by: Roland Häder <roland@mxchange.org>
39 files changed:
application/hub/classes/chains/class_PackageFilterChain.php
application/hub/classes/database/frontend/node/class_NodeDistributedHashTableDatabaseWrapper.php
application/hub/classes/dht/node/class_NodeDhtFacade.php
application/hub/classes/filter/class_BaseHubFilter.php
application/hub/classes/filter/tags/answer/class_PackageAnnouncementAnswerTagFilter.php
application/hub/classes/filter/tags/answer/class_PackageDhtBootstrapAnswerTagFilter.php
application/hub/classes/filter/tags/answer/class_PackageRequestNodeListAnswerTagFilter.php
application/hub/classes/filter/tags/class_PackageAnnouncementTagFilter.php
application/hub/classes/filter/tags/class_PackageDhtBootstrapTagFilter.php
application/hub/classes/filter/tags/class_PackageRequestNodeListTagFilter.php
application/hub/classes/filter/tags/class_PackageSelfConnectTagFilter.php
application/hub/classes/handler/data/answer-status/announcement/class_NodeAnnouncementAnswerOkayHandler.php
application/hub/classes/handler/data/answer-status/requests/class_RequestNodeListAnswerOkayHandler.php
application/hub/classes/handler/data/class_BaseDataHandler.php
application/hub/classes/handler/data/message-types/announcement/class_NodeMessageAnnouncementHandler.php
application/hub/classes/handler/data/message-types/answer/class_NodeMessageAnnouncementAnswerHandler.php
application/hub/classes/handler/data/message-types/answer/class_NodeMessageDhtBootstrapAnswerHandler.php
application/hub/classes/handler/data/message-types/answer/class_NodeMessageRequestNodeListAnswerHandler.php
application/hub/classes/handler/data/message-types/class_BaseMessageHandler.php
application/hub/classes/handler/data/message-types/dht/class_NodeMessageDhtBootstrapHandler.php
application/hub/classes/handler/data/message-types/requests/class_NodeMessageRequestNodeListHandler.php
application/hub/classes/handler/data/message-types/self-connect/class_NodeMessageSelfConnectHandler.php
application/hub/classes/handler/package/class_NetworkPackageHandler.php
application/hub/classes/helper/node/answer/announcement/class_NodeAnnouncementMessageAnswerHelper.php
application/hub/classes/helper/node/answer/class_BaseHubAnswerHelper.php
application/hub/classes/helper/node/answer/dht/class_NodeDhtBootstrapMessageAnswerHelper.php
application/hub/classes/helper/node/answer/requests/class_NodeRequestNodeListMessageAnswerHelper.php
application/hub/classes/nodes/class_BaseHubNode.php
application/hub/interfaces/database/frontend/class_NodeDhtWrapper.php
application/hub/interfaces/delivery/messages/.htaccess [new file with mode: 0644]
application/hub/interfaces/delivery/messages/class_DeliverableMessage.php [new file with mode: 0644]
application/hub/interfaces/distributable/node/class_DistributableNode.php
application/hub/interfaces/filter/class_FilterablePackage.php
application/hub/interfaces/handler/answer-status/class_HandleableAnswerStatus.php
application/hub/interfaces/handler/message-types/class_HandleableMessage.php
application/hub/interfaces/messages/.htaccess [deleted file]
application/hub/interfaces/nodes/class_Node.php
application/hub/interfaces/receiver/class_Receivable.php
core

index 00909698d6b855bd09ca4542ecd75b8ad56bb46b..eda0e0ab9730292596b043665bad43b070f3bc44 100644 (file)
@@ -62,7 +62,7 @@ class PackageFilterChain extends FilterChain {
         * @return      void
         * @todo        This may be slow if a message with a lot tags arrived
         */
-       public function processMessage (array $messageData, Receivable $packageInstance) {
+       public function processMessage (DeliverableMessage $messageInstance, Receivable $packageInstance) {
                // Get all filters and "run" them
                foreach ($this->getFilters() as $filterInstance) {
                        // Try to process it
index 55d52a8e63e86874c80f2491b05537daa3d59bdc..cc4b9f4a97e8a9246bcf35960bc1a6aadef7b65b 100644 (file)
@@ -355,7 +355,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
         * @param       $handlerInstance        An instance of a HandleableDataSet class
         * @return      void
         */
-       public function registerNodeByMessageData (array $messageData, HandleableDataSet $handlerInstance) {
+       public function registerNodeByMessageInstance (DeliverableMessage $messageInstance, HandleableDataSet $handlerInstance) {
                // Debug message
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: handlerInstance=' . $handlerInstance->__toString() . ' - CALLED!');
 
@@ -386,7 +386,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseHubDatabaseWrapper imp
         * @param       $searchInstance         An instance of LocalSearchCriteria class
         * @return      void
         */
-       public function updateNodeByMessageData (array $messageData, HandleableDataSet $handlerInstance, LocalSearchCriteria $searchInstance) {
+       public function updateNodeByMessageInstance (DeliverableMessage $messageInstance, HandleableDataSet $handlerInstance, LocalSearchCriteria $searchInstance) {
                // Debug message
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-WRAPPER: CALLED!');
 
index 5e17db99aeca3c464e92c595223cf89b20c375c5..9f73914357adcad01f7ebd85853a7fe8994c7f72 100644 (file)
@@ -237,7 +237,7 @@ class NodeDhtFacade extends BaseDht implements DistributableNode, Registerable {
         * @return      void
         * @throws      NodeSessionIdVerficationException       If the node was not found and update is forced
         */
-       public function registerNodeByMessageData (array $messageData, HandleableDataSet $handlerInstance, $forceUpdate = FALSE) {
+       public function registerNodeByMessageInstance (DeliverableMessage $messageInstance, HandleableDataSet $handlerInstance, $forceUpdate = FALSE) {
                // Get a search criteria class
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NODE-DHT-FACADE: state=%s,messageData()=%d,handlerInstance=%s,forceUpdate=%d - CALLED', $this->getPrintableState(), count($messageData), $handlerInstance->__toString(), intval($forceUpdate)));
                $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
@@ -266,10 +266,10 @@ class NodeDhtFacade extends BaseDht implements DistributableNode, Registerable {
                // Is there already an entry?
                if ($resultInstance->valid()) {
                        // Entry found, so update it
-                       $this->getWrapperInstance()->updateNodeByMessageData($messageData, $handlerInstance, $searchInstance);
+                       $this->getWrapperInstance()->updateNodeByMessageInstance($messageData, $handlerInstance, $searchInstance);
                } elseif ($forceUpdate === FALSE) {
                        // Nothing found, so register it
-                       $this->getWrapperInstance()->registerNodeByMessageData($messageData, $handlerInstance);
+                       $this->getWrapperInstance()->registerNodeByMessageInstance($messageData, $handlerInstance);
                } else {
                        /*
                         * Do not register non-existent nodes here. This is maybe fatal,
@@ -293,7 +293,7 @@ class NodeDhtFacade extends BaseDht implements DistributableNode, Registerable {
         * @param       $separator                      Sepator char (1st parameter for explode() call)
         * @return      $nodeList                       An array with all found nodes
         */
-       public function queryLocalNodeListExceptByMessageData (array $messageData, HandleableDataSet $handlerInstance, $excludeKey, $andKey, $separator) {
+       public function queryLocalNodeListExceptByMessageInstance (DeliverableMessage $messageInstance, HandleableDataSet $handlerInstance, $excludeKey, $andKey, $separator) {
                // Make sure both keys are there
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NODE-DHT-FACADE: messageData()=%d,handlerInstance=%s,excludeKey=%s,andKey=%s,separator=%s - CALLED!', count($messageData), $handlerInstance->__toString(), $excludeKey, $andKey, $separator));
                assert((isset($messageData[$excludeKey])) && (isset($messageData[$andKey])));
@@ -359,7 +359,7 @@ class NodeDhtFacade extends BaseDht implements DistributableNode, Registerable {
        /**
         * Inserts given node list array (from earlier database result produced by
         * an other node) into the DHT. This array origins from above method
-        * queryLocalNodeListExceptByMessageData().
+        * queryLocalNodeListExceptByMessageInstance().
         *
         * @param       $nodeList       An array from an earlier database result instance
         * @return      void
index 6ba29c1defef6dfac1ff7480b148672171df935c..9bd3f7acfcd73bda0390e1f8efc18f6b335043f9 100644 (file)
@@ -66,7 +66,7 @@ abstract class BaseHubFilter extends BaseFilter {
         * @return      void
         * @todo        Exceptions from renderXmlContent() are currently unhandled
         */
-       protected function genericProcessMessage ($messageType, array $messageData, Receivable $packageInstance) {
+       protected function genericProcessMessage ($messageType, DeliverableMessage $messageInstance, Receivable $packageInstance) {
                // Make sure the wanted element is there
                assert(isset($messageData[NetworkPackageHandler::PACKAGE_CONTENT_MESSAGE]));
                assert(isset($messageData[NetworkPackageHandler::PACKAGE_CONTENT_SENDER]));
index dde919815cbbb30f2044d674e4eca6786f0cdd97..20b3587aed2f51cdedf91533f2cd24a6d3224c1a 100644 (file)
@@ -92,7 +92,7 @@ class PackageAnnouncementAnswerTagFilter extends BaseNodeFilter implements Filte
         * @param       $packageInstance        An instance of a Receivable class
         * @return      void
         */
-       public function processMessage (array $messageData, Receivable $packageInstance) {
+       public function processMessage (DeliverableMessage $messageInstance, Receivable $packageInstance) {
                // Process message in generic way
                $this->genericProcessMessage('announcement_answer', $messageData, $packageInstance);
        }
index e64ccceb776cb99dd8dbc21e2184e8b23f8f4bc3..e10aec193ca14677aed6deee9460d3475c1d9c92 100644 (file)
@@ -89,7 +89,7 @@ class PackageDhtBootstrapAnswerTagFilter extends BaseNodeFilter implements Filte
         * @param       $packageInstance        An instance of a Receivable class
         * @return      void
         */
-       public function processMessage (array $messageData, Receivable $packageInstance) {
+       public function processMessage (DeliverableMessage $messageInstance, Receivable $packageInstance) {
                // Process message in generic way
                $this->genericProcessMessage('dht_bootstrap_answer', $messageData, $packageInstance);
        }
index 3048133041120e9a47c665db3de11f3a00a6bd2a..27d5645288b87d18f8b9f3a9c392a605352eeeea 100644 (file)
@@ -89,7 +89,7 @@ class PackageRequestNodeListAnswerTagFilter extends BaseNodeFilter implements Fi
         * @param       $packageInstance        An instance of a Receivable class
         * @return      void
         */
-       public function processMessage (array $messageData, Receivable $packageInstance) {
+       public function processMessage (DeliverableMessage $messageInstance, Receivable $packageInstance) {
                // Process message in generic way
                $this->genericProcessMessage('request_node_list_answer', $messageData, $packageInstance);
        }
index 3427c0fc4fdfdf9ce7308edd70fcb87c317a4e42..a6e28e2663783e5a2c720336bdbf4beb832f05cd 100644 (file)
@@ -98,7 +98,7 @@ class PackageAnnouncementTagFilter extends BaseNodeFilter implements FilterableP
         * @param       $packageInstance        An instance of a Receivable class
         * @return      void
         */
-       public function processMessage (array $messageData, Receivable $packageInstance) {
+       public function processMessage (DeliverableMessage $messageInstance, Receivable $packageInstance) {
                // Process message generic
                $this->genericProcessMessage('announcement', $messageData, $packageInstance);
        }
index 300dbb43cf431c7bc956c1991a64ace1c5170a3d..22829a6dac8df7954cc8052d64d95cb896da283f 100644 (file)
@@ -97,7 +97,7 @@ class PackageDhtBootstrapTagFilter extends BaseNodeFilter implements FilterableP
         * @param       $packageInstance        An instance of a Receivable class
         * @return      void
         */
-       public function processMessage (array $messageData, Receivable $packageInstance) {
+       public function processMessage (DeliverableMessage $messageInstance, Receivable $packageInstance) {
                // Process message generic
                $this->genericProcessMessage('dht_bootstrap', $messageData, $packageInstance);
        }
index 7aa05897daed9938282ce58617ac407b7e2edc2c..62fd58ab72ca56c80c39d68599743c572a091689 100644 (file)
@@ -86,7 +86,7 @@ class PackageRequestNodeListTagFilter extends BaseNodeFilter implements Filterab
         * @param       $packageInstance        An instance of a Receivable class
         * @return      void
         */
-       public function processMessage (array $messageData, Receivable $packageInstance) {
+       public function processMessage (DeliverableMessage $messageInstance, Receivable $packageInstance) {
                // Process messasge generic
                $this->genericProcessMessage('request_node_list', $messageData, $packageInstance);
        }
index 855ea0dd3cbdfcfd3118b541b905a6af63c45961..32649f8192ca2d9f40f527b27e7977a56c234bde 100644 (file)
@@ -95,7 +95,7 @@ class PackageSelfConnectTagFilter extends BaseNodeFilter implements FilterablePa
         * @param       $packageInstance        An instance of a Receivable class
         * @return      void
         */
-       public function processMessage (array $messageData, Receivable $packageInstance) {
+       public function processMessage (DeliverableMessage $messageInstance, Receivable $packageInstance) {
                // Process generic
                $this->genericProcessMessage(Tagable::TAG_SELF_CONNECT, $messageData, $packageInstance);
        }
index fb926640ea6153d0842dd27729081d43d487fe9d..097b0c30d0dd8e43c4d9c94ff63ad6fff82bb080 100644 (file)
@@ -78,12 +78,12 @@ class NodeAnnouncementAnswerOkayHandler extends BaseAnswerStatusHandler implemen
         * @return      void
         * @todo        Do some more here: Handle karma, et cetera?
         */
-       public function handleAnswerMessageData (array $messageData, Receivable $packageInstance) {
+       public function handleAnswerMessageData (DeliverableMessage $messageInstance, Receivable $packageInstance) {
                /*
                 * Query DHT and force update (which will throw an exception if the
                 * node is not found).
                 */
-               DhtObjectFactory::createDhtInstance('node')->registerNodeByMessageData($messageData, $this, TRUE);
+               DhtObjectFactory::createDhtInstance('node')->registerNodeByMessageInstance($messageData, $this, TRUE);
 
                // Get handler instance
                $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler');
@@ -123,7 +123,7 @@ class NodeAnnouncementAnswerOkayHandler extends BaseAnswerStatusHandler implemen
         * @param       $messageData    An array with all message data
         * @return      void
         */
-       protected function initMessageConfigurationData (array $messageData) {
+       protected function initMessageConfigurationData (DeliverableMessage $messageInstance) {
                // Get node instance
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-MESSAGE-HANDLER: Creating node instance ...');
                $nodeInstance = NodeObjectFactory::createNodeInstance();
@@ -142,7 +142,7 @@ class NodeAnnouncementAnswerOkayHandler extends BaseAnswerStatusHandler implemen
         * @param       $messageData    An array with all message data
         * @return      void
         */
-       protected function removeMessageConfigurationData (array $messageData) {
+       protected function removeMessageConfigurationData (DeliverableMessage $messageInstance) {
                // Remove temporay configuration
                $this->getConfigInstance()->unsetConfigEntry(NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_ACCEPTED_OBJECTS);
        }
index f599cd2e1d211a5842fc77c39f2455086c74d55e..e573ad4ca7878ccffda85c23b5279d80b633604f 100644 (file)
@@ -74,7 +74,7 @@ class RequestNodeListAnswerOkayHandler extends BaseAnswerStatusHandler implement
         * @throws      NodeSessionIdVerficationException       If the provided session id is not matching
         * @todo        Do some more here: Handle karma, et cetera?
         */
-       public function handleAnswerMessageData (array $messageData, Receivable $packageInstance) {
+       public function handleAnswerMessageData (DeliverableMessage $messageInstance, Receivable $packageInstance) {
                // Make sure node-list is found in array
                assert(isset($messageData[XmlRequestNodeListAnswerTemplateEngine::REQUEST_DATA_NODE_LIST]));
 
@@ -94,7 +94,7 @@ class RequestNodeListAnswerOkayHandler extends BaseAnswerStatusHandler implement
                 * Query DHT and force update (which will throw an exception if the
                 * node is not found).
                 */
-               DhtObjectFactory::createDhtInstance('node')->registerNodeByMessageData($messageData, $this, TRUE);
+               DhtObjectFactory::createDhtInstance('node')->registerNodeByMessageInstance($messageData, $this, TRUE);
 
                // Prepare next message ("hello" message to all returned nodes)
                //$this->prepareNextMessage($messageData, $packageInstance);
@@ -114,7 +114,7 @@ class RequestNodeListAnswerOkayHandler extends BaseAnswerStatusHandler implement
         * @return      void
         * @todo        0% done
         */
-       protected function initMessageConfigurationData (array $messageData) {
+       protected function initMessageConfigurationData (DeliverableMessage $messageInstance) {
                $this->partialStub('Please implement this method.');
        }
 
@@ -126,7 +126,7 @@ class RequestNodeListAnswerOkayHandler extends BaseAnswerStatusHandler implement
         * @return      void
         * @todo        0% done
         */
-       protected function removeMessageConfigurationData (array $messageData) {
+       protected function removeMessageConfigurationData (DeliverableMessage $messageInstance) {
                $this->partialStub('Please implement this method.');
        }
 }
index 380c9439e61c92d7039164b88634866a9ca65f8a..75bffb7076dcd630d67d2ec4ad35e96c57817b12 100644 (file)
@@ -107,7 +107,7 @@ abstract class BaseDataHandler extends BaseHubHandler implements HubInterface {
         * @param       $packageInstance        An instance of a Deliverable instance
         * @return      void
         */
-       protected function prepareAnswerMessage (array $messageData, Deliverable $packageInstance) {
+       protected function prepareAnswerMessage (DeliverableMessage $messageInstance, Deliverable $packageInstance) {
                // Debug message
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-DATA-HANDLER:Going to send an answer message for ' . $this->getHandlerName() . ' ...');
 
@@ -150,7 +150,7 @@ abstract class BaseDataHandler extends BaseHubHandler implements HubInterface {
         * @param       $packageInstance        An instance of a Deliverable instance
         * @return      void
         */
-       protected function prepareNextMessage (array $messageData, Deliverable $packageInstance) {
+       protected function prepareNextMessage (DeliverableMessage $messageInstance, Deliverable $packageInstance) {
                // Debug message
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-DATA-HANDLER:Going to send next message ...');
 
@@ -191,7 +191,7 @@ abstract class BaseDataHandler extends BaseHubHandler implements HubInterface {
         * @param       $messageData    An array with all message data
         * @return      void
         */
-       abstract protected function initMessageConfigurationData (array $messageData);
+       abstract protected function initMessageConfigurationData (DeliverableMessage $messageInstance);
 
        /**
         * Removes configuration data with given message data array from global
@@ -200,6 +200,6 @@ abstract class BaseDataHandler extends BaseHubHandler implements HubInterface {
         * @param       $messageData    An array with all message data
         * @return      void
         */
-       abstract protected function removeMessageConfigurationData (array $messageData);
+       abstract protected function removeMessageConfigurationData (DeliverableMessage $messageInstance);
 
 }
index b2454547845182caa877954c426230d2d68e056a..300ac897012e4f245e09a5187361ce8c6be26867 100644 (file)
@@ -107,7 +107,7 @@ class NodeMessageAnnouncementHandler extends BaseMessageHandler implements Handl
         * @return      void
         * @throws      AnnouncementNotAcceptedException        If this node does not accept announcements
         */
-       public function handleMessageData (array $messageData, Receivable $packageInstance) {
+       public function handleMessageData (DeliverableMessage $messageInstance, Receivable $packageInstance) {
                // Get node instance
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-MESSAGE-HANDLER: Creating node instance ...');
                $nodeInstance = NodeObjectFactory::createNodeInstance();
@@ -122,7 +122,7 @@ class NodeMessageAnnouncementHandler extends BaseMessageHandler implements Handl
                } // END - if
 
                // Register the announcing node with this node
-               $this->registerNodeByMessageData($messageData);
+               $this->registerNodeByMessageInstance($messageData);
 
                // Prepare answer message to be delivered back to the other node
                $this->prepareAnswerMessage($messageData, $packageInstance);
@@ -135,7 +135,7 @@ class NodeMessageAnnouncementHandler extends BaseMessageHandler implements Handl
         * @param       $messageData            An array with all message data
         * @return      void
         */
-       public function addArrayToDataSet (StoreableCriteria $dataSetInstance, array $messageData) {
+       public function addArrayToDataSet (StoreableCriteria $dataSetInstance, DeliverableMessage $messageInstance) {
                // Add generic first
                parent::addArrayToDataSet($dataSetInstance, $messageData);
 
@@ -156,7 +156,7 @@ class NodeMessageAnnouncementHandler extends BaseMessageHandler implements Handl
         * @param       $messageData    An array with all message data
         * @return      void
         */
-       protected function initMessageConfigurationData (array $messageData) {
+       protected function initMessageConfigurationData (DeliverableMessage $messageInstance) {
                // Debug message
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('ANNOUNCEMENT-HANDLER: messageData=' . print_r($messageData, TRUE));
 
@@ -192,7 +192,7 @@ class NodeMessageAnnouncementHandler extends BaseMessageHandler implements Handl
         * @param       $messageData    An array with all message data
         * @return      void
         */
-       protected function removeMessageConfigurationData (array $messageData) {
+       protected function removeMessageConfigurationData (DeliverableMessage $messageInstance) {
                // "Walk" throught the translation array again
                foreach ($this->messageToConfig as $dummy => $configKey) {
                        // Now unset this configuration entry (to save some memory)
index 272f70a088d0f61f22e9353aca0142d1787cb5b0..6b0413e913533470eb7dd85cd3b0dbc81fe5ec7a 100644 (file)
@@ -109,7 +109,7 @@ class NodeMessageAnnouncementAnswerHandler extends BaseMessageHandler implements
         * @return      void
         * @throws      NoAnnouncementAttemptedException        If this node has not attempted to announce itself
         */
-       public function handleMessageData (array $messageData, Receivable $packageInstance) {
+       public function handleMessageData (DeliverableMessage $messageInstance, Receivable $packageInstance) {
                // Get node instance
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-MESSAGE-HANDLER: Creating node instance ...');
                $nodeInstance = NodeObjectFactory::createNodeInstance();
@@ -124,10 +124,10 @@ class NodeMessageAnnouncementAnswerHandler extends BaseMessageHandler implements
                } // END - if
 
                // Register the announcing node with this node
-               $this->registerNodeByMessageData($messageData);
+               $this->registerNodeByMessageInstance($messageData);
 
                // Handle the answer status element
-               $nodeInstance->handleAnswerStatusByMessageData($messageData, $packageInstance);
+               $nodeInstance->handleAnswerStatusByMessageInstance($messageData, $packageInstance);
        }
 
        /**
@@ -137,7 +137,7 @@ class NodeMessageAnnouncementAnswerHandler extends BaseMessageHandler implements
         * @param       $messageData            An array with all message data
         * @return      void
         */
-       public function addArrayToDataSet (StoreableCriteria $dataSetInstance, array $messageData) {
+       public function addArrayToDataSet (StoreableCriteria $dataSetInstance, DeliverableMessage $messageInstance) {
                // Add generic first
                parent::addArrayToDataSet($dataSetInstance, $messageData);
 
@@ -161,7 +161,7 @@ class NodeMessageAnnouncementAnswerHandler extends BaseMessageHandler implements
         * @return      void
         * @throws      UnsupportedOperationException   If this method is called
         */
-       protected function initMessageConfigurationData (array $messageData) {
+       protected function initMessageConfigurationData (DeliverableMessage $messageInstance) {
                // Please don't call this method
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
@@ -174,7 +174,7 @@ class NodeMessageAnnouncementAnswerHandler extends BaseMessageHandler implements
         * @return      void
         * @throws      UnsupportedOperationException   If this method is called
         */
-       protected function removeMessageConfigurationData (array $messageData) {
+       protected function removeMessageConfigurationData (DeliverableMessage $messageInstance) {
                // Please don't call this method
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
index 3ec90a8bf67e620c50ae0bf16a7664c484881c24..856de438f23ba4ab01e77f9879fd17045464900d 100644 (file)
@@ -107,7 +107,7 @@ class NodeMessageDhtBootstrapAnswerHandler extends BaseMessageHandler implements
         * @throws      NoDhtBootstrapAttemptedException        If this DHT has not attempted to bootstrap
         * @todo        ~30% done
         */
-       public function handleMessageData (array $messageData, Receivable $packageInstance) {
+       public function handleMessageData (DeliverableMessage $messageInstance, Receivable $packageInstance) {
                // Get DHT instance
                $dhtInstance = DhtObjectFactory::createDhtInstance('node');
 
@@ -131,7 +131,7 @@ class NodeMessageDhtBootstrapAnswerHandler extends BaseMessageHandler implements
         * @param       $messageData            An array with all message data
         * @return      void
         */
-       public function addArrayToDataSet (StoreableCriteria $dataSetInstance, array $messageData) {
+       public function addArrayToDataSet (StoreableCriteria $dataSetInstance, DeliverableMessage $messageInstance) {
                // Add generic first
                parent::addArrayToDataSet($dataSetInstance, $messageData);
 
@@ -155,7 +155,7 @@ class NodeMessageDhtBootstrapAnswerHandler extends BaseMessageHandler implements
         * @return      void
         * @throws      UnsupportedOperationException   If this method is called
         */
-       protected function initMessageConfigurationData (array $messageData) {
+       protected function initMessageConfigurationData (DeliverableMessage $messageInstance) {
                // Please don't call this method
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
@@ -168,7 +168,7 @@ class NodeMessageDhtBootstrapAnswerHandler extends BaseMessageHandler implements
         * @return      void
         * @throws      UnsupportedOperationException   If this method is called
         */
-       protected function removeMessageConfigurationData (array $messageData) {
+       protected function removeMessageConfigurationData (DeliverableMessage $messageInstance) {
                // Please don't call this method
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
index bf552b046da06062c2b3d90c7f2f66dceee95adb..8cfaacb3ab699bde5cd4eb20c89681b7c030ba07 100644 (file)
@@ -92,7 +92,7 @@ class NodeMessageRequestNodeListAnswerHandler extends BaseMessageHandler impleme
         * @return      void
         * @throws      NoRequestNodeListAttemptedException     If this node has not attempted to announce itself
         */
-       public function handleMessageData (array $messageData, Receivable $packageInstance) {
+       public function handleMessageData (DeliverableMessage $messageInstance, Receivable $packageInstance) {
                // Get node instance
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-MESSAGE-HANDLER: Creating node instance ...');
                $nodeInstance = NodeObjectFactory::createNodeInstance();
@@ -107,10 +107,10 @@ class NodeMessageRequestNodeListAnswerHandler extends BaseMessageHandler impleme
                } // END - if
 
                // Register the announcing node with this node
-               $this->registerNodeByMessageData($messageData);
+               $this->registerNodeByMessageInstance($messageData);
 
                // Handle the answer status element
-               $nodeInstance->handleAnswerStatusByMessageData($messageData, $packageInstance);
+               $nodeInstance->handleAnswerStatusByMessageInstance($messageData, $packageInstance);
        }
 
        /**
@@ -120,7 +120,7 @@ class NodeMessageRequestNodeListAnswerHandler extends BaseMessageHandler impleme
         * @param       $messageData            An array with all message data
         * @return      void
         */
-       public function addArrayToDataSet (StoreableCriteria $dataSetInstance, array $messageData) {
+       public function addArrayToDataSet (StoreableCriteria $dataSetInstance, DeliverableMessage $messageInstance) {
                // Add generic first
                parent::addArrayToDataSet($dataSetInstance, $messageData);
 
@@ -150,7 +150,7 @@ class NodeMessageRequestNodeListAnswerHandler extends BaseMessageHandler impleme
         * @return      void
         * @throws      UnsupportedOperationException   If this method is called
         */
-       protected function initMessageConfigurationData (array $messageData) {
+       protected function initMessageConfigurationData (DeliverableMessage $messageInstance) {
                // Please don't call this method
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
@@ -163,7 +163,7 @@ class NodeMessageRequestNodeListAnswerHandler extends BaseMessageHandler impleme
         * @return      void
         * @throws      UnsupportedOperationException   If this method is called
         */
-       protected function removeMessageConfigurationData (array $messageData) {
+       protected function removeMessageConfigurationData (DeliverableMessage $messageInstance) {
                // Please don't call this method
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
index cc2f962ac8afb320a829ad843920be70f329ed07..e6c451171f9d029ca01470b2211ce81c53f453aa 100644 (file)
@@ -76,12 +76,12 @@ abstract class BaseMessageHandler extends BaseDataHandler {
         * @param       $messageArray   An array with all minimum message data
         * @return      void
         */
-       protected function registerNodeByMessageData (array $messageData) {
+       protected function registerNodeByMessageInstance (DeliverableMessage $messageInstance) {
                // Check if searchData has entries
                assert(count($this->getSearchData()) > 0);
 
                // Let the DHT facade do the work
-               DhtObjectFactory::createDhtInstance('node')->registerNodeByMessageData($messageData, $this);
+               DhtObjectFactory::createDhtInstance('node')->registerNodeByMessageInstance($messageData, $this);
        }
 
        /**
@@ -91,7 +91,7 @@ abstract class BaseMessageHandler extends BaseDataHandler {
         * @param       $packageInstance        An instance of a Receivable class
         * @return      void
         */
-       public function postHandleMessageData (array $messageData, Receivable $packageInstance) {
+       public function postHandleMessageData (DeliverableMessage $messageInstance, Receivable $packageInstance) {
                /*
                 * Feed hash to miner by handling over the whole array as also the
                 * sender and tags are needed.
index 266699eed51946cbbe7bd7cf11301c76b22a031f..9c1a4b47363e9ba83e3d5874a1237b1669534baf 100644 (file)
@@ -102,7 +102,7 @@ class NodeMessageDhtBootstrapHandler extends BaseMessageHandler implements Handl
         * @return      void
         * @throws      DhtBootstrapNotAcceptedException        If this node does not accept DHT bootstrap requests
         */
-       public function handleMessageData (array $messageData, Receivable $packageInstance) {
+       public function handleMessageData (DeliverableMessage $messageInstance, Receivable $packageInstance) {
                // Is this node accepting DHT bootstrap requests?
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-MESSAGE-HANDLER: Creating node instance ...');
                if (!NodeObjectFactory::createNodeInstance()->isAcceptingDhtBootstrap()) {
@@ -113,7 +113,7 @@ class NodeMessageDhtBootstrapHandler extends BaseMessageHandler implements Handl
                } // END - if
 
                // Register the DHT bootstrap requesting node with this node
-               $this->registerNodeByMessageData($messageData);
+               $this->registerNodeByMessageInstance($messageData);
 
                // Prepare answer message to be delivered back to the other node
                $this->prepareAnswerMessage($messageData, $packageInstance);
@@ -126,7 +126,7 @@ class NodeMessageDhtBootstrapHandler extends BaseMessageHandler implements Handl
         * @param       $messageData            An array with all message data
         * @return      void
         */
-       public function addArrayToDataSet (StoreableCriteria $dataSetInstance, array $messageData) {
+       public function addArrayToDataSet (StoreableCriteria $dataSetInstance, DeliverableMessage $messageInstance) {
                // Add generic first
                parent::addArrayToDataSet($dataSetInstance, $messageData);
 
@@ -146,7 +146,7 @@ class NodeMessageDhtBootstrapHandler extends BaseMessageHandler implements Handl
         * @param       $messageData    An array with all message data
         * @return      void
         */
-       protected function initMessageConfigurationData (array $messageData) {
+       protected function initMessageConfigurationData (DeliverableMessage $messageInstance) {
                // Debug message
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-BOOTSTRAP-HANDLER: messageData=' . print_r($messageData, TRUE));
 
@@ -196,7 +196,7 @@ class NodeMessageDhtBootstrapHandler extends BaseMessageHandler implements Handl
         * @param       $messageData    An array with all message data
         * @return      void
         */
-       protected function removeMessageConfigurationData (array $messageData) {
+       protected function removeMessageConfigurationData (DeliverableMessage $messageInstance) {
                // "Walk" throught the translation array again
                foreach ($this->messageToConfig as $dummy => $configKey) {
                        // Now unset this configuration entry (to save some memory)
index c01178a7d5d91dece976643bdcc3040227c1a30b..0f7624d2e4ec9a6a95cb8eb03210f1a391bf3840 100644 (file)
@@ -87,7 +87,7 @@ class NodeMessageRequestNodeListHandler extends BaseMessageHandler implements Ha
         * @return      void
         * @throws      RequestNotAcceptedException             If this node does not accept this request
         */
-       public function handleMessageData (array $messageData, Receivable $packageInstance) {
+       public function handleMessageData (DeliverableMessage $messageInstance, Receivable $packageInstance) {
                // Get node instance
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-MESSAGE-HANDLER: Creating node instance ...');
                $nodeInstance = NodeObjectFactory::createNodeInstance();
@@ -102,7 +102,7 @@ class NodeMessageRequestNodeListHandler extends BaseMessageHandler implements Ha
                } // END - if
 
                // Register the announcing node with this node
-               $this->registerNodeByMessageData($messageData);
+               $this->registerNodeByMessageInstance($messageData);
 
                // Prepare answer message to be delivered back to the other node
                $this->prepareAnswerMessage($messageData, $packageInstance);
@@ -115,7 +115,7 @@ class NodeMessageRequestNodeListHandler extends BaseMessageHandler implements Ha
         * @param       $messageData            An array with all message data
         * @return      void
         */
-       public function addArrayToDataSet (StoreableCriteria $dataSetInstance, array $messageData) {
+       public function addArrayToDataSet (StoreableCriteria $dataSetInstance, DeliverableMessage $messageInstance) {
                // Add generic first
                parent::addArrayToDataSet($dataSetInstance, $messageData);
 
@@ -135,7 +135,7 @@ class NodeMessageRequestNodeListHandler extends BaseMessageHandler implements Ha
         * @param       $messageData    An array with all message data
         * @return      void
         */
-       protected function initMessageConfigurationData (array $messageData) {
+       protected function initMessageConfigurationData (DeliverableMessage $messageInstance) {
                // Debug message
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REQUEST-HANDLER: messageData=' . print_r($messageData, TRUE));
 
@@ -149,7 +149,7 @@ class NodeMessageRequestNodeListHandler extends BaseMessageHandler implements Ha
                } // END - foreach
 
                // Query local DHT for nodes except given session id
-               $nodeList = DhtObjectFactory::createDhtInstance('node')->queryLocalNodeListExceptByMessageData(
+               $nodeList = DhtObjectFactory::createDhtInstance('node')->queryLocalNodeListExceptByMessageInstance(
                        $messageData,
                        $this,
                        XmlRequestNodeListTemplateEngine::REQUEST_DATA_SESSION_ID,
@@ -177,7 +177,7 @@ class NodeMessageRequestNodeListHandler extends BaseMessageHandler implements Ha
         * @param       $messageData    An array with all message data
         * @return      void
         */
-       protected function removeMessageConfigurationData (array $messageData) {
+       protected function removeMessageConfigurationData (DeliverableMessage $messageInstance) {
                // "Walk" throught the config-copy array again
                foreach ($this->configCopy as $configKey => $dummy) {
                        // Now unset this configuration entry (to save some memory again)
index adcd2b4c40b14663f0f30f6bcf48fd4ac05dadc0..d419a8d37b3dcb0cea07998a14b45c0f3f6fe80a 100644 (file)
@@ -70,7 +70,7 @@ class NodeMessageSelfConnectHandler extends BaseMessageHandler implements Handle
         * @param       $packageInstance        An instance of a Receivable class
         * @return      void
         */
-       public function handleMessageData (array $messageData, Receivable $packageInstance) {
+       public function handleMessageData (DeliverableMessage $messageInstance, Receivable $packageInstance) {
                // Get node instance
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-MESSAGE-HANDLER: Creating node instance ...');
                $nodeInstance = NodeObjectFactory::createNodeInstance();
@@ -97,7 +97,7 @@ class NodeMessageSelfConnectHandler extends BaseMessageHandler implements Handle
         * @return      void
         * @throws      UnsupportedOperationException   If this method is called
         */
-       public function addArrayToDataSet (StoreableCriteria $dataSetInstance, array $messageData) {
+       public function addArrayToDataSet (StoreableCriteria $dataSetInstance, DeliverableMessage $messageInstance) {
                // Add generic first
                parent::addArrayToDataSet($dataSetInstance, $messageData);
 
@@ -112,7 +112,7 @@ class NodeMessageSelfConnectHandler extends BaseMessageHandler implements Handle
         * @return      void
         * @throws      UnsupportedOperationException   If this method is called
         */
-       protected function initMessageConfigurationData (array $messageData) {
+       protected function initMessageConfigurationData (DeliverableMessage $messageInstance) {
                // Please don't call this method!
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
@@ -124,7 +124,7 @@ class NodeMessageSelfConnectHandler extends BaseMessageHandler implements Handle
         * @return      void
         * @throws      UnsupportedOperationException   If this method is called
         */
-       protected function removeMessageConfigurationData (array $messageData) {
+       protected function removeMessageConfigurationData (DeliverableMessage $messageInstance) {
                // Please don't call this method!
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
index 03a5073b1201d4df478051112b0ec267a3afd2be..7a9b00cd36b2fd4383a4c2f10818fe9455860db6 100644 (file)
@@ -1585,7 +1585,7 @@ class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Recei
         * @return      void
         * @todo        ~10% done?
         */
-       public function feedHashToMiner (array $messageData) {
+       public function feedHashToMiner (DeliverableMessage $messageInstance) {
                // Debug message
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-HANDLER: messageData()=%d - CALLED!', count($messageData)));
 
index 94bc6648df31e873afedef659cc91dd8d5e47d0f..4727af3841b1fc0baf7abf78b2350f11772b9f14 100644 (file)
@@ -56,7 +56,7 @@ class NodeAnnouncementMessageAnswerHelper extends BaseHubAnswerHelper implements
         * @param       $messageData            An array with all message data
         * @return      $helperInstance         A prepared instance of this helper
         */
-       public final static function createNodeAnnouncementMessageAnswerHelper (array $messageData) {
+       public final static function createNodeAnnouncementMessageAnswerHelper (DeliverableMessage $messageInstance) {
                // Get new instance
                $helperInstance = new NodeAnnouncementMessageAnswerHelper();
 
index 6a846590c6afae482f2a676b2b9a34b1badc0988..f4c1dbe3eee834e6f5fa183388bad6d3b0698ace 100644 (file)
@@ -49,7 +49,7 @@ abstract class BaseHubAnswerHelper extends BaseNodeHelper {
         *
         * @return      $messageData    An array with message data
         */
-       protected final function setMessageData (array $messageData) {
+       protected final function setMessageData (DeliverableMessage $messageInstance) {
                $this->messageData = $messageData;
        }
 
index d31748f88873fdf86b42ccd420c59f5faa996694..17742a1cb31b2418281a201e0171fbd56632a96e 100644 (file)
@@ -56,7 +56,7 @@ class NodeDhtBootstrapMessageAnswerHelper extends BaseHubAnswerHelper implements
         * @param       $messageData            An array with all message data
         * @return      $helperInstance         A prepared instance of this helper
         */
-       public final static function createNodeDhtBootstrapMessageAnswerHelper (array $messageData) {
+       public final static function createNodeDhtBootstrapMessageAnswerHelper (DeliverableMessage $messageInstance) {
                // Get new instance
                $helperInstance = new NodeDhtBootstrapMessageAnswerHelper();
 
index eeac765d1012c9b1e394b6b0681469da353024c5..41bdfb70f7fad3d738ce32e4c65f29639a06a27c 100644 (file)
@@ -56,7 +56,7 @@ class NodeRequestNodeListMessageAnswerHelper extends BaseHubAnswerHelper impleme
         * @param       $messageData            An array with all message data
         * @return      $helperInstance         A prepared instance of this helper
         */
-       public final static function createNodeRequestNodeListMessageAnswerHelper (array $messageData) {
+       public final static function createNodeRequestNodeListMessageAnswerHelper (DeliverableMessage $messageInstance) {
                // Get new instance
                $helperInstance = new NodeRequestNodeListMessageAnswerHelper();
 
index 749d15b9d014d3df27731aa88bd1bafc23e83d34..d83b0054f0ee9d32b7bb28199f06948386099d3b 100644 (file)
@@ -804,7 +804,7 @@ abstract class BaseHubNode extends BaseHubSystem implements Updateable, AddableC
         * @return      void
         * @todo        Handle thrown exception
         */
-       public function handleAnswerStatusByMessageData (array $messageData, Receivable $packageInstance) {
+       public function handleAnswerStatusByMessageInstance (DeliverableMessage $messageInstance, Receivable $packageInstance) {
                // Is it not empty?
                assert(!empty($messageData[BaseXmlAnswerTemplateEngine::ANSWER_STATUS]));
 
index 54d46158e2486504c6bdf24698300ccba9e48bf1..acbd2b18dbdee1a71f1c923cd1839179230278cb 100644 (file)
@@ -87,7 +87,7 @@ interface NodeDhtWrapper extends DatabaseWrapper {
         * @param       $handlerInstance        An instance of a HandleableDataSet class
         * @return      void
         */
-       function registerNodeByMessageData (array $messageData, HandleableDataSet $handlerInstance);
+       function registerNodeByMessageInstance (DeliverableMessage $messageInstance, HandleableDataSet $handlerInstance);
 
        /**
         * Updates an existing entry in node list
@@ -97,7 +97,7 @@ interface NodeDhtWrapper extends DatabaseWrapper {
         * @param       $searchInstance         An instance of LocalSearchCriteria class
         * @return      void
         */
-       function updateNodeByMessageData (array $messageData, HandleableDataSet $handlerInstance, LocalSearchCriteria $searchInstance);
+       function updateNodeByMessageInstance (DeliverableMessage $messageInstance, HandleableDataSet $handlerInstance, LocalSearchCriteria $searchInstance);
 
        /**
         * Determines whether the given node data is already inserted in the DHT
diff --git a/application/hub/interfaces/delivery/messages/.htaccess b/application/hub/interfaces/delivery/messages/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/interfaces/delivery/messages/class_DeliverableMessage.php b/application/hub/interfaces/delivery/messages/class_DeliverableMessage.php
new file mode 100644 (file)
index 0000000..625af2b
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+// Own namespace
+namespace Org\Shipsimu\Hub\Network\Message;
+
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Generic\HubInterface;
+
+/**
+ * An interface for message delivery boys... ;-)
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2018 Hub Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 DeliverableMessage extends HubInterface {
+
+}
index 108ff06a799fff32f146247b0e1b578a9c0f2b83..a8af1d62debe7fc1e8dbeadf5a215d93bac6240d 100644 (file)
@@ -61,7 +61,7 @@ interface DistributableNode extends Distributable {
         * @param       $forceUpdate            Optionally force update, don't register (default: register if not found)
         * @return      void
         */
-       function registerNodeByMessageData (array $messageData, HandleableDataSet $handlerInstance, $forceUpdate = FALSE);
+       function registerNodeByMessageInstance (DeliverableMessage $messageInstance, HandleableDataSet $handlerInstance, $forceUpdate = FALSE);
 
        /**
         * Queries the local DHT data(base) for a node list with all supported
@@ -74,12 +74,12 @@ interface DistributableNode extends Distributable {
         * @param       $separator                      Sepator char (1st parameter for explode() call)
         * @return      $nodeList                       An array with all found nodes
         */
-       function queryLocalNodeListExceptByMessageData (array $messageData, HandleableDataSet $handlerInstance, $excludeKey, $andKey, $separator);
+       function queryLocalNodeListExceptByMessageInstance (DeliverableMessage $messageInstance, HandleableDataSet $handlerInstance, $excludeKey, $andKey, $separator);
 
        /**
         * Inserts given node list array (from earlier database result produced by
         * an other node) into the DHT. This array origins from above method
-        * queryLocalNodeListExceptByMessageData().
+        * queryLocalNodeListExceptByMessageInstance().
         *
         * @param       $nodeList       An array from an earlier database result instance
         * @return      void
index 2bd46a102449379c519a3425e9f0df4c765d3af1..53a3501e0c5d24defc656773022a64fd7f1f8990 100644 (file)
@@ -38,7 +38,7 @@ interface FilterablePackage extends Filterable {
         * @param       $packageInstance        An instance of a Receivable class
         * @return      void
         */
-       function processMessage (array $messageData, Receivable $packageInstance);
+       function processMessage (DeliverableMessage $messageInstance, Receivable $packageInstance);
 
        /**
         * Post-processes the stacked message. Do not call popNamed() as then no
index c995706b002fc2b686a99aefea7858ea48466306..f3883719fc18379faa6b6c81432ac4d9eab611a6 100644 (file)
@@ -40,7 +40,7 @@ interface HandleableAnswerStatus extends HandleableDataSet, HubInterface {
         * @param       $packageInstance        An instance of a Receivable class
         * @return      void
         */
-       function handleAnswerMessageData (array $messageData, Receivable $packageInstance);
+       function handleAnswerMessageData (DeliverableMessage $messageInstance, Receivable $packageInstance);
 
        /**
         * Adds all required elements from given array into data set instance
@@ -49,6 +49,6 @@ interface HandleableAnswerStatus extends HandleableDataSet, HubInterface {
         * @param       $messageData            An array with all message data
         * @return      void
         */
-       function addArrayToDataSet (StoreableCriteria $dataSetInstance, array $messageData);
+       function addArrayToDataSet (StoreableCriteria $dataSetInstance, DeliverableMessage $messageInstance);
 
 }
index 0c83de16057095db4f97b886c5f3e41facd51757..0f3859200b26fb7d494494c02b7e246daf820efc 100644 (file)
@@ -39,7 +39,7 @@ interface HandleableMessage extends HandleableDataSet, HubInterface {
         * @param       $packageInstance        An instance of a Receivable class
         * @return      void
         */
-       function handleMessageData (array $messageData, Receivable $packageInstance);
+       function handleMessageData (DeliverableMessage $messageInstance, Receivable $packageInstance);
 
        /**
         * Posty-handles data array of the message
@@ -48,6 +48,6 @@ interface HandleableMessage extends HandleableDataSet, HubInterface {
         * @param       $packageInstance        An instance of a Receivable class
         * @return      void
         */
-       function postHandleMessageData (array $messageData, Receivable $packageInstance);
+       function postHandleMessageData (DeliverableMessage $messageInstance, Receivable $packageInstance);
 
 }
diff --git a/application/hub/interfaces/messages/.htaccess b/application/hub/interfaces/messages/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
index 5ef756c2cf8f94812487b04c82aa6f204a534e5e..9c3b976a636f07f647e107f5984cc43205c19c6d 100644 (file)
@@ -170,7 +170,7 @@ interface Node extends FrameworkInterface {
         * @param       $packageInstance        An instance of a Receivable class
         * @return      void
         */
-       function handleAnswerStatusByMessageData (array $messageData, Receivable $packageInstance);
+       function handleAnswerStatusByMessageInstance (DeliverableMessage $messageInstance, Receivable $packageInstance);
 
        /**
         * "Getter" for an array of all accepted object types
index df10735e06d76fb52296aa436246f3916286423e..14554adc669aa2fe3ef13d74c7013a4642ecbded 100644 (file)
@@ -154,8 +154,6 @@ interface Receivable extends HubInterface {
         * @param       $messageData    Array with message data
         * @return      void
         */
-       function feedHashToMiner (array $messageData);
-}
+       function feedHashToMiner (DeliverableMessage $messageInstance);
 
-// [EOF]
-?>
+}
diff --git a/core b/core
index cd4ba5256a2b12e69dd95d8d4489f70e1ec5343f..c53e9c7252290aa3e4107717419429c0418a6945 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit cd4ba5256a2b12e69dd95d8d4489f70e1ec5343f
+Subproject commit c53e9c7252290aa3e4107717419429c0418a6945