]> git.mxchange.org Git - hub.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Mon, 26 Oct 2020 05:55:50 +0000 (06:55 +0100)
committerRoland Häder <roland@mxchange.org>
Mon, 26 Oct 2020 05:55:50 +0000 (06:55 +0100)
- moved assemblerInstance to BaseHubHandler class
- updated core framework

Signed-off-by: Roland Häder <roland@mxchange.org>
application/hub/classes/class_BaseHubSystem.php
application/hub/classes/handler/class_BaseHubHandler.php
application/hub/classes/handler/package/class_NetworkPackageHandler.php
core

index 89f5aa2e57d80c275bcd4a060ec0731ec81925f5..c20c6f96afbc444a1923d195e09aaffbcd2a6edb 100644 (file)
@@ -13,7 +13,6 @@ use Org\Shipsimu\Hub\Listener\BaseListener;
 use Org\Shipsimu\Hub\Listener\Listenable;
 use Org\Shipsimu\Hub\Locator\Node\LocateableNode;
 use Org\Shipsimu\Hub\Network\Delivery\Deliverable;
-use Org\Shipsimu\Hub\Network\Package\Receiver\Assembler\Assembler;
 use Org\Shipsimu\Hub\Network\Package\DeliverablePackage;
 use Org\Shipsimu\Hub\Network\Package\Delivery\Fragment\Fragmentable;
 use Org\Shipsimu\Hub\Network\Receive\Receivable;
@@ -92,11 +91,6 @@ abstract class BaseHubSystem extends BaseFrameworkSystem implements HubInterface
         */
        private $fragmenterInstance = NULL;
 
-       /**
-        * Assembler instance
-        */
-       private $assemblerInstance = NULL;
-
        /**
         * Info instance
         */
@@ -252,25 +246,6 @@ abstract class BaseHubSystem extends BaseFrameworkSystem implements HubInterface
                return $this->fragmenterInstance;
        }
 
-       /**
-        * Setter for assembler instance
-        *
-        * @param       $assemblerInstance      An instance of an Assembler class
-        * @return      void
-        */
-       protected final function setAssemblerInstance (Assembler $assemblerInstance) {
-               $this->assemblerInstance = $assemblerInstance;
-       }
-
-       /**
-        * Getter for assembler instance
-        *
-        * @return      $assemblerInstance      An instance of an Assembler class
-        */
-       protected final function getAssemblerInstance () {
-               return $this->assemblerInstance;
-       }
-
        /**
         * Setter for info instance
         *
index ab424661a489db33e43bd6f90195939d64e8df28..ed4fd024029fbc0f77b77e100e6975d81b31351a 100644 (file)
@@ -9,6 +9,7 @@ use Org\Shipsimu\Hub\Generic\HubInterface;
 use Org\Shipsimu\Hub\Information\ShareableInfo;
 use Org\Shipsimu\Hub\Listener\Listenable;
 use Org\Shipsimu\Hub\Locator\Node\LocateableNode;
+use Org\Shipsimu\Hub\Network\Package\Receiver\Assembler\Assembler;
 use Org\Shipsimu\Hub\Node\Node;
 use Org\Shipsimu\Hub\Pool\Poolable;
 
@@ -70,6 +71,11 @@ abstract class BaseHubHandler extends BaseHandler implements Handleable, HubInte
         */
        private $universalNodeLocatorInstance = NULL;
 
+       /**
+        * Assembler instance
+        */
+       private $assemblerInstance = NULL;
+
        /**
         * Protected constructor
         *
@@ -280,4 +286,23 @@ abstract class BaseHubHandler extends BaseHandler implements Handleable, HubInte
                return $this->nodeInstance;
        }
 
+       /**
+        * Setter for assembler instance
+        *
+        * @param       $assemblerInstance      An instance of an Assembler class
+        * @return      void
+        */
+       protected final function setAssemblerInstance (Assembler $assemblerInstance) {
+               $this->assemblerInstance = $assemblerInstance;
+       }
+
+       /**
+        * Getter for assembler instance
+        *
+        * @return      $assemblerInstance      An instance of an Assembler class
+        */
+       protected final function getAssemblerInstance () {
+               return $this->assemblerInstance;
+       }
+
 }
index 11d7334d18c941a985ad9cb554990d071d5caa02..f489d980dcb6f5ef01c3f0c5a4bc1a971953e0b7 100644 (file)
@@ -847,6 +847,7 @@ class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Recei
                $packageInstance->setPrivateKeyHash($this->getNodeInstance()->getPrivateKeyHash());
 
                // Now prepare the temporary array and push it on the 'undeclared' stack
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE: Pushing packageInstance=%s to stack %s ...', $packageInstance->__toString(), self::STACKER_NAME_UNDECLARED));
                $this->getStackInstance()->pushNamed(self::STACKER_NAME_UNDECLARED, $packageInstance);
 
                // Debug message
@@ -860,15 +861,15 @@ class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Recei
         */
        public function isPackageEnqueued () {
                // Check whether the stacker is not empty
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: CALLED!');
                $isEnqueued = (
                        ($this->getStackInstance()->isStackInitialized(self::STACKER_NAME_UNDECLARED)) &&
                        (!$this->getStackInstance()->isStackEmpty(self::STACKER_NAME_UNDECLARED))
                );
 
-               // Trace message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE: isEnqueued=%d - EXIT!', intval($isEnqueued)));
 
                // Return the result
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE: isEnqueued=%d - EXIT!', intval($isEnqueued)));
                return $isEnqueued;
        }
 
diff --git a/core b/core
index f6a7ed0407c3411090a697ba0831bb0d6f4bb616..e1220edf0b09e635b818aba6465f2b7d47e7d310 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit f6a7ed0407c3411090a697ba0831bb0d6f4bb616
+Subproject commit e1220edf0b09e635b818aba6465f2b7d47e7d310