]> git.mxchange.org Git - hub.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Mon, 26 Oct 2020 10:13:01 +0000 (11:13 +0100)
committerRoland Häder <roland@mxchange.org>
Mon, 26 Oct 2020 10:14:31 +0000 (11:14 +0100)
- recipientType was used in an ambicious way: type != UNL

Signed-off-by: Roland Häder <roland@mxchange.org>
16 files changed:
application/hub/classes/container/socket/class_SocketContainer.php
application/hub/classes/discovery/protocol/class_ProtocolDiscovery.php
application/hub/classes/discovery/recipient/package/class_PackageRecipientDiscovery.php
application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php
application/hub/classes/factories/socket/class_SocketFactory.php
application/hub/classes/handler/package/class_NetworkPackageHandler.php
application/hub/classes/handler/protocol/ipv4/class_BaseIpV4ProtocolHandler.php
application/hub/classes/handler/raw_data/class_BaseRawDataHandler.php
application/hub/classes/helper/connection/ipv4/tcp/class_TcpConnectionHelper.php
application/hub/classes/listener/class_BaseListener.php
application/hub/classes/package/deliverable/class_PackageData.php
application/hub/classes/package/fragmenter/class_PackageFragmenter.php
application/hub/classes/registry/socket/class_SocketRegistry.php
application/hub/classes/tags/package/class_PackageTags.php
application/hub/exceptions/package/class_UnexpectedPackageStatusException.php
application/hub/exceptions/unl/class_InvalidUnlException.php

index 5ef1b3cb0807a75cb8aaa6fce76072438ad6d43c..fed990f13928a0a6cea6ec072251c59d81441b4e 100644 (file)
@@ -182,7 +182,7 @@ class SocketContainer extends BaseHubContainer implements StorableSocket, Visita
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getSocketProtocol()) . '-SOCKET: unl=' . $unl . ',packageInstance=' . print_r($packageInstance, true));
 
                // So, does both match?
-               $matches = (($packageInstance->getRecipientType() !== '') && ($packageInstance->getRecipientType() === $unl));
+               $matches = (($packageInstance->getRecipientUnl() !== '') && ($packageInstance->getRecipientUnl() === $unl));
 
                // Trace message
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: matches=%d - EXIT!', strtoupper($this->getSocketProtocol()), intval($matches)));
@@ -346,10 +346,10 @@ class SocketContainer extends BaseHubContainer implements StorableSocket, Visita
                $packageInstance = $this->getPackageDataInstance();
 
                // Trace message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: packageInstance.recipient=%s - EXIT!', strtoupper($this->getSocketProtocol()), $packageInstance->getRecipientType()));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: packageInstance.recipient=%s - EXIT!', strtoupper($this->getSocketProtocol()), $packageInstance->getRecipientUnl()));
 
                // Return it
-               return $packageInstance->getRecipientType();
+               return $packageInstance->getRecipientUnl();
        }
 
        /**
index 33332033671c0e93b080970af38d71334eb75300..ed01b23692da837bd92d1b2ed1934cb6c8a5f65d 100644 (file)
@@ -94,7 +94,7 @@ class ProtocolDiscovery extends BaseNodeDiscovery implements DiscoverableProtoco
                 * "Explode" the 'recipient' array element into a new one, giving at
                 * least two entries: protocol://address
                 */
-               $recipient = explode(':', $packageInstance->getRecipientType());
+               $recipient = explode(':', $packageInstance->getRecipientUnl());
 
                // At least 2 entries must be found
                assert(count($recipient) >= 2);
index 881e99ab56930c8627cd8276c56d6e1bcccebac4..29edd20f1923db6400c21b6faeb42e1e3f34d9b6 100644 (file)
@@ -80,7 +80,7 @@ class PackageRecipientDiscovery extends BaseRecipientDiscovery implements Discov
                         * recipient must be direct recipient then, otherwise a "virtual"
                         * recipient.
                         */
-                       if (NodeLocatorUtils::isValidUniversalNodeLocator($packageInstance->getRecipientType())) {
+                       if (NodeLocatorUtils::isValidUniversalNodeLocator($packageInstance->getRecipientUnl())) {
                                // Get instance (should not break)
                                $recipientInstance = ObjectFactory::createObjectByConfiguredName('direct_recipient_class');
                        } else {
@@ -89,7 +89,7 @@ class PackageRecipientDiscovery extends BaseRecipientDiscovery implements Discov
                        }
 
                        // Try to solve it
-                       $recipientInstance->resolveRecipient($packageInstance->getRecipientType(), $this->getListInstance(), $packageInstance);
+                       $recipientInstance->resolveRecipient($packageInstance->getRecipientUnl(), $this->getListInstance(), $packageInstance);
                } catch (FrameworkException $e) {
                        // Could not find class, what ever failed
                        $this->debugInstance(sprintf('[%s:%d]: Exception: %s,message=%s', __METHOD__, __LINE__, $e->__toString(), $e->getMessage()));
@@ -112,7 +112,7 @@ class PackageRecipientDiscovery extends BaseRecipientDiscovery implements Discov
                $handlerInstance = ProtocolHandlerFactory::createProtocolHandlerFromPackageInstance($packageInstance);
 
                // Is the 'recipient' field same as this peer's IP?
-               if ($handlerInstance->isOwnAddress($packageInstance->getRecipientType())) {
+               if ($handlerInstance->isOwnAddress($packageInstance->getRecipientUnl())) {
                        /*
                         * Is same as own external address + TCP/UDP listen port or
                         * internal address, don't do anything here so other classes found
@@ -121,13 +121,13 @@ class PackageRecipientDiscovery extends BaseRecipientDiscovery implements Discov
                         */
 
                        // Debug output (may flood)
-                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RECIPIENT-DISCOVERY: Recipient ' . $packageInstance->getRecipientType() . ' matches own ip (external=' .  HubTools::determineOwnExternalAddress() . ' or internal=' . HubTools::determineOwnInternalAddress() . ')');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RECIPIENT-DISCOVERY: Recipient ' . $packageInstance->getRecipientUnl() . ' matches own ip (external=' .  HubTools::determineOwnExternalAddress() . ' or internal=' . HubTools::determineOwnInternalAddress() . ')');
                } else {
                        // Debug output (may flood)
-                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RECIPIENT-DISCOVERY: Recipient ' . $packageInstance->getRecipientType() . ' is different than own external address (' .  HubTools::determineOwnExternalAddress() . ') nor internal address (' . HubTools::determineOwnInternalAddress() . '), need to forward (not yet implemented)!');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RECIPIENT-DISCOVERY: Recipient ' . $packageInstance->getRecipientUnl() . ' is different than own external address (' .  HubTools::determineOwnExternalAddress() . ') nor internal address (' . HubTools::determineOwnInternalAddress() . '), need to forward (not yet implemented)!');
 
                        // This package is to be delivered to someone else, so add it
-                       // @TODO Unfinished: $this->getListInstance()->addEntry('unl', $packageInstance->getRecipientType());
+                       // @TODO Unfinished: $this->getListInstance()->addEntry('unl', $packageInstance->getRecipientUnl());
                }
        }
 
index 1384a711128abe420b0a447994c888c295e4bc85..9c8e0d7acac40bcd2ab31e44a262182aafd29bcb 100644 (file)
@@ -207,7 +207,7 @@ class PackageSocketDiscovery extends BaseRecipientDiscovery implements Discovera
                        // Try to create a new socket resource
                        try {
                                // Possibly noisy debug message
-                               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-SOCKET-DISCOVERY: Trying to establish a ' . strtoupper($listenerInstance->getProtocolName()) . ' connection to ' . $packageInstance->getRecipientType() . ' ...');
+                               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-SOCKET-DISCOVERY: Trying to establish a ' . strtoupper($listenerInstance->getProtocolName()) . ' connection to ' . $packageInstance->getRecipientUnl() . ' ...');
 
                                // Get a socket resource from our factory (if succeeded)
                                $socketInstance = SocketFactory::createSocketFromPackageInstance($packageInstance, $protocolInstance);
@@ -229,7 +229,7 @@ class PackageSocketDiscovery extends BaseRecipientDiscovery implements Discovera
                        PeerStateResolver::resolveStateByPackage($helperInstance, $packageInstance, $socketInstance);
                } catch (InvalidSocketException $e) {
                        // This cannot be fixed, so log it away
-                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-SOCKET-DISCOVERY: Cannot discover socket resource for recipient ' . $packageInstance->getRecipientType() . ': ' . $e->getMessage());
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-SOCKET-DISCOVERY: Cannot discover socket resource for recipient ' . $packageInstance->getRecipientUnl() . ': ' . $e->getMessage());
 
                        // Make any failed attempts to 'FALSE'
                        $socketInstance = NULL;
index 3532935b4db68fa77b1d9bb30b4fcdcb92098bd8..9ddf52870e3398aec682b35ef32bc9e06ffc9d2b 100644 (file)
@@ -68,7 +68,7 @@ class SocketFactory extends ObjectFactory {
                $socketInstance = NULL;
 
                // Construct registry key
-               $registryKey = 'socket_' . $protocolInstance->getProtocolName() . '_' . $packageInstance->getRecipientType();
+               $registryKey = sprintf('socket_%s_%s', $protocolInstance->getProtocolName(), $packageInstance->getRecipientType());
 
                // Debug message
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Trying to find a socket with registryKey=' . $registryKey);
index 3416e41b4de37a73cbb7ba59ad4f9fb5184b5c1a..621c0423d5be9e7e19d06ab2bfc143776587f60e 100644 (file)
@@ -570,17 +570,13 @@ class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Recei
                        // Get current entry
                        $currentRecipient = $iteratorInstance->current();
 
-                       // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-HANDLER: Setting recipient to ' . $currentRecipient . ',previous=' . $packageInstance->getRecipientType());
-
                        // Set the recipient
-                       $packageInstance->setRecipient($currentRecipient);
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-HANDLER: Setting recipient to ' . $currentRecipient . ',previous=' . $packageInstance->getRecipientUnl());
+                       $packageInstance->setRecipientUnl($currentRecipient);
 
                        // Push the declared package to the next stack.
                        $this->getStackInstance()->pushNamed(self::STACKER_NAME_DECLARED, $packageInstance);
-
-                       // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-HANDLER: Package declared for recipient ' . $currentRecipient);
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-HANDLER: Package declared for recipient ' . $currentRecipient);
 
                        // Skip to next entry
                        $iteratorInstance->next();
@@ -1372,14 +1368,15 @@ class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Recei
         */
        public function decodeRawContent ($rawPackageContent) {
                // Use the separator '#' to "decode" it
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-HANDLER: rawPackageContent()=%d - CALLED!', strlen($rawPackageContent)));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-HANDLER: rawPackageContent()=%d - CALLED!', strlen($rawPackageContent)));
                $decodedArray = explode(self::PACKAGE_DATA_SEPARATOR, $rawPackageContent);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-HANDLER: decodedArray=' . print_r($decodedArray, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-HANDLER: decodedArray=' . print_r($decodedArray, TRUE));
 
                // Assert on count (should be always 3)
                assert(count($decodedArray) == self::DECODED_DATA_ARRAY_SIZE);
+               /* PRINTR-DEBUG: */ die(sprintf('[%s:%d] decodedArray=%s', __METHOD__, __LINE__, print_r($decodedArray, TRUE)));
 
                // Create package instance
                $packageInstance = PackageDataFactory::createPackageDataInstance();
index e1de79c23a6075a5988a97f7aba14765d3ab3b85..f289c729df5ee5d4524851879964ffd9b0c5d035 100644 (file)
@@ -82,18 +82,18 @@ abstract class BaseIpV4ProtocolHandler extends BaseProtocolHandler {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('IPV4-PROTOCOL-HANDLER: CALLED!');
 
                // Is the correct handler choosen?
-               assert(substr($packageInstance->getRecipientType(), 0, strlen($this->getHandlerName())) != $this->getHandlerName());
+               assert(substr($packageInstance->getRecipientUnl(), 0, strlen($this->getHandlerName())) != $this->getHandlerName());
 
                // Default is from generic validation
-               $isValid = NodeLocatorUtils::isValidUniversalNodeLocator($packageInstance->getRecipientType());
+               $isValid = NodeLocatorUtils::isValidUniversalNodeLocator($packageInstance->getRecipientUnl());
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('IPV4-PROTOCOL-HANDLER: packageInstance.recipient=' . $packageInstance->getRecipientType() . ',isValid[' . gettype($isValid) . ']=' . intval($isValid));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('IPV4-PROTOCOL-HANDLER: packageInstance.recipient=' . $packageInstance->getRecipientUnl() . ',isValid[' . gettype($isValid) . ']=' . intval($isValid));
 
                // If this doesn't fail, continue validating the IP:port combination
                if ($isValid === TRUE) {
                        // ... and validate IP:port, first "parse" the UNL
-                       $unlInstance = UniversalNodeLocatorFactory::createUnlInstanceFromString($packageInstance->getRecipientType());
+                       $unlInstance = UniversalNodeLocatorFactory::createUnlInstanceFromString($packageInstance->getRecipientUnl());
 
                        // Set whole UNL instance
                        // @TODO don't do this in a isValidFoo() method
index 69f44a6f085c8088af4c47f35677eeaa5796ef34..576e85c81c9fad022df12c831bc12afd72de5fce 100644 (file)
@@ -151,7 +151,7 @@ abstract class BaseRawDataHandler extends BaseHubHandler implements HandleableRa
                $ownAddress = NodeObjectFactory::createNodeInstance()->determineUniversalNodeLocator();
 
                // Does it match?
-               $matches = ($ownAddress === $packageInstance->getRecipientType());
+               $matches = ($ownAddress === $packageInstance->getRecipientUnl());
 
                // Trace message
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('RAW-DATA-HANDLER: matches=%d - EXIT!', intval($matches)));
index 68038e271ad2cccc3c676a0322f85a5bf367db91..90edd763d203d31de200071a1d65641d7d94c13d 100644 (file)
@@ -85,23 +85,23 @@ class TcpConnectionHelper extends BaseIpV4ConnectionHelper implements Connection
                        $helperInstance->setHandlerInstance($handlerInstance);
                } catch (NoValidHostnameException $e) {
                        // Debug message
-                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Failed to resolve ' . $packageInstance->getRecipientType() . ':' . $e->getMessage());
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Failed to resolve ' . $packageInstance->getRecipientUnl() . ':' . $e->getMessage());
 
                        // Is the recipient equal as configured UNL?
-                       if (substr($packageInstance->getRecipientType(), 0, strlen($helperInstance->getConfigInstance()->getConfigEntry('external_address'))) == $helperInstance->getConfigInstance()->getConfigEntry('external_address')) {
+                       if (substr($packageInstance->getRecipientUnl(), 0, strlen($helperInstance->getConfigInstance()->getConfigEntry('external_address'))) == $helperInstance->getConfigInstance()->getConfigEntry('external_address')) {
                                // This may connect to shipsimu.org and requests 'ip.php' which will return our external IP address
                                $unlAddress = HubTools::determineExternalAddress();
 
                                // Do we have ip:port match?
                                // @TODO Rewrite this test for UNLs
-                               if (strpos($packageInstance->getRecipientType(), ':') === FALSE) {
+                               if (strpos($packageInstance->getRecipientUnl(), ':') === FALSE) {
                                        // No ip:port!
-                                       $helperInstance->debugInstance(sprintf('[%s:%d]: recipient=%s does not contain ":". Please fix this.', __METHOD__, __LINE__, $packageInstance->getRecipientType()));
+                                       $helperInstance->debugInstance(sprintf('[%s:%d]: recipient=%s does not contain ":". Please fix this.', __METHOD__, __LINE__, $packageInstance->getRecipientUnl()));
                                } // END - if
 
                                // "explode" the ip:port, so index 1 will be the port number
                                // @TODO Rewrite this test for UNLs
-                               $recipientArray = explode(':', $packageInstance->getRecipientType());
+                               $recipientArray = explode(':', $packageInstance->getRecipientUnl());
 
                                // Add the port
                                $unlPort = $recipientArray[LocateableNode::UNL_PART_PORT];
@@ -111,7 +111,13 @@ class TcpConnectionHelper extends BaseIpV4ConnectionHelper implements Connection
                                //$unlInstance =;
                        } else {
                                // It doesn't match, we need to take care of this later
-                               $helperInstance->debugInstance(sprintf('[%s:%d]: recipient=%s!=%s', __METHOD__, __LINE__, $packageInstance->getRecipientType(), $helperInstance->getConfigInstance()->getConfigEntry('external_address')));
+                               $helperInstance->debugInstance(sprintf(
+                                       '[%s:%d]: recipient=%s!=%s',
+                                       __METHOD__,
+                                       __LINE__,
+                                       $packageInstance->getRecipientUnl(),
+                                       $helperInstance->getConfigInstance()->getConfigEntry('external_address')
+                               ));
                        }
                }
 
index e4baf86c7d8afd7be69638ef5a8f063fe5b5f457..a57e8c3e4a51918b99846e357fa70912460eb2b7 100644 (file)
@@ -405,7 +405,7 @@ abstract class BaseListener extends BaseHubSystem implements Visitable {
                // Set all required data
                $socketInstance->setSenderAddres($peerAddress . $peerSuffix);
                $socketInstance->setSenderPort($peerPort);
-               $socketInstance->setRecipient($nodeInstance->getSessionId());
+               $socketInstance->setRecipientId($nodeInstance->getSessionId());
                $socketInstance->setStatus(NetworkPackageHandler::PACKAGE_STATUS_FAKED);
                die(__METHOD__.': UNFINISHED!');
 
@@ -436,7 +436,7 @@ abstract class BaseListener extends BaseHubSystem implements Visitable {
                $socketProtocol = $this->getSocketInstance()->getSocketProtocol();
 
                // Get UNL instance
-               $unlInstance = UniversalNodeLocatorFactory::createUnlInstanceFromString($packageInstance->getRecipientType());
+               $unlInstance = UniversalNodeLocatorFactory::createUnlInstanceFromString($packageInstance->getRecipientUnl());
 
                // Get protocol from it
                $unlProtocol = $unlInstance->getUnlProtocol();
index 7958b837932a4233e17a0d617a1e5d16d8887fdd..badb7b7eb5fc8f2a79e241328f09492302d2b4f8 100644 (file)
@@ -62,6 +62,11 @@ class PackageData extends BaseHubSystem implements DeliverablePackage, Registera
         */
        private $recipientType;
 
+       /**
+        * Recipient UNL
+        */
+       private $recipientUnl;
+
        /**
         * Status
         */
@@ -190,6 +195,25 @@ class PackageData extends BaseHubSystem implements DeliverablePackage, Registera
                $this->recipientType = $recipientType;
        }
 
+       /**
+        * Getter for recipient UNL
+        *
+        * @return      $recipientUnl   Recipient UNL
+        */
+       public function getRecipientUnl () {
+               return $this->recipientUnl;
+       }
+
+       /**
+        * Setter for recipient UNL
+        *
+        * @param       $recipientUnl   Recipient UNL
+        * @return      void
+        */
+       public function setRecipientUnl ($recipientUnl) {
+               $this->recipientUnl = $recipientUnl;
+       }
+
        /**
         * Getter for status
         *
index 9876361e3e4a1489093be58f0ac9dbfeee50f2c9..837c88b98484ad461f7e512e9a978e95a1b5b3fb 100644 (file)
@@ -173,7 +173,7 @@ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registera
        private function getProcessedPackagesIndex (DeliverablePackage $packageInstance) {
                return (
                        $packageInstance->getSenderAddress()  . NetworkPackageHandler::PACKAGE_DATA_SEPARATOR .
-                       $packageInstance->getRecipientType()  . NetworkPackageHandler::PACKAGE_DATA_SEPARATOR .
+                       $packageInstance->getRecipientUnl()   . NetworkPackageHandler::PACKAGE_DATA_SEPARATOR .
                        $packageInstance->getPackageContent() . NetworkPackageHandler::PACKAGE_DATA_SEPARATOR
                );
        }
index c3eb55e95f225379dd0993c7407678484001eae7..6e944b1709af3e0e7f7002bf0890a70a90434e6b 100644 (file)
@@ -311,7 +311,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
                                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: key=' . $key . ',subKey=' . $subKey . ',socketInstance=' . $socketInstance->__toString());
 
                                // Is this a StorableSocket instance and is the address the same?
-                               if (($socketInstance instanceof StorableSocket) && ($socketInstance->ifAddressMatches($packageInstance->getRecipientType()))) {
+                               if (($socketInstance instanceof StorableSocket) && ($socketInstance->ifAddressMatches($packageInstance->getRecipientUnl()))) {
                                        // Debug die
                                        //* DEBUG-DIE: */ die(__METHOD__ . ': socketInstance=' . print_r($socketInstance, TRUE));
 
index 0e08f5b0f44f9e136eed04856d2aa078da111c2d..7079839cc11b2b99824ef1a0bf7bb1ec738cf58a 100644 (file)
@@ -8,6 +8,7 @@ use Org\Shipsimu\Hub\Factory\Registry\Object\ObjectTypeRegistryFactory;
 use Org\Shipsimu\Hub\Handler\Package\NetworkPackageHandler;
 use Org\Shipsimu\Hub\Listener\Listenable;
 use Org\Shipsimu\Hub\Network\Package\DeliverablePackage;
+use Org\Shipsimu\Hub\Node\Tagging\InvalidTagException;
 use Org\Shipsimu\Hub\Tag\BaseTag;
 use Org\Shipsimu\Hub\Tag\Tagable;
 use Org\Shipsimu\Hub\Template\Engine\Xml\ObjectRegistry\XmlObjectRegistryTemplateEngine;
index 1d7db4f547facbbe4970ba824b6c12167ff18898..f6f6b79711d378417cefd47d14af833d3a077ab2 100644 (file)
@@ -37,12 +37,12 @@ class UnexpectedPackageStatusException extends FrameworkException {
         */
        public function __construct (array $messageArray, $code) {
                // Construct the message
-               $message = sprintf('[%s:%d] Unexpected package status %s!=%s detected, recipientType=%s, sender=%s:%d, hash=%s.',
+               $message = sprintf('[%s:%d] Unexpected package status %s!=%s detected, recipientUnl=%s, sender=%s:%d, hash=%s.',
                        $messageArray[0]->__toString(),
                        $this->getLine(),
                        $messageArray[1]->getPackageStatus(),
                        $messageArray[2],
-                       $messageArray[1]->getRecipientType(),
+                       $messageArray[1]->getRecipientUnl(),
                        $messageArray[1]->getSenderAddress(),
                        $messageArray[1]->getSenderPort(),
                        $messageArray[1]->getHash()
index b1a6c071afa90865a385f2b5cab18daabcf3968f..ecf8aac05c86d60fbc3ada2419157e6cdfc37c12 100644 (file)
@@ -40,11 +40,11 @@ class InvalidUnlException extends FrameworkException {
         */
        public function __construct (array $messageArray, $code) {
                // Construct the message
-               $message = sprintf('[%s:%d] The protocol handler %s cannot validate recipient %s.',
+               $message = sprintf('[%s:%d] The protocol handler %s cannot validate recipientUnl=%s.',
                        $messageArray[0]->__toString(),
                        $this->getLine(),
                        $messageArray[1]->__toString(),
-                       $messageArray[2]->getRecipientType()
+                       $messageArray[2]->getRecipientUnl()
                );
 
                // Call parent exception constructor