From cf06e96663282bf451f715cae61d9dacb2c063a0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 28 Sep 2020 07:14:35 +0200 Subject: [PATCH] Continued: - added missing imports MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../classes/database/frontend/class_BaseHubDatabaseWrapper.php | 1 + .../hub/classes/decoder/package/class_PackageDecoder.php | 1 + application/hub/classes/handler/class_BaseHubHandler.php | 1 + .../hub/classes/handler/package/class_NetworkPackageHandler.php | 2 +- .../hub/classes/handler/raw_data/class_BaseRawDataHandler.php | 1 - .../classes/helper/connection/class_BaseConnectionHelper.php | 1 + application/hub/classes/helper/dht/class_DhtBootstrapHelper.php | 1 + .../hub/classes/helper/dht/class_DhtPublishEntryHelper.php | 1 + .../helper/node/announcement/class_NodeAnnouncementHelper.php | 1 + .../announcement/class_NodeAnnouncementMessageAnswerHelper.php | 1 + .../answer/dht/class_NodeDhtBootstrapMessageAnswerHelper.php | 1 + .../requests/class_NodeRequestNodeListMessageAnswerHelper.php | 1 + .../helper/node/connection/class_NodeSelfConnectHelper.php | 1 + .../helper/node/requests/class_NodeRequestNodeListHelper.php | 1 + .../hub/classes/listener/class_BaseListenerDecorator.php | 1 + application/hub/classes/listener/tcp/class_TcpListener.php | 1 - .../classes/tasks/network/class_NetworkPackageReaderTask.php | 1 + .../classes/tasks/network/class_NetworkPackageWriterTask.php | 1 + .../classes/visitor/socket/class_HalfShutdownSocketVisitor.php | 1 + .../hub/classes/visitor/socket/class_ShutdownSocketVisitor.php | 1 + application/hub/interfaces/receiver/class_Receivable.php | 1 + 21 files changed, 19 insertions(+), 3 deletions(-) diff --git a/application/hub/classes/database/frontend/class_BaseHubDatabaseWrapper.php b/application/hub/classes/database/frontend/class_BaseHubDatabaseWrapper.php index 2963ce47c..ab09bca9c 100644 --- a/application/hub/classes/database/frontend/class_BaseHubDatabaseWrapper.php +++ b/application/hub/classes/database/frontend/class_BaseHubDatabaseWrapper.php @@ -12,6 +12,7 @@ use Org\Shipsimu\Hub\Pool\Poolable; // Import framework stuff use Org\Mxchange\CoreFramework\Database\Frontend\BaseDatabaseWrapper; +use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; /** * A general hub database wrapper diff --git a/application/hub/classes/decoder/package/class_PackageDecoder.php b/application/hub/classes/decoder/package/class_PackageDecoder.php index 5eddd4ed7..01f767f64 100644 --- a/application/hub/classes/decoder/package/class_PackageDecoder.php +++ b/application/hub/classes/decoder/package/class_PackageDecoder.php @@ -6,6 +6,7 @@ namespace Org\Shipsimu\Hub\Network\Decoder\Package; use Org\Shipsimu\Hub\Decoder\BaseDecoder; use Org\Shipsimu\Hub\Decoder\Decodeable; use Org\Shipsimu\Hub\Factory\Discovery\Package\PackageDiscoveryFactory; +use Org\Shipsimu\Hub\Factory\Handler\Network\NetworkPackageHandlerFactory; use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory; use Org\Shipsimu\Hub\Handler\Network\RawData\Chunks\ChunkHandler; use Org\Shipsimu\Hub\Handler\Network\RawData\Chunks\HandleableChunks; diff --git a/application/hub/classes/handler/class_BaseHubHandler.php b/application/hub/classes/handler/class_BaseHubHandler.php index 07ed8ab95..aa464b1d2 100644 --- a/application/hub/classes/handler/class_BaseHubHandler.php +++ b/application/hub/classes/handler/class_BaseHubHandler.php @@ -12,6 +12,7 @@ use Org\Shipsimu\Hub\Locator\Node\LocateableNode; use Org\Shipsimu\Hub\Pool\Poolable; // Import framework stuff +use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; use Org\Mxchange\CoreFramework\Handler\BaseHandler; use Org\Mxchange\CoreFramework\Handler\Handleable; diff --git a/application/hub/classes/handler/package/class_NetworkPackageHandler.php b/application/hub/classes/handler/package/class_NetworkPackageHandler.php index 32a52e256..08d00692f 100644 --- a/application/hub/classes/handler/package/class_NetworkPackageHandler.php +++ b/application/hub/classes/handler/package/class_NetworkPackageHandler.php @@ -1171,7 +1171,7 @@ class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Recei //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: errorCode=' . $packageInstance->getErrorCode() . '(' . StorableSocket::SOCKET_ERROR_UNHANDLED . ')'); if (substr($packageInstance->getRawData(), -1, 1) == PackageFragmenter::CHUNK_SEPARATOR) { // It is there and should be removed - $packageInstance->getRawData() = substr($packageInstance->getRawData(), 0, -1); + $packageInstance->setRawData(substr($packageInstance->getRawData(), 0, -1)); } // END - if // This package is "handled" and can be pushed on the next stack diff --git a/application/hub/classes/handler/raw_data/class_BaseRawDataHandler.php b/application/hub/classes/handler/raw_data/class_BaseRawDataHandler.php index 0ac476c8f..d025a7c2e 100644 --- a/application/hub/classes/handler/raw_data/class_BaseRawDataHandler.php +++ b/application/hub/classes/handler/raw_data/class_BaseRawDataHandler.php @@ -12,7 +12,6 @@ use Org\Shipsimu\Hub\Network\Package\DeliverablePackage; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\ObjectFactory; -use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; /** * A general Handler for raw data from sockets diff --git a/application/hub/classes/helper/connection/class_BaseConnectionHelper.php b/application/hub/classes/helper/connection/class_BaseConnectionHelper.php index 5d4caf469..46be16fc9 100644 --- a/application/hub/classes/helper/connection/class_BaseConnectionHelper.php +++ b/application/hub/classes/helper/connection/class_BaseConnectionHelper.php @@ -5,6 +5,7 @@ namespace Org\Shipsimu\Hub\Helper\Connection; // Import application-specific stuff use Org\Shipsimu\Hub\Container\Socket\StorableSocket; use Org\Shipsimu\Hub\Factory\Fragmenter\FragmenterFactory; +use Org\Shipsimu\Hub\Factory\Handler\Network\NetworkPackageHandlerFactory; use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory; use Org\Shipsimu\Hub\Factory\State\Peer\PeerStateFactory; use Org\Shipsimu\Hub\Handler\Package\NetworkPackageHandler; diff --git a/application/hub/classes/helper/dht/class_DhtBootstrapHelper.php b/application/hub/classes/helper/dht/class_DhtBootstrapHelper.php index 17f98319d..d16ddfd1a 100644 --- a/application/hub/classes/helper/dht/class_DhtBootstrapHelper.php +++ b/application/hub/classes/helper/dht/class_DhtBootstrapHelper.php @@ -4,6 +4,7 @@ namespace Org\Shipsimu\Hub\Helper\Dht\Bootstrap; // Import application-specific stuff use Org\Shipsimu\Hub\Dht\Distributable; +use Org\Shipsimu\Hub\Factory\Handler\Network\NetworkPackageHandlerFactory; use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory; use Org\Shipsimu\Hub\Generic\BaseHubSystem; use Org\Shipsimu\Hub\Handler\Package\NetworkPackageHandler; diff --git a/application/hub/classes/helper/dht/class_DhtPublishEntryHelper.php b/application/hub/classes/helper/dht/class_DhtPublishEntryHelper.php index 0af95d918..cc7dcbb5c 100644 --- a/application/hub/classes/helper/dht/class_DhtPublishEntryHelper.php +++ b/application/hub/classes/helper/dht/class_DhtPublishEntryHelper.php @@ -4,6 +4,7 @@ namespace Org\Shipsimu\Hub\Helper\Dht\Publish; // Import application-specific stuff use Org\Shipsimu\Hub\Dht\Distributable; +use Org\Shipsimu\Hub\Factory\Handler\Network\NetworkPackageHandlerFactory; use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory; use Org\Shipsimu\Hub\Generic\BaseHubSystem; use Org\Shipsimu\Hub\Handler\Package\NetworkPackageHandler; diff --git a/application/hub/classes/helper/node/announcement/class_NodeAnnouncementHelper.php b/application/hub/classes/helper/node/announcement/class_NodeAnnouncementHelper.php index b3eca5b58..f9492ca26 100644 --- a/application/hub/classes/helper/node/announcement/class_NodeAnnouncementHelper.php +++ b/application/hub/classes/helper/node/announcement/class_NodeAnnouncementHelper.php @@ -3,6 +3,7 @@ namespace Org\Shipsimu\Hub\Node\Helper\Announcement; // Import application-specific stuff +use Org\Shipsimu\Hub\Factory\Handler\Network\NetworkPackageHandlerFactory; use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory; use Org\Shipsimu\Hub\Handler\Package\NetworkPackageHandler; use Org\Shipsimu\Hub\Helper\Node\BaseNodeHelper; diff --git a/application/hub/classes/helper/node/answer/announcement/class_NodeAnnouncementMessageAnswerHelper.php b/application/hub/classes/helper/node/answer/announcement/class_NodeAnnouncementMessageAnswerHelper.php index fb8f34ef1..52efa0db1 100644 --- a/application/hub/classes/helper/node/answer/announcement/class_NodeAnnouncementMessageAnswerHelper.php +++ b/application/hub/classes/helper/node/answer/announcement/class_NodeAnnouncementMessageAnswerHelper.php @@ -3,6 +3,7 @@ namespace Org\Shipsimu\Hub\Node\Helper\Answer\Announcement; // Import application-specific stuff +use Org\Shipsimu\Hub\Factory\Handler\Network\NetworkPackageHandlerFactory; use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory; use Org\Shipsimu\Hub\Helper\Node\HelpableNode; use Org\Shipsimu\Hub\Node\Node; diff --git a/application/hub/classes/helper/node/answer/dht/class_NodeDhtBootstrapMessageAnswerHelper.php b/application/hub/classes/helper/node/answer/dht/class_NodeDhtBootstrapMessageAnswerHelper.php index a9022252f..c596fc77c 100644 --- a/application/hub/classes/helper/node/answer/dht/class_NodeDhtBootstrapMessageAnswerHelper.php +++ b/application/hub/classes/helper/node/answer/dht/class_NodeDhtBootstrapMessageAnswerHelper.php @@ -3,6 +3,7 @@ namespace Org\Shipsimu\Hub\Node\Helper\Answer\Dht\Bootstrap; // Import application-specific stuff +use Org\Shipsimu\Hub\Factory\Handler\Network\NetworkPackageHandlerFactory; use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory; use Org\Shipsimu\Hub\Helper\Node\HelpableNode; use Org\Shipsimu\Hub\Node\Node; diff --git a/application/hub/classes/helper/node/answer/requests/class_NodeRequestNodeListMessageAnswerHelper.php b/application/hub/classes/helper/node/answer/requests/class_NodeRequestNodeListMessageAnswerHelper.php index e0bc1890b..09f675a53 100644 --- a/application/hub/classes/helper/node/answer/requests/class_NodeRequestNodeListMessageAnswerHelper.php +++ b/application/hub/classes/helper/node/answer/requests/class_NodeRequestNodeListMessageAnswerHelper.php @@ -3,6 +3,7 @@ namespace Org\Shipsimu\Hub\Node\Helper\Answer\Request\NodeList; // Import application-specific stuff +use Org\Shipsimu\Hub\Factory\Handler\Network\NetworkPackageHandlerFactory; use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory; use Org\Shipsimu\Hub\Helper\Node\HelpableNode; use Org\Shipsimu\Hub\Node\Node; diff --git a/application/hub/classes/helper/node/connection/class_NodeSelfConnectHelper.php b/application/hub/classes/helper/node/connection/class_NodeSelfConnectHelper.php index 6e5e85212..96fe37025 100644 --- a/application/hub/classes/helper/node/connection/class_NodeSelfConnectHelper.php +++ b/application/hub/classes/helper/node/connection/class_NodeSelfConnectHelper.php @@ -3,6 +3,7 @@ namespace Org\Shipsimu\Hub\Node\Helper\SelfConnect; // Import application-specific stuff +use Org\Shipsimu\Hub\Factory\Handler\Network\NetworkPackageHandlerFactory; use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory; use Org\Shipsimu\Hub\Handler\Package\NetworkPackageHandler; use Org\Shipsimu\Hub\Helper\Node\BaseNodeHelper; diff --git a/application/hub/classes/helper/node/requests/class_NodeRequestNodeListHelper.php b/application/hub/classes/helper/node/requests/class_NodeRequestNodeListHelper.php index 77e13a54e..64d27d293 100644 --- a/application/hub/classes/helper/node/requests/class_NodeRequestNodeListHelper.php +++ b/application/hub/classes/helper/node/requests/class_NodeRequestNodeListHelper.php @@ -3,6 +3,7 @@ namespace Org\Shipsimu\Hub\Node\Helper\Request\NodeList; // Import application-specific stuff +use Org\Shipsimu\Hub\Factory\Handler\Network\NetworkPackageHandlerFactory; use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory; use Org\Shipsimu\Hub\Handler\Package\NetworkPackageHandler; use Org\Shipsimu\Hub\Helper\Node\BaseNodeHelper; diff --git a/application/hub/classes/listener/class_BaseListenerDecorator.php b/application/hub/classes/listener/class_BaseListenerDecorator.php index 3aa9a45c0..6dd4b9f7e 100644 --- a/application/hub/classes/listener/class_BaseListenerDecorator.php +++ b/application/hub/classes/listener/class_BaseListenerDecorator.php @@ -4,6 +4,7 @@ namespace Org\Shipsimu\Hub\Listener; // Import application-specific stuff use Org\Shipsimu\Hub\Container\Socket\StorableSocket; +use Org\Shipsimu\Hub\Factory\Handler\Network\NetworkPackageHandlerFactory; use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory; use Org\Shipsimu\Hub\Listener\Listenable; use Org\Shipsimu\Hub\Locator\Node\LocateableNode; diff --git a/application/hub/classes/listener/tcp/class_TcpListener.php b/application/hub/classes/listener/tcp/class_TcpListener.php index 33d211caf..88283c626 100644 --- a/application/hub/classes/listener/tcp/class_TcpListener.php +++ b/application/hub/classes/listener/tcp/class_TcpListener.php @@ -10,7 +10,6 @@ use Org\Shipsimu\Hub\Listener\Listenable; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\ObjectFactory; -use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; /** * A TCP connection listener diff --git a/application/hub/classes/tasks/network/class_NetworkPackageReaderTask.php b/application/hub/classes/tasks/network/class_NetworkPackageReaderTask.php index f3c0df456..8a697f817 100644 --- a/application/hub/classes/tasks/network/class_NetworkPackageReaderTask.php +++ b/application/hub/classes/tasks/network/class_NetworkPackageReaderTask.php @@ -3,6 +3,7 @@ namespace Org\Shipsimu\Hub\Task\Network\Reader; // Import application-specific stuff +use Org\Shipsimu\Hub\Factory\Handler\Network\NetworkPackageHandlerFactory; use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory; // Import framework stuff diff --git a/application/hub/classes/tasks/network/class_NetworkPackageWriterTask.php b/application/hub/classes/tasks/network/class_NetworkPackageWriterTask.php index a76a98758..8296bcb5e 100644 --- a/application/hub/classes/tasks/network/class_NetworkPackageWriterTask.php +++ b/application/hub/classes/tasks/network/class_NetworkPackageWriterTask.php @@ -3,6 +3,7 @@ namespace Org\Shipsimu\Hub\Task\Network\Writer; // Import application-specific stuff +use Org\Shipsimu\Hub\Factory\Handler\Network\NetworkPackageHandlerFactory; use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory; // Import framework stuff diff --git a/application/hub/classes/visitor/socket/class_HalfShutdownSocketVisitor.php b/application/hub/classes/visitor/socket/class_HalfShutdownSocketVisitor.php index e3965fad7..73146c897 100644 --- a/application/hub/classes/visitor/socket/class_HalfShutdownSocketVisitor.php +++ b/application/hub/classes/visitor/socket/class_HalfShutdownSocketVisitor.php @@ -3,6 +3,7 @@ namespace Org\Shipsimu\Hub\Visitor\Shutdown\Socket; // Import application-specific stuff +use Org\Shipsimu\Hub\Factory\Handler\Network\NetworkPackageHandlerFactory; use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory; use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper; use Org\Shipsimu\Hub\Network\Delivery\Deliverable; diff --git a/application/hub/classes/visitor/socket/class_ShutdownSocketVisitor.php b/application/hub/classes/visitor/socket/class_ShutdownSocketVisitor.php index adddac183..232ccca0f 100644 --- a/application/hub/classes/visitor/socket/class_ShutdownSocketVisitor.php +++ b/application/hub/classes/visitor/socket/class_ShutdownSocketVisitor.php @@ -4,6 +4,7 @@ namespace Org\Shipsimu\Hub\Visitor\Shutdown\Socket; // Import application-specific stuff use Org\Shipsimu\Hub\Container\Socket\StorableSocket; +use Org\Shipsimu\Hub\Factory\Handler\Network\NetworkPackageHandlerFactory; use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory; use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper; use Org\Shipsimu\Hub\Network\Delivery\Deliverable; diff --git a/application/hub/interfaces/receiver/class_Receivable.php b/application/hub/interfaces/receiver/class_Receivable.php index 7b0281080..70ee6a2e5 100644 --- a/application/hub/interfaces/receiver/class_Receivable.php +++ b/application/hub/interfaces/receiver/class_Receivable.php @@ -4,6 +4,7 @@ namespace Org\Shipsimu\Hub\Network\Receive; // Import application-specific stuff use Org\Shipsimu\Hub\Network\Networkable; +use Org\Shipsimu\Hub\Network\Package\DeliverablePackage; // Import application-specific stuff use Org\Shipsimu\Hub\Generic\HubInterface; -- 2.39.5