]> git.mxchange.org Git - hub.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Fri, 21 Aug 2020 16:48:39 +0000 (18:48 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 21 Aug 2020 16:50:14 +0000 (18:50 +0200)
- Added $socketFile and $socketType properties to PackageData class
- moved delivery/receiving classes/interfaces to proper packages

Signed-off-by: Roland Häder <roland@mxchange.org>
32 files changed:
application/hub/classes/class_BaseHubSystem.php
application/hub/classes/container/socket/class_SocketContainer.php
application/hub/classes/factories/socket/class_SocketFactory.php
application/hub/classes/handler/chunks/class_ChunkHandler.php
application/hub/classes/handler/data/class_BaseDataHandler.php
application/hub/classes/handler/package/class_NetworkPackageHandler.php
application/hub/classes/package/assembler/class_PackageAssembler.php
application/hub/classes/package/deliverable/class_PackageData.php
application/hub/classes/package/fragmenter/class_PackageFragmenter.php
application/hub/classes/visitor/socket/class_HalfShutdownSocketVisitor.php
application/hub/classes/visitor/socket/class_ShutdownSocketVisitor.php
application/hub/config.php
application/hub/exceptions/package/class_FinalChunkVerificationException.php
application/hub/interfaces/delivery/.htaccess [new file with mode: 0644]
application/hub/interfaces/delivery/class_Deliverable.php [new file with mode: 0644]
application/hub/interfaces/delivery/fragmenter/.htaccess [new file with mode: 0644]
application/hub/interfaces/delivery/fragmenter/class_Fragmentable.php [new file with mode: 0644]
application/hub/interfaces/delivery/package/.htaccess [new file with mode: 0644]
application/hub/interfaces/delivery/package/class_DeliverablePackage.php [new file with mode: 0644]
application/hub/interfaces/package/.htaccess [deleted file]
application/hub/interfaces/package/assembler/.htaccess [deleted file]
application/hub/interfaces/package/assembler/class_Assembler.php [deleted file]
application/hub/interfaces/package/class_Deliverable.php [deleted file]
application/hub/interfaces/package/class_Receivable.php [deleted file]
application/hub/interfaces/package/fragmenter/.htaccess [deleted file]
application/hub/interfaces/package/fragmenter/class_Fragmentable.php [deleted file]
application/hub/interfaces/package/package/.htaccess [deleted file]
application/hub/interfaces/package/package/class_DeliverablePackage.php [deleted file]
application/hub/interfaces/receiver/.htaccess [new file with mode: 0644]
application/hub/interfaces/receiver/assembler/.htaccess [new file with mode: 0644]
application/hub/interfaces/receiver/assembler/class_Assembler.php [new file with mode: 0644]
application/hub/interfaces/receiver/class_Receivable.php [new file with mode: 0644]

index 89c498073507654798ac42005b525f8a14aab540..92e0ac5ba630e219fce2f0fc2a29c2081aff0ce4 100644 (file)
@@ -12,10 +12,10 @@ use Org\Shipsimu\Hub\Information\ShareableInfo;
 use Org\Shipsimu\Hub\Listener\BaseListener;
 use Org\Shipsimu\Hub\Listener\Listenable;
 use Org\Shipsimu\Hub\Locator\Node\LocateableNode;
-use Org\Shipsimu\Hub\Network\Deliver\Deliverable;
-use Org\Shipsimu\Hub\Network\Package\Assembler\Assembler;
+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\Fragment\Fragmentable;
+use Org\Shipsimu\Hub\Network\Package\Delivery\Fragment\Fragmentable;
 use Org\Shipsimu\Hub\Network\Receive\Receivable;
 use Org\Shipsimu\Hub\Pool\Poolable;
 
index fc57d73382e52ddf8e207b1dad0f15512ce7ba51..266af0e0e7b4c9bf98a3d3b672909eeec58f85b9 100644 (file)
@@ -115,8 +115,8 @@ class SocketContainer extends BaseHubContainer implements StorableSocket, Visita
                $socketInstance->setSocketProtocol($socketProtocol);
 
                // Set content/hash to null
-               $packageInstance->setContent(NULL);
-               $packageInstance->setHash(NULL);
+               $packageInstance->setPackageContent(NULL);
+               $packageInstance->setContentHash(NULL);
 
                // Set the resource ...
                $socketInstance->setSocketResource($socketResource);
index ac6a9d1c2db3e4b0347be162d5f9482095108533..46f99b17f34997944466f77a85a4fdedb634d420 100644 (file)
@@ -282,7 +282,12 @@ class SocketFactory extends ObjectFactory {
                );
 
                // Create socket instance
-               $socketInstance = self::createObjectByConfiguredName('socket_container_class', array($socketResource, StorableSocket::SOCKET_PROTOCOL_TCP, $packageData, NULL));
+               $socketInstance = self::createObjectByConfiguredName('socket_container_class', array(
+                       $socketResource,
+                       StorableSocket::SOCKET_PROTOCOL_TCP,
+                       $packageData,
+                       NULL
+               ));
 
                // Is the socket resource valid?
                if (!$socketInstance->isValidSocket()) {
index 3a5eb5fde9f31bdaf989d3516af6f2a3e539970f..f3c508a23d3a4365c097bff427c8677c7efab93b 100644 (file)
@@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Handler\Network\RawData\Chunks;
 // Import application-specific stuff
 use Org\Shipsimu\Hub\Factory\Fragmenter\FragmenterFactory;
 use Org\Shipsimu\Hub\Handler\BaseHubHandler;
-use Org\Shipsimu\Hub\Network\Package\Fragment\PackageFragmenter;
+use Org\Shipsimu\Hub\Network\Package\Delivery\Fragment\PackageFragmenter;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Assertion\AssertionException;
index b9358850875b9420c260b60618a285d9549d6920..59a939740c5b4143614ef203edd9876fdeb8737b 100644 (file)
@@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Handler\Data;
 use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
 use Org\Shipsimu\Hub\Generic\HubInterface;
 use Org\Shipsimu\Hub\Handler\BaseHubHandler;
-use Org\Shipsimu\Hub\Network\Deliver\Deliverable;
+use Org\Shipsimu\Hub\Network\Delivery\Deliverable;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
index 84aa1d5848968bf75cd1135ff25eb92b4280a092..92259970bf1a131876ffa165f70b78e288d5fe5c 100644 (file)
@@ -18,10 +18,10 @@ use Org\Shipsimu\Hub\Handler\Network\RawData\HandleableRawData;
 use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper;
 use Org\Shipsimu\Hub\Helper\HubHelper;
 use Org\Shipsimu\Hub\Information\ShareableInfo;
-use Org\Shipsimu\Hub\Network\Deliver\Deliverable;
+use Org\Shipsimu\Hub\Network\Delivery\Deliverable;
 use Org\Shipsimu\Hub\Network\Networkable;
 use Org\Shipsimu\Hub\Network\Package\DeliverablePackage;
-use Org\Shipsimu\Hub\Network\Package\Fragment\PackageFragmenter;
+use Org\Shipsimu\Hub\Network\Package\Delivery\Fragment\PackageFragmenter;
 use Org\Shipsimu\Hub\Network\Receive\Receivable;
 use Org\Shipsimu\Hub\Node\Generic\InvalidPrivateKeyHashException;
 use Org\Shipsimu\Hub\Tag\Tagable;
@@ -837,9 +837,9 @@ class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Recei
                $packageInstance->setSenderAddress($this->getSessionId());
                $packageInstance->setSenderPort('0');
                $packageInstance->setRecipientType($helperInstance->getRecipientType());
-               $packageInstance->setContent($packageContent);
+               $packageInstance->setPackageContent($packageContent);
                $packageInstance->setStatus(self::PACKAGE_STATUS_NEW);
-               $packageInstance->setHash($this->generatePackageHash($content, $this->getSessionId()));
+               $packageInstance->setContentHash($this->generatePackageHash($content, $this->getSessionId()));
                $packageInstance->setPrivateKeyHash($this->getPrivateKeyHash());
 
                // Now prepare the temporary array and push it on the 'undeclared' stack
@@ -856,7 +856,10 @@ class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Recei
         */
        public function isPackageEnqueued () {
                // Check whether the stacker is not empty
-               $isEnqueued = (($this->getStackInstance()->isStackInitialized(self::STACKER_NAME_UNDECLARED)) && (!$this->getStackInstance()->isStackEmpty(self::STACKER_NAME_UNDECLARED)));
+               $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)));
@@ -872,7 +875,10 @@ class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Recei
         */
        public function isPackageDeclared () {
                // Check whether the stacker is not empty
-               $isDeclared = (($this->getStackInstance()->isStackInitialized(self::STACKER_NAME_DECLARED)) && (!$this->getStackInstance()->isStackEmpty(self::STACKER_NAME_DECLARED)));
+               $isDeclared = (
+                       ($this->getStackInstance()->isStackInitialized(self::STACKER_NAME_DECLARED)) &&
+                       (!$this->getStackInstance()->isStackEmpty(self::STACKER_NAME_DECLARED))
+               );
 
                // Trace message
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE: isDeclared=%d - EXIT!', intval($isDeclared)));
@@ -1368,9 +1374,9 @@ class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Recei
                $packageInstance->setSenderAddress($decodedArray[self::INDEX_PACKAGE_SENDER_ADDRESS]);
                $packageInstance->setSenderPort($decodedArray[self::INDEX_PACKAGE_SENDER_PORT]);
                $packageInstance->setRecipient($decodedArray[self::INDEX_PACKAGE_RECIPIENT]);
-               $packageInstance->setContent($decodedArray[self::INDEX_PACKAGE_CONTENT]);
+               $packageInstance->setPackageContent($decodedArray[self::INDEX_PACKAGE_CONTENT]);
                $packageInstance->setStatus(self::PACKAGE_STATUS_DECODED);
-               $packageInstance->setHash($decodedArray[self::INDEX_PACKAGE_HASH]);
+               $packageInstance->setContentHash($decodedArray[self::INDEX_PACKAGE_HASH]);
                $packageInstance->setPrivateKeyHash($decodedArray[self::INDEX_PACKAGE_PRIVATE_KEY_HASH]);
 
                // And return it
index 836ac7605dc91c7aa8a67a2f6faf6c12ff253fe0..b14d0095b31782ba9276f821e4d7f12cb12dfcfa 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // Own namespace
-namespace Org\Shipsimu\Hub\Network\Package\Assembler;
+namespace Org\Shipsimu\Hub\Network\Package\Receiver\Assembler;
 
 // Import application-specific stuff
 use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
@@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Factory\Handler\Chunk\ChunkHandlerFactory;
 use Org\Shipsimu\Hub\Generic\BaseHubSystem;
 use Org\Shipsimu\Hub\Handler\Network\RawData\HandleableRawData;
 use Org\Shipsimu\Hub\Handler\Package\NetworkPackageHandler;
-use Org\Shipsimu\Hub\Network\Package\Fragment\PackageFragmenter;
+use Org\Shipsimu\Hub\Network\Package\Delivery\Fragment\PackageFragmenter;
 use Org\Shipsimu\Hub\Network\Receive\Receivable;
 
 // Import framework stuff
index 449cf6a7780ecdba7683174ada28a3e677837a6d..dc938bc618b227dc732f6571e5051d4ad24c4574 100644 (file)
@@ -8,6 +8,9 @@ use Org\Shipsimu\Hub\Generic\BaseHubSystem;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 
+// Import SPL stuff
+use \SplFileInfo;
+
 /**
  * A DeliverablePackage class for raw package data
  *
@@ -31,6 +34,17 @@ use Org\Mxchange\CoreFramework\Registry\Registerable;
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 class PackageData extends BaseHubSystem implements DeliverablePackage, Registerable {
+
+       /**
+        * An instance of a SplFileInfo class
+        */
+       private $socketFile;
+
+       /**
+        * Socket type
+        */
+       private $socketType;
+
        /**
         * Protected constructor
         *
@@ -54,4 +68,42 @@ class PackageData extends BaseHubSystem implements DeliverablePackage, Registera
                return $packageInstance;
        }
 
+       /**
+        * Getter for socket file instance
+        *
+        * @return      $socketFile An instance of a SplFileInfo class
+        */
+       public function getSocketFile () {
+               return $this->socketFile;
+       }
+
+       /**
+        * Setter for socket file instance
+        *
+        * @param       $socketFile An instance of a SplFileInfo class
+        * @return      void
+        */
+       public function setSocketFile (SplFileInfo $socketFile) {
+               $this->socketFile = $socketFile;
+       }
+
+       /**
+        * Getter for socket type
+        *
+        * @return      $socketFile     Stocket type
+        */
+       public function getSocketType () {
+               return $this->socketType;
+       }
+
+       /**
+        * Setter for socket type
+        *
+        * @param       $socketType     Socket type
+        * @return      void
+        */
+       public function setSocketType ($socketType) {
+               $this->socketType = $socketType;
+       }
+
 }
index 7869833a91afbddf22a08fd16f7316219d5636e7..5e10f3fc1035725520b2f16deadea964df306f72 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // Own namespace
-namespace Org\Shipsimu\Hub\Network\Package\Fragment;
+namespace Org\Shipsimu\Hub\Network\Package\Delivery\Fragment;
 
 // Import application-specific stuff
 use Org\Shipsimu\Hub\Generic\BaseHubSystem;
index 3996d44c39247776f3118681c49f109eeff7ed2c..e3965fad76a65f7561c68052c05b1f865080c3f4 100644 (file)
@@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Visitor\Shutdown\Socket;
 // Import application-specific stuff
 use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory;
 use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper;
-use Org\Shipsimu\Hub\Network\Deliver\Deliverable;
+use Org\Shipsimu\Hub\Network\Delivery\Deliverable;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Visitor\BaseVisitor;
index e2e6510fde72c08a4373a58af9227928ecc11193..adddac183a941ec16c892c0c8f33c3e7ea174c28 100644 (file)
@@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Visitor\Shutdown\Socket;
 use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
 use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory;
 use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper;
-use Org\Shipsimu\Hub\Network\Deliver\Deliverable;
+use Org\Shipsimu\Hub\Network\Delivery\Deliverable;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Visitor\BaseVisitor;
index 2cadaed33effe79ea278f4b35289004c2e4f7c5f..3b7604f9e48f99da95c7a15897bfc3269f016709 100644 (file)
@@ -815,10 +815,10 @@ $cfg->setConfigEntry('allow_publish_internal_address', 'N');
 $cfg->setConfigEntry('node_status', 'invalid');
 
 // CFG: PACKAGE-FRAGMENTER-CLASS
-$cfg->setConfigEntry('package_fragmenter_class', 'Org\Shipsimu\Hub\Network\Package\Fragment\PackageFragmenter');
+$cfg->setConfigEntry('package_fragmenter_class', 'Org\Shipsimu\Hub\Network\Package\Delivery\Fragment\PackageFragmenter');
 
 // CFG: PACKAGE-ASSEMBLER-CLASS
-$cfg->setConfigEntry('package_assembler_class', 'Org\Shipsimu\Hub\Network\Package\Assembler\PackageAssembler');
+$cfg->setConfigEntry('package_assembler_class', 'Org\Shipsimu\Hub\Network\Package\Receiver\Assembler\PackageAssembler');
 
 // CFG: PACKAGE-CHUNK-SIZE
 $cfg->setConfigEntry('package_chunk_size', 256*8);
index 94fa3e745d2ab2f7378e2113168457040b53fded..ae04a1699f8da19812c0785724741fc196ab73b9 100644 (file)
@@ -3,7 +3,7 @@
 namespace Org\Shipsimu\Hub\Node\Network\Chunk;
 
 // Import application-specific stuff
-use Org\Shipsimu\Hub\Network\Package\Fragment\PackageFragmenter;
+use Org\Shipsimu\Hub\Network\Package\Delivery\Fragment\PackageFragmenter;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Generic\FrameworkException;
diff --git a/application/hub/interfaces/delivery/.htaccess b/application/hub/interfaces/delivery/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/interfaces/delivery/class_Deliverable.php b/application/hub/interfaces/delivery/class_Deliverable.php
new file mode 100644 (file)
index 0000000..966db55
--- /dev/null
@@ -0,0 +1,112 @@
+<?php
+// Own namespace
+namespace Org\Shipsimu\Hub\Network\Delivery;
+
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Helper\HubHelper;
+
+/**
+ * An interface for package 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 Deliverable extends HubInterface {
+       /**
+        * "Enqueues" raw content into this delivery class by reading the raw content
+        * from given helper's template instance and pushing it on the 'undeclared'
+        * stack.
+        *
+        * @param       $helperInstance         An instance of a HubHelper class
+        * @return      void
+        */
+       function enqueueRawDataFromTemplate (HubHelper $helperInstance);
+
+       /**
+        * Checks whether a package has been enqueued for delivery.
+        *
+        * @return      $isEnqueued             Whether a package is enqueued
+        */
+       function isPackageEnqueued ();
+
+       /**
+        * Checks whether a package has been declared
+        *
+        * @return      $isDeclared             Whether a package is declared
+        */
+       function isPackageDeclared ();
+
+       /**
+        * Checks whether a package should be sent out
+        *
+        * @return      $isWaitingDelivery      Whether a package is waiting for delivery
+        */
+       function isPackageWaitingForDelivery ();
+
+       /**
+        * Checks whether encoded (raw) data is pending
+        *
+        * @return      $isPending      Whether encoded data is pending
+        */
+       function isEncodedDataPending ();
+
+       /**
+        * Delivers an enqueued package to the stated destination. If a non-session
+        * id is provided, recipient resolver is being asked (and instanced once).
+        * This allows that a single package is being delivered to multiple targets
+        * without enqueueing it for every target. If no target is provided or it
+        * can't be determined a NoTargetException is being thrown.
+        *
+        * @return      void
+        * @throws      NoTargetException       If no target can't be determined
+        */
+       function declareEnqueuedPackage ();
+
+       /**
+        * Processes the next declared package. Only one package per time will be
+        * processed because this may take time and slows down the whole delivery
+        * infrastructure.
+        *
+        * @return      void
+        */
+       function processDeclaredPackage ();
+
+       /**
+        * Sends waiting packages out for delivery
+        *
+        * @return      void
+        */
+       function sendWaitingPackage ();
+
+       /**
+        * Sends pending encoded (raw) data
+        *
+        * @return      void
+        */
+       function sendEncodedData ();
+
+       /**
+        * Clears all stacks
+        *
+        * @return      void
+        */
+       function clearAllStacks ();
+
+}
diff --git a/application/hub/interfaces/delivery/fragmenter/.htaccess b/application/hub/interfaces/delivery/fragmenter/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/interfaces/delivery/fragmenter/class_Fragmentable.php b/application/hub/interfaces/delivery/fragmenter/class_Fragmentable.php
new file mode 100644 (file)
index 0000000..9413438
--- /dev/null
@@ -0,0 +1,57 @@
+<?php
+// Own namespace
+namespace Org\Shipsimu\Hub\Network\Package\Delivery\Fragment;
+
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper;
+
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Network\Package\DeliverablePackage;
+
+/**
+ * An interface for a package fragmenter
+ *
+ * @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 Fragmentable extends HubInterface {
+       /**
+        * This method does "implode" the given package data array into one long
+        * string, splits it into small chunks, adds a serial number and checksum
+        * to all chunks and prepends a final hashsum chunk. It will return the
+        * final hash for faster processing of packages.
+        *
+        * @param       $packageInstance        An instance of a DeliverablePackage instance
+        * @param       $helperInstance         An instance of a ConnectionHelper class
+        * @return      $finalHash                      Final hash for faster processing
+        */
+       function fragmentPackageArray (DeliverablePackage $packageInstance, ConnectionHelper $helperInstance);
+
+       /**
+        * This method gets the next chunk from the internal FIFO which should be
+        * sent to the given recipient. It will return an associative array where
+        * the key is the chunk hash and value the raw chunk data.
+        *
+        * @param       $finalHash              Final hash for faster lookup
+        * @return      $rawDataChunk   An instance of a DeliverablePackage class chunk
+        */
+       function getNextRawDataChunk ($finalHash);
+
+}
diff --git a/application/hub/interfaces/delivery/package/.htaccess b/application/hub/interfaces/delivery/package/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/interfaces/delivery/package/class_DeliverablePackage.php b/application/hub/interfaces/delivery/package/class_DeliverablePackage.php
new file mode 100644 (file)
index 0000000..41a7402
--- /dev/null
@@ -0,0 +1,65 @@
+<?php
+// Own namespace
+namespace Org\Shipsimu\Hub\Network\Package;
+
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Generic\HubInterface;
+
+// Import PHP stuff
+use \SplFileInfo;
+
+/**
+ * An interface for package 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 DeliverablePackage extends HubInterface {
+
+       /**
+        * Getter for socket file instance
+        *
+        * @return      $socketFile     An instance of a SplFileInfo class
+        */
+       public function getSocketFile ();
+
+       /**
+        * Setter for socket file instance
+        *
+        * @param       $socketFile     An instance of a SplFileInfo class
+        * @return      void
+        */
+       public function setSocketFile (SplFileInfo $socketFile);
+
+       /**
+        * Getter for socket type
+        *
+        * @return      $socketFile     Stocket type
+        */
+       public function getSocketType ();
+
+       /**
+        * Setter for socket type
+        *
+        * @param       $socketType     Socket type
+        * @return      void
+        */
+       public function setSocketType ($socketType);
+
+}
diff --git a/application/hub/interfaces/package/.htaccess b/application/hub/interfaces/package/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/hub/interfaces/package/assembler/.htaccess b/application/hub/interfaces/package/assembler/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/hub/interfaces/package/assembler/class_Assembler.php b/application/hub/interfaces/package/assembler/class_Assembler.php
deleted file mode 100644 (file)
index b22f4b9..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-// Own namespace
-namespace Org\Shipsimu\Hub\Network\Package\Assembler;
-
-// Import application-specific stuff
-use Org\Shipsimu\Hub\Generic\HubInterface;
-
-/**
- * An interface for a package assembler
- *
- * @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 Assembler extends HubInterface {
-       /**
-        * Chunks the content from $packageContent and feeds it into another queue
-        * for verification and possible re-requesting.
-        *
-        * @param       $packageContent         An array with two elements: 'raw_data' and 'error_code'
-        * @return      void
-        */
-       function chunkPackageContent (array $packageContent);
-
-       /**
-        * Checks whether the assembler's pending data is empty which means it has
-        * no pending data left for handling ... ;-)
-        *
-        * @return      $ifPendingDataIsEmpty   Whether pending data is empty
-        */
-       function isPendingDataEmpty ();
-
-       /**
-        * Handles the assembler's pending data
-        *
-        * @return      void
-        */
-       function handlePendingData ();
-
-       /**
-        * Checks whether the assembler has multiple messages pending
-        *
-        * @return      $isPending      Whether the assembler has multiple messages pending
-        */
-       function ifMultipleMessagesPending ();
-
-       /**
-        * Handles multiple messages.
-        *
-        * @return      void
-        */
-       function handleMultipleMessages ();
-
-}
diff --git a/application/hub/interfaces/package/class_Deliverable.php b/application/hub/interfaces/package/class_Deliverable.php
deleted file mode 100644 (file)
index 53b7906..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-<?php
-// Own namespace
-namespace Org\Shipsimu\Hub\Network\Deliver;
-
-// Import application-specific stuff
-use Org\Shipsimu\Hub\Generic\HubInterface;
-use Org\Shipsimu\Hub\Helper\HubHelper;
-
-/**
- * An interface for package 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 Deliverable extends HubInterface {
-       /**
-        * "Enqueues" raw content into this delivery class by reading the raw content
-        * from given helper's template instance and pushing it on the 'undeclared'
-        * stack.
-        *
-        * @param       $helperInstance         An instance of a HubHelper class
-        * @return      void
-        */
-       function enqueueRawDataFromTemplate (HubHelper $helperInstance);
-
-       /**
-        * Checks whether a package has been enqueued for delivery.
-        *
-        * @return      $isEnqueued             Whether a package is enqueued
-        */
-       function isPackageEnqueued ();
-
-       /**
-        * Checks whether a package has been declared
-        *
-        * @return      $isDeclared             Whether a package is declared
-        */
-       function isPackageDeclared ();
-
-       /**
-        * Checks whether a package should be sent out
-        *
-        * @return      $isWaitingDelivery      Whether a package is waiting for delivery
-        */
-       function isPackageWaitingForDelivery ();
-
-       /**
-        * Checks whether encoded (raw) data is pending
-        *
-        * @return      $isPending      Whether encoded data is pending
-        */
-       function isEncodedDataPending ();
-
-       /**
-        * Delivers an enqueued package to the stated destination. If a non-session
-        * id is provided, recipient resolver is being asked (and instanced once).
-        * This allows that a single package is being delivered to multiple targets
-        * without enqueueing it for every target. If no target is provided or it
-        * can't be determined a NoTargetException is being thrown.
-        *
-        * @return      void
-        * @throws      NoTargetException       If no target can't be determined
-        */
-       function declareEnqueuedPackage ();
-
-       /**
-        * Processes the next declared package. Only one package per time will be
-        * processed because this may take time and slows down the whole delivery
-        * infrastructure.
-        *
-        * @return      void
-        */
-       function processDeclaredPackage ();
-
-       /**
-        * Sends waiting packages out for delivery
-        *
-        * @return      void
-        */
-       function sendWaitingPackage ();
-
-       /**
-        * Sends pending encoded (raw) data
-        *
-        * @return      void
-        */
-       function sendEncodedData ();
-
-       /**
-        * Clears all stacks
-        *
-        * @return      void
-        */
-       function clearAllStacks ();
-
-}
diff --git a/application/hub/interfaces/package/class_Receivable.php b/application/hub/interfaces/package/class_Receivable.php
deleted file mode 100644 (file)
index 7b02810..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-<?php
-// Own namespace
-namespace Org\Shipsimu\Hub\Network\Receive;
-
-// Import application-specific stuff
-use Org\Shipsimu\Hub\Network\Networkable;
-
-// Import application-specific stuff
-use Org\Shipsimu\Hub\Generic\HubInterface;
-
-/**
- * An interface for package receivers
- *
- * @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 Receivable extends HubInterface {
-       /**
-        * Checks whether new raw data from the socket has arrived
-        *
-        * @return      $hasArrived             Whether raw package data has arrived at a socket
-        */
-       function isNewRawDataPending ();
-
-       /**
-        * Handles the incoming decoded raw data. This method does not "convert" the
-        * decoded data back into a package array, it just "handles" it and pushs it
-        * on the next stack.
-        *
-        * @return      void
-        */
-       function handleIncomingDecodedData ();
-
-       /**
-        * Checks whether incoming decoded data is handled.
-        *
-        * @return      $isHandled      Whether incoming decoded data is handled
-        */
-       function isIncomingRawDataHandled ();
-
-       /**
-        * Assembles incoming decoded data so it will become an abstract network
-        * package again.
-        *
-        * @return      void
-        */
-       function assembleDecodedDataToPackage ();
-
-       /**
-        * Checks whether a new message has arrived
-        *
-        * @return      $hasArrived             Whether a new message has arrived for processing
-        */
-       function isNewMessageArrived ();
-
-       /**
-        * Handle newly arrived message
-        *
-        * @return      void
-        */
-       function handleNewlyArrivedMessage ();
-
-       /**
-        * Checks whether a processed message is pending for "interpretation"
-        *
-        * @return      $isPending      Whether a processed message is pending
-        */
-       function isProcessedMessagePending ();
-
-       /**
-        * Handle processed messages by "interpreting" the 'message_type' element
-        *
-        * @return      void
-        */
-       function handleProcessedMessage ();
-
-       /**
-        * Adds raw decoded data from the given handler instance to this receiver
-        *
-        * @param       $handlerInstance        An instance of a Networkable class
-        * @return      void
-        */
-       function addRawDataToIncomingStack (Networkable $handlerInstance);
-
-       /**
-        * "Decode" the package content. This method does also verify the attached hash
-        * against the real raw package data (that what the sender has sent).
-        *
-        * @param       $rawPackageContent      The raw package content to be "decoded"
-        * @return      $packageInstance        An instance of a DeliverablePackage class
-        */
-       function decodeRawContent ($rawPackageContent);
-
-       /**
-        * Checks whether the assembler has pending data left
-        *
-        * @return      $isHandled      Whether the assembler has pending data left
-        */
-       function ifAssemblerHasPendingDataLeft ();
-
-       /**
-        * Handles the attached assemler's pending data queue to be finally
-        * assembled to the raw package data back.
-        *
-        * @return      void
-        */
-       function handleAssemblerPendingData ();
-
-       /**
-        * Handles decoded data for this node
-        *
-        * @param       $packageInstance        An instance of a DeliverablePackage class
-        * @return      void
-        */
-       function handleRawData (DeliverablePackage $packageInstance);
-
-       /**
-        * Checks whether the assembler has multiple messages pending
-        *
-        * @return      $isPending      Whether the assembler has multiple messages pending
-        */
-       function ifMultipleMessagesPending ();
-
-       /**
-        * Handles multiple messages.
-        *
-        * @return      void
-        */
-       function handleMultipleMessages ();
-
-       /**
-        * Feeds the hash and sender (as recipient for the 'sender' reward) to the
-        * miner's queue, unless the message is not a "reward claim" message as this
-        * leads to an endless loop. You may wish to run the miner to get some
-        * reward ("Hubcoins") for "mining" this hash.
-        *
-        * @param       $messageData    Array with message data
-        * @return      void
-        */
-       function feedHashToMiner (array $messageData);
-}
-
-// [EOF]
-?>
diff --git a/application/hub/interfaces/package/fragmenter/.htaccess b/application/hub/interfaces/package/fragmenter/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/hub/interfaces/package/fragmenter/class_Fragmentable.php b/application/hub/interfaces/package/fragmenter/class_Fragmentable.php
deleted file mode 100644 (file)
index 6ed4880..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-// Own namespace
-namespace Org\Shipsimu\Hub\Network\Package\Fragment;
-
-// Import application-specific stuff
-use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper;
-
-// Import application-specific stuff
-use Org\Shipsimu\Hub\Generic\HubInterface;
-use Org\Shipsimu\Hub\Network\Package\DeliverablePackage;
-
-/**
- * An interface for a package fragmenter
- *
- * @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 Fragmentable extends HubInterface {
-       /**
-        * This method does "implode" the given package data array into one long
-        * string, splits it into small chunks, adds a serial number and checksum
-        * to all chunks and prepends a final hashsum chunk. It will return the
-        * final hash for faster processing of packages.
-        *
-        * @param       $packageInstance        An instance of a DeliverablePackage instance
-        * @param       $helperInstance         An instance of a ConnectionHelper class
-        * @return      $finalHash                      Final hash for faster processing
-        */
-       function fragmentPackageArray (DeliverablePackage $packageInstance, ConnectionHelper $helperInstance);
-
-       /**
-        * This method gets the next chunk from the internal FIFO which should be
-        * sent to the given recipient. It will return an associative array where
-        * the key is the chunk hash and value the raw chunk data.
-        *
-        * @param       $finalHash              Final hash for faster lookup
-        * @return      $rawDataChunk   An instance of a DeliverablePackage class chunk
-        */
-       function getNextRawDataChunk ($finalHash);
-
-}
diff --git a/application/hub/interfaces/package/package/.htaccess b/application/hub/interfaces/package/package/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/hub/interfaces/package/package/class_DeliverablePackage.php b/application/hub/interfaces/package/package/class_DeliverablePackage.php
deleted file mode 100644 (file)
index 16df801..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-// Own namespace
-namespace Org\Shipsimu\Hub\Network\Package;
-
-// Import application-specific stuff
-use Org\Shipsimu\Hub\Generic\HubInterface;
-
-/**
- * An interface for package 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 DeliverablePackage extends HubInterface {
-
-}
diff --git a/application/hub/interfaces/receiver/.htaccess b/application/hub/interfaces/receiver/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/interfaces/receiver/assembler/.htaccess b/application/hub/interfaces/receiver/assembler/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/interfaces/receiver/assembler/class_Assembler.php b/application/hub/interfaces/receiver/assembler/class_Assembler.php
new file mode 100644 (file)
index 0000000..3fe2183
--- /dev/null
@@ -0,0 +1,69 @@
+<?php
+// Own namespace
+namespace Org\Shipsimu\Hub\Network\Package\Receiver\Assembler;
+
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Generic\HubInterface;
+
+/**
+ * An interface for a package assembler
+ *
+ * @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 Assembler extends HubInterface {
+       /**
+        * Chunks the content from $packageContent and feeds it into another queue
+        * for verification and possible re-requesting.
+        *
+        * @param       $packageContent         An array with two elements: 'raw_data' and 'error_code'
+        * @return      void
+        */
+       function chunkPackageContent (array $packageContent);
+
+       /**
+        * Checks whether the assembler's pending data is empty which means it has
+        * no pending data left for handling ... ;-)
+        *
+        * @return      $ifPendingDataIsEmpty   Whether pending data is empty
+        */
+       function isPendingDataEmpty ();
+
+       /**
+        * Handles the assembler's pending data
+        *
+        * @return      void
+        */
+       function handlePendingData ();
+
+       /**
+        * Checks whether the assembler has multiple messages pending
+        *
+        * @return      $isPending      Whether the assembler has multiple messages pending
+        */
+       function ifMultipleMessagesPending ();
+
+       /**
+        * Handles multiple messages.
+        *
+        * @return      void
+        */
+       function handleMultipleMessages ();
+
+}
diff --git a/application/hub/interfaces/receiver/class_Receivable.php b/application/hub/interfaces/receiver/class_Receivable.php
new file mode 100644 (file)
index 0000000..7b02810
--- /dev/null
@@ -0,0 +1,160 @@
+<?php
+// Own namespace
+namespace Org\Shipsimu\Hub\Network\Receive;
+
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Network\Networkable;
+
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Generic\HubInterface;
+
+/**
+ * An interface for package receivers
+ *
+ * @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 Receivable extends HubInterface {
+       /**
+        * Checks whether new raw data from the socket has arrived
+        *
+        * @return      $hasArrived             Whether raw package data has arrived at a socket
+        */
+       function isNewRawDataPending ();
+
+       /**
+        * Handles the incoming decoded raw data. This method does not "convert" the
+        * decoded data back into a package array, it just "handles" it and pushs it
+        * on the next stack.
+        *
+        * @return      void
+        */
+       function handleIncomingDecodedData ();
+
+       /**
+        * Checks whether incoming decoded data is handled.
+        *
+        * @return      $isHandled      Whether incoming decoded data is handled
+        */
+       function isIncomingRawDataHandled ();
+
+       /**
+        * Assembles incoming decoded data so it will become an abstract network
+        * package again.
+        *
+        * @return      void
+        */
+       function assembleDecodedDataToPackage ();
+
+       /**
+        * Checks whether a new message has arrived
+        *
+        * @return      $hasArrived             Whether a new message has arrived for processing
+        */
+       function isNewMessageArrived ();
+
+       /**
+        * Handle newly arrived message
+        *
+        * @return      void
+        */
+       function handleNewlyArrivedMessage ();
+
+       /**
+        * Checks whether a processed message is pending for "interpretation"
+        *
+        * @return      $isPending      Whether a processed message is pending
+        */
+       function isProcessedMessagePending ();
+
+       /**
+        * Handle processed messages by "interpreting" the 'message_type' element
+        *
+        * @return      void
+        */
+       function handleProcessedMessage ();
+
+       /**
+        * Adds raw decoded data from the given handler instance to this receiver
+        *
+        * @param       $handlerInstance        An instance of a Networkable class
+        * @return      void
+        */
+       function addRawDataToIncomingStack (Networkable $handlerInstance);
+
+       /**
+        * "Decode" the package content. This method does also verify the attached hash
+        * against the real raw package data (that what the sender has sent).
+        *
+        * @param       $rawPackageContent      The raw package content to be "decoded"
+        * @return      $packageInstance        An instance of a DeliverablePackage class
+        */
+       function decodeRawContent ($rawPackageContent);
+
+       /**
+        * Checks whether the assembler has pending data left
+        *
+        * @return      $isHandled      Whether the assembler has pending data left
+        */
+       function ifAssemblerHasPendingDataLeft ();
+
+       /**
+        * Handles the attached assemler's pending data queue to be finally
+        * assembled to the raw package data back.
+        *
+        * @return      void
+        */
+       function handleAssemblerPendingData ();
+
+       /**
+        * Handles decoded data for this node
+        *
+        * @param       $packageInstance        An instance of a DeliverablePackage class
+        * @return      void
+        */
+       function handleRawData (DeliverablePackage $packageInstance);
+
+       /**
+        * Checks whether the assembler has multiple messages pending
+        *
+        * @return      $isPending      Whether the assembler has multiple messages pending
+        */
+       function ifMultipleMessagesPending ();
+
+       /**
+        * Handles multiple messages.
+        *
+        * @return      void
+        */
+       function handleMultipleMessages ();
+
+       /**
+        * Feeds the hash and sender (as recipient for the 'sender' reward) to the
+        * miner's queue, unless the message is not a "reward claim" message as this
+        * leads to an endless loop. You may wish to run the miner to get some
+        * reward ("Hubcoins") for "mining" this hash.
+        *
+        * @param       $messageData    Array with message data
+        * @return      void
+        */
+       function feedHashToMiner (array $messageData);
+}
+
+// [EOF]
+?>