]> git.mxchange.org Git - hub.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Mon, 7 Dec 2020 08:27:16 +0000 (09:27 +0100)
committerRoland Häder <roland@mxchange.org>
Mon, 7 Dec 2020 08:27:16 +0000 (09:27 +0100)
- moved ObjectFactory into deeper namespace
- also it is now final, please extend BaseFactory instead

Signed-off-by: Roland Häder <roland@mxchange.org>
102 files changed:
application/hub/class_ApplicationHelper.php
application/hub/classes/commands/console/class_HubConsoleAptProxyCommand.php
application/hub/classes/commands/console/class_HubConsoleChatCommand.php
application/hub/classes/commands/console/class_HubConsoleCrawlerCommand.php
application/hub/classes/commands/console/class_HubConsoleCruncherCommand.php
application/hub/classes/commands/console/class_HubConsoleMainCommand.php
application/hub/classes/commands/console/class_HubConsoleMinerCommand.php
application/hub/classes/commands/html/class_HubHtmlIndexCommand.php
application/hub/classes/container/socket/class_SocketContainer.php
application/hub/classes/controller/console/class_HubConsoleDefaultNewsController.php
application/hub/classes/cruncher/class_BaseHubCruncher.php
application/hub/classes/cruncher/openssl/class_HubOpenSslCruncher.php
application/hub/classes/database/frontend/cruncher/class_CruncherUnitDatabaseFrontend.php
application/hub/classes/database/frontend/node_dht/class_NodeDistributedHashTableDatabaseFrontend.php
application/hub/classes/database/frontend/node_information/class_NodeInformationDatabaseFrontend.php
application/hub/classes/database/frontend/states/class_PeerStateLookupDatabaseFrontend.php
application/hub/classes/dht/class_BaseDht.php
application/hub/classes/dht/node/class_NodeDhtFacade.php
application/hub/classes/discovery/recipient/package/class_PackageRecipientDiscovery.php
application/hub/classes/factories/chain/class_PackageFilterChainFactory.php
application/hub/classes/factories/chunks/class_ChunkHandlerFactory.php
application/hub/classes/factories/class_
application/hub/classes/factories/client/class_ClientFactory.php
application/hub/classes/factories/communicator/class_CommunicatorFactory.php
application/hub/classes/factories/decoder/class_DecoderFactory.php
application/hub/classes/factories/dht/class_DhtObjectFactory.php
application/hub/classes/factories/discovery/class_PackageDiscoveryFactory.php
application/hub/classes/factories/discovery/class_SocketDiscoveryFactory.php
application/hub/classes/factories/handler/class_MessageTypeHandlerFactory.php
application/hub/classes/factories/handler/class_NetworkPackageHandlerFactory.php
application/hub/classes/factories/handler/class_ProtocolHandlerFactory.php
application/hub/classes/factories/info/class_ConnectionInfoFactory.php
application/hub/classes/factories/lists/class_RecipientListFactory.php
application/hub/classes/factories/locator/class_UniversalNodeLocatorFactory.php
application/hub/classes/factories/node/class_NodeObjectFactory.php
application/hub/classes/factories/package/assembler/class_PackageAssemblerFactory.php
application/hub/classes/factories/package/class_NetworkPackageFactory.php
application/hub/classes/factories/package/fragmenter/class_FragmenterFactory.php
application/hub/classes/factories/producer/class_ProducerFactory.php
application/hub/classes/factories/registry/class_ObjectTypeRegistryFactory.php
application/hub/classes/factories/resolver/class_ProtocolResolverFactory.php
application/hub/classes/factories/socket/class_SocketFactory.php
application/hub/classes/factories/source/units/class_UnitSourceFactory.php
application/hub/classes/factories/source/url/class_UrlSourceObjectFactory.php
application/hub/classes/factories/states/communicator/class_CommunicatorStateFactory.php
application/hub/classes/factories/states/crawler/class_CrawlerStateFactory.php
application/hub/classes/factories/states/cruncher/class_CruncherStateFactory.php
application/hub/classes/factories/states/dht/class_DhtStateFactory.php
application/hub/classes/factories/states/miner/class_MinerStateFactory.php
application/hub/classes/factories/states/node/class_NodeStateFactory.php
application/hub/classes/factories/states/peer/class_PeerStateFactory.php
application/hub/classes/factories/tags/class_PackageTagsFactory.php
application/hub/classes/filter/activation/node/class_NodeActivationAnnouncementFilter.php
application/hub/classes/filter/apt-proxy/class_AptProxyInitializationFilter.php
application/hub/classes/filter/chat/class_ChatInitializationFilter.php
application/hub/classes/filter/crawler/class_CrawlerInitializationFilter.php
application/hub/classes/filter/cruncher/class_CruncherInitializationFilter.php
application/hub/classes/filter/miner/class_MinerInitializationFilter.php
application/hub/classes/filter/task/apt-proxy/class_AptProxyTaskHandlerInitializerFilter.php
application/hub/classes/filter/task/chat/class_ChatTaskHandlerInitializerFilter.php
application/hub/classes/filter/task/crawler/class_CrawlerTaskHandlerInitializerFilter.php
application/hub/classes/filter/task/cruncher/class_CruncherTaskHandlerInitializerFilter.php
application/hub/classes/filter/task/miner/class_MinerTaskHandlerInitializerFilter.php
application/hub/classes/filter/task/node/class_NodeTaskHandlerInitializerFilter.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/handler/raw_data/class_BaseRawDataHandler.php
application/hub/classes/helper/connection/class_BaseConnectionHelper.php
application/hub/classes/helper/messages/crypto/class_CryptoRandomUnitMessageHelper.php
application/hub/classes/listener/class_BaseListener.php
application/hub/classes/listener/socket/class_SocketFileListener.php
application/hub/classes/listener/tcp/class_TcpListener.php
application/hub/classes/listener/udp/class_UdpListener.php
application/hub/classes/lists/pool/class_PoolEntriesList.php
application/hub/classes/miner/chash/class_HubCoinMiner.php
application/hub/classes/miner/class_BaseHubMiner.php
application/hub/classes/nodes/boot/class_HubBootNode.php
application/hub/classes/nodes/class_BaseHubNode.php
application/hub/classes/nodes/list/class_HubListNode.php
application/hub/classes/nodes/master/class_HubMasterNode.php
application/hub/classes/nodes/regular/class_HubRegularNode.php
application/hub/classes/package/assembler/class_PackageAssembler.php
application/hub/classes/package/fragmenter/class_PackageFragmenter.php
application/hub/classes/pools/class_BasePool.php
application/hub/classes/producer/class_BaseProducer.php
application/hub/classes/producer/cruncher/keys/cruncher/class_CruncherKeyProducer.php
application/hub/classes/producer/cruncher/work_units/cruncher/class_CruncherTestUnitProducer.php
application/hub/classes/producer/miner/blocks/miner/class_MinerRealGenesisBlockProducer.php
application/hub/classes/producer/miner/blocks/miner/class_MinerTestGenesisBlockProducer.php
application/hub/classes/recipient/dht/class_DhtRecipient.php
application/hub/classes/registry/socket/class_SocketRegistry.php
application/hub/classes/resolver/protocol/tcp/class_TcpProtocolResolver.php
application/hub/classes/resolver/state/class_BaseStateResolver.php
application/hub/classes/source/class_BaseUrlSource.php
application/hub/classes/source/units/class_TestUnitSource.php
application/hub/classes/source/urls/class_CrawlerUploadedListUrlSource.php
application/hub/classes/tools/hub/class_HubTools.php
application/hub/config.php
application/hub/exceptions/factory/class_FactoryRequiredParameterException.php
core
index.php

index f23d7ea1abcc7ad4b9ab2681a6eb5188be235165..4e7938a79bccd9571997c71f98bb95f90a2e7db5 100644 (file)
@@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Tools\HubTools;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Application\BaseApplication;
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Loader\ClassLoader;
 use Org\Mxchange\CoreFramework\Manager\ManageableApplication;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
index 75141fdd281d24a668c1b6d045ca24d9b0611833..211cb43cb2b30aa0b52aa1b18cb8c1ffbcc3f764 100644 (file)
@@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Command;
 use Org\Mxchange\CoreFramework\Command\BaseCommand;
 use Org\Mxchange\CoreFramework\Command\Commandable;
 use Org\Mxchange\CoreFramework\Controller\Controller;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Request\Requestable;
index c5a549a5d62857142764ffb877c758089588a218..3c0affdd12cda1fe4d0ed615d9fbf30800cedde1 100644 (file)
@@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Command;
 use Org\Mxchange\CoreFramework\Command\BaseCommand;
 use Org\Mxchange\CoreFramework\Command\Commandable;
 use Org\Mxchange\CoreFramework\Controller\Controller;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Request\Requestable;
index 3b2563e58e22f0654bd30fde882c2d4301b8bc8d..9295407f947918c10767767d66a29fcf452822e5 100644 (file)
@@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Command;
 use Org\Mxchange\CoreFramework\Command\BaseCommand;
 use Org\Mxchange\CoreFramework\Command\Commandable;
 use Org\Mxchange\CoreFramework\Controller\Controller;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Request\Requestable;
index 43f648857da2e9681b6d54a25601ed9c18fac9e2..34a52c3fedbca6128086095efa364366e11ccb76 100644 (file)
@@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Command;
 use Org\Mxchange\CoreFramework\Command\BaseCommand;
 use Org\Mxchange\CoreFramework\Command\Commandable;
 use Org\Mxchange\CoreFramework\Controller\Controller;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Request\Requestable;
index 526c45c2bd7251fe243d2b72d5eeb1d74bd4dbc7..bca4ecfd2698edfe5a9458ad1ab9bafdbcaa28d1 100644 (file)
@@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Command\BaseCommand;
 use Org\Mxchange\CoreFramework\Command\Commandable;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Controller\Controller;
 use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
index 1655d076f3bc706edf5e0b09cb7bbc8875ec0816..4d9761b28bc9dfc4a6e1ad81ca01cf34df09c23d 100644 (file)
@@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Command;
 use Org\Mxchange\CoreFramework\Command\BaseCommand;
 use Org\Mxchange\CoreFramework\Command\Commandable;
 use Org\Mxchange\CoreFramework\Controller\Controller;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Request\Requestable;
index d9ac5a7ee01df68217de3d6317965a4450906200..f710c1927ccd8f0e6cc7c4b9a9ea7a2e276fd190 100644 (file)
@@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Command;
 use Org\Mxchange\CoreFramework\Command\BaseCommand;
 use Org\Mxchange\CoreFramework\Command\Commandable;
 use Org\Mxchange\CoreFramework\Controller\Controller;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Request\Requestable;
 use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
 use Org\Mxchange\CoreFramework\Response\Responseable;
index b056f92e8354268db4d269f831cbb4fd56add431..efabd8a0e746eed8ee38f5587940c05cc3115f84 100644 (file)
@@ -16,7 +16,7 @@ use Org\Shipsimu\Hub\Network\Package\DeliverablePackage;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Generic\NullPointerException;
 use Org\Mxchange\CoreFramework\Helper\Helper;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
index a82694e28e90f20958c974d7cfd454849b526d82..8e21d9090344883575abe2ce33c62365c6ce53f3 100644 (file)
@@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Controller;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Controller\BaseController;
 use Org\Mxchange\CoreFramework\Controller\Controller;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filter\Filterable;
 use Org\Mxchange\CoreFramework\Request\Requestable;
 use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
index 573366ef86104e42d5465f492e5b02448c4bde63..4c548d3b9ceb18324c8840ee488856d0d4532c87 100644 (file)
@@ -9,7 +9,7 @@ use Org\Shipsimu\Hub\Generic\BaseHubSystem;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Database\Updateable;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
 /**
index 748dd54c6277d6ea3f8f2eb7764bcd15d058881b..2e08dca0f3908e4bf9ad8cb025024bf53f90a0a5 100644 (file)
@@ -9,7 +9,7 @@ use Org\Shipsimu\Hub\Helper\Cruncher\CruncherHelper;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Controller\Controller;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 use Org\Mxchange\CoreFramework\Response\Responseable;
 
index 1a4b3ff70681f0cf904c89126cfa2edec66afd97..0f52971a95e1467b3c2b2fe1286d49dc8574c005 100644 (file)
@@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Database\Frontend\Unit\UnitDatabaseFrontend;
 use Org\Shipsimu\Hub\Producer\Cruncher\Unit\BaseUnitProducer;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 
 /**
index db468c2b16d85ae7d012262cadef286ecd4c6b69..02da97f9b407c94802df1e1b83c0b6dfa3893f33 100644 (file)
@@ -14,7 +14,7 @@ use Org\Shipsimu\Hub\Node\BaseHubNode;
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Criteria\Local\LocalSearchCriteria;
 use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Handler\DataSet\HandleableDataSet;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 use Org\Mxchange\CoreFramework\Result\Search\SearchableResult;
index ba9e0e37a3d35a70211905e640107b7165a999c5..0f0ae5ade8b20f3c16964b4b0c9eb157ea5de4cc 100644 (file)
@@ -10,7 +10,7 @@ use Org\Shipsimu\Hub\Node\Node;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Criteria\Local\LocalSearchCriteria;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 
 /**
index bf6f21d943c2b8f4912c84cb516fabc5b8a197d0..70b61aa76e931058f64d5c38ac10e910c99929e0 100644 (file)
@@ -15,7 +15,7 @@ use Org\Shipsimu\Hub\Tools\HubTools;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Criteria\Local\LocalSearchCriteria;
 use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 
 // Import SPL stuff
 use \UnexpectedValueException;
index 33add16b5eed65b1de66b1c345e4e09916a2f59e..b65ede47aa1db398009d5051e08502f1d908b47f 100644 (file)
@@ -10,7 +10,7 @@ use Org\Shipsimu\Hub\Helper\Dht\HelpableDht;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Result\Search\SearchableResult;
 use Org\Mxchange\CoreFramework\Traits\Stack\StackableTrait;
 use Org\Mxchange\CoreFramework\Traits\State\StateableTrait;
index 5c037763f0b1cb9d7da61a1463a89c447272baaf..f12fa797b19fa667b8d76f2098c60fa80858949a 100644 (file)
@@ -14,7 +14,7 @@ use Org\Shipsimu\Hub\Network\Package\DeliverablePackage;
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
 use Org\Mxchange\CoreFramework\Factory\Database\Frontend\DatabaseFrontendFactory;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Handler\DataSet\HandleableDataSet;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 use Org\Mxchange\CoreFramework\Result\Search\SearchableResult;
index ca640495428319d6085f3ab8c63ce617d7cc4dbb..15ae67030c9d8775082f71093a5a5e7878a75bd0 100644 (file)
@@ -12,7 +12,7 @@ use Org\Shipsimu\Hub\Tools\HubTools;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Generic\FrameworkException;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 
index c800c089c442073fe21e23b18387e19b3ca71196..1bd1511fb851ade5fc06b3495eeba3d1fb5d7c4c 100644 (file)
@@ -3,7 +3,8 @@
 namespace Org\Shipsimu\Hub\Factory\FilterChain\Package;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
 /**
@@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class PackageFilterChainFactory extends ObjectFactory {
+class PackageFilterChainFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -55,7 +56,7 @@ class PackageFilterChainFactory extends ObjectFactory {
                        $chainInstance = GenericRegistry::getRegistry()->getInstance($registryKey);
                } else {
                        // Initialize a filter chain class
-                       $chainInstance = self::createObjectByConfiguredName('package_filter_chain_class');
+                       $chainInstance = Object::createObjectByConfiguredName('package_filter_chain_class');
 
                        // "Walk" through all tags entries
                        foreach ($tags as $tag) {
@@ -65,7 +66,7 @@ class PackageFilterChainFactory extends ObjectFactory {
                                 * simply means the tag is not valid. This however should be
                                 * handled some calls before this method is called.
                                 */
-                               $filterInstance = self::createObjectByConfiguredName(sprintf('package_tag_%s_filter_class', $tag));
+                               $filterInstance = ObjectFactory::createObjectByConfiguredName(sprintf('package_tag_%s_filter_class', $tag));
 
                                // Add this filter to the chain
                                $chainInstance->addFilter($filterInstance);
index 5dd65b56287ecc5f324e3e0ae1a29ead3ec89bee..c5cffc050f19d7309f73fbe771c39e415943590a 100644 (file)
@@ -3,7 +3,8 @@
 namespace Org\Shipsimu\Hub\Factory\Handler\Chunk;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
 /**
@@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class ChunkHandlerFactory extends ObjectFactory {
+class ChunkHandlerFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -51,7 +52,7 @@ class ChunkHandlerFactory extends ObjectFactory {
                        $handlerInstance = GenericRegistry::getRegistry()->getInstance('chunk_handler');
                } else {
                        // Get the handler instance
-                       $handlerInstance = self::createObjectByConfiguredName('chunk_handler_class');
+                       $handlerInstance = ObjectFactory::createObjectByConfiguredName('chunk_handler_class');
 
                        // Add it to the registry
                        GenericRegistry::getRegistry()->addInstance('chunk_handler', $handlerInstance);
index b784b9fa529418fb468b0c507df15bc081ade79f..c36b6198f76f1d3b092646998af66914097e90e7 100644 (file)
@@ -3,7 +3,7 @@
 namespace Org\Shipsimu\Hub\Factory\;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
 /**
index ac8f1d957f111161bfeb835c4308e2d6948f204e..d98fc0643100f4320ae1fcd9512de19ebf758160 100644 (file)
@@ -7,7 +7,8 @@ use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
 use Org\Shipsimu\Hub\Handler\Protocol\HandleableProtocol;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
 /**
@@ -32,7 +33,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class ClientFactory extends ObjectFactory {
+class ClientFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -72,7 +73,7 @@ class ClientFactory extends ObjectFactory {
                        }
                } else {
                        // Generate object instance
-                       $clientInstance = self::createObjectByConfiguredName($registryKey, array($socketInstance));
+                       $clientInstance = ObjectFactory::createObjectByConfiguredName($registryKey, array($socketInstance));
 
                        // Set it in registry for later re-use
                        GenericRegistry::getRegistry()->addInstance($registryKey, $clientInstance);
index aaa9512a599e14ce8ece165f28bcd1bffe1f48ee..c3fd37488488ae9c150a2476268c098a314eebf1 100644 (file)
@@ -3,7 +3,8 @@
 namespace Org\Shipsimu\Hub\Factory\Communicator;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
 /**
@@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class CommunicatorFactory extends ObjectFactory {
+class CommunicatorFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -55,7 +56,7 @@ class CommunicatorFactory extends ObjectFactory {
                        $communicatorInstance = GenericRegistry::getRegistry()->getInstance($communicatorType . '_communicator');
                } else {
                        // Get the communicator instance
-                       $communicatorInstance = self::createObjectByConfiguredName($configEntry);
+                       $communicatorInstance = ObjectFactory::createObjectByConfiguredName($configEntry);
 
                        // Add it to the registry
                        GenericRegistry::getRegistry()->addInstance($communicatorType . '_communicator', $communicatorInstance);
index 934e909e6c5725e4aa1604f7e6bd79fca6fa4e91..3c79d9e04b142218c38dcac9dfcfe3e83c4de950 100644 (file)
@@ -7,7 +7,8 @@ use Org\Shipsimu\Hub\Factory\Handler\Chunk\ChunkHandlerFactory;
 use Org\Shipsimu\Hub\Handler\Network\RawData\Chunks\ChunkHandler;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
 /**
@@ -32,7 +33,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class DecoderFactory extends ObjectFactory {
+class DecoderFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -58,7 +59,7 @@ class DecoderFactory extends ObjectFactory {
                        $handlerInstance = ChunkHandlerFactory::createChunkHandlerInstance();
 
                        // Get the handler instance
-                       $decoderInstance = self::createObjectByConfiguredName('package_decoder_class', array($handlerInstance));
+                       $decoderInstance = ObjectFactory::createObjectByConfiguredName('package_decoder_class', array($handlerInstance));
 
                        // Add it to the registry
                        GenericRegistry::getRegistry()->addInstance('package_decoder', $decoderInstance);
index 92b46037de321da6dbfbc4e71a999ba300b1a45a..e1400ee12d65278f8d27cd6e2896e04c14d47c46 100644 (file)
@@ -3,7 +3,8 @@
 namespace Org\Shipsimu\Hub\Factory\Dht;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
 /**
@@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class DhtObjectFactory extends ObjectFactory {
+class DhtObjectFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -55,7 +56,7 @@ class DhtObjectFactory extends ObjectFactory {
                        $dhtInstance = GenericRegistry::getRegistry()->getInstance($name);
                } else {
                        // Get the handler instance
-                       $dhtInstance = self::createObjectByConfiguredName($name . '_class');
+                       $dhtInstance = ObjectFactory::createObjectByConfiguredName($name . '_class');
 
                        // Add it to the registry
                        GenericRegistry::getRegistry()->addInstance($name, $dhtInstance);
index 3ff125e59bd22386b9c38890ac3105e0005bb17d..4523b6f0ae504db797e27d48f80d220deb301d34 100644 (file)
@@ -3,7 +3,8 @@
 namespace Org\Shipsimu\Hub\Factory\Discovery\Package;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
 /**
@@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class PackageDiscoveryFactory extends ObjectFactory {
+class PackageDiscoveryFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -53,7 +54,7 @@ class PackageDiscoveryFactory extends ObjectFactory {
                        $discoveryInstance = GenericRegistry::getRegistry()->getInstance('package_discovery');
                } else {
                        // Create a new instance
-                       $discoveryInstance = self::createObjectByConfiguredName('package_recipient_discovery_class');
+                       $discoveryInstance = ObjectFactory::createObjectByConfiguredName('package_recipient_discovery_class');
 
                        // Set the instance in registry for further use
                        GenericRegistry::getRegistry()->addInstance('package_discovery', $discoveryInstance);
index 6c7d59b7a9bb867135dba7b1c0c3a17407626d9d..71f37854960550c9453425df57ae616ca3260bbe 100644 (file)
@@ -3,7 +3,8 @@
 namespace Org\Shipsimu\Hub\Factory\Discovery\Socket;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
 /**
@@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class SocketDiscoveryFactory extends ObjectFactory {
+class SocketDiscoveryFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -53,7 +54,7 @@ class SocketDiscoveryFactory extends ObjectFactory {
                        $discoveryInstance = GenericRegistry::getRegistry()->getInstance('socket_discovery');
                } else {
                        // Create a new instance
-                       $discoveryInstance = self::createObjectByConfiguredName('socket_discovery_class');
+                       $discoveryInstance = ObjectFactory::createObjectByConfiguredName('socket_discovery_class');
 
                        // Set the instance in registry for further use
                        GenericRegistry::getRegistry()->addInstance('socket_discovery', $discoveryInstance);
index 5a8c4464e5b3ff139dacd76e7d7582dccf612df3..3303fb2ac350cbf517b6ef9704bb841ec6dd602f 100644 (file)
@@ -3,9 +3,13 @@
 namespace Org\Shipsimu\Hub\Factory\Handler\Message;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
+// Import SPL stuff
+use \InvalidArgumentException;
+
 /**
  * A factory class for message type handlers
  *
@@ -28,7 +32,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class MessageTypeHandlerFactory extends ObjectFactory {
+class MessageTypeHandlerFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -47,17 +51,26 @@ class MessageTypeHandlerFactory extends ObjectFactory {
         * @param       $messageType            Message type to create an object from
         * @return      $handlerInstance        A message type handler instance
         */
-       public static final function createMessageTypeHandlerInstance ($messageType) {
+       public static final function createMessageTypeHandlerInstance (string $messageType) {
+               // Validate parameter
+               if (empty($messageType)) {
+                       // Throw IAE
+                       throw new InvalidArgumentException('Parameter "messageType" is empty');
+               }
+
+               // Init registry key
+               $registryKey = 'message_type_' . $messageType . '_handler';
+
                // Do we have an instance in the registry?
-               if (GenericRegistry::getRegistry()->instanceExists('message_type_' . $messageType . '_handler')) {
+               if (GenericRegistry::getRegistry()->instanceExists($registryKey)) {
                        // Then use this instance
-                       $handlerInstance = GenericRegistry::getRegistry()->getInstance('message_type_' . $messageType . '_handler');
+                       $handlerInstance = GenericRegistry::getRegistry()->getInstance($registryKey);
                } else {
                        // Now prepare the tags instance
-                       $handlerInstance = self::createObjectByConfiguredName('message_type_' . $messageType . '_handler_class');
+                       $handlerInstance = ObjectFactory::createObjectByConfiguredName('message_type_' . $messageType . '_handler_class');
 
                        // Set the instance in registry for further use
-                       GenericRegistry::getRegistry()->addInstance('message_type_' . $messageType . '_handler', $handlerInstance);
+                       GenericRegistry::getRegistry()->addInstance($registryKey, $handlerInstance);
                }
 
                // Return the instance
index ca6e50f9b562ee1a35d707661ef754d189a3ae60..8395ee5ac8b9ccc6a66bd701a7a650e33c70d83e 100644 (file)
@@ -3,7 +3,8 @@
 namespace Org\Shipsimu\Hub\Factory\Handler\Network;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
 /**
@@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class NetworkPackageHandlerFactory extends ObjectFactory {
+class NetworkPackageHandlerFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -57,16 +58,16 @@ class NetworkPackageHandlerFactory extends ObjectFactory {
                         * keep it open here so you can experiment with the settings and don't
                         * need to touch this code.
                         */
-                       $compressorInstance = self::createObjectByConfiguredName('raw_package_compressor_class');
+                       $compressorInstance = ObjectFactory::createObjectByConfiguredName('raw_package_compressor_class');
 
                        // Prepare the decorator compressor (for later flawless and easy updates)
-                       $compressorInstance = self::createObjectByConfiguredName('deco_package_compressor_class', array($compressorInstance));
+                       $compressorInstance = ObjectFactory::createObjectByConfiguredName('deco_package_compressor_class', array($compressorInstance));
 
                        /*
                         * Now prepare the network package for delivery so only need to do this
                         * once just before the "big announcement loop".
                         */
-                       $handlerInstance = self::createObjectByConfiguredName('network_package_handler_class', array($compressorInstance));
+                       $handlerInstance = ObjectFactory::createObjectByConfiguredName('network_package_handler_class', array($compressorInstance));
 
                        // Set the instance in registry for further use
                        GenericRegistry::getRegistry()->addInstance('network_package_handler', $handlerInstance);
index ee4ded6dd5107d15c449482ec13c72d673c34ee0..a1fa7260f18aef52a3af4dd9daef17c0c42ec3c9 100644 (file)
@@ -8,12 +8,10 @@ use Org\Shipsimu\Hub\Helper\HubHelper;
 use Org\Shipsimu\Hub\Network\Package\DeliverablePackage;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
-// Import SPL stuff
-use \InvalidArgumentException;
-
 /**
  * A factory class for protocol handlers
  *
@@ -37,7 +35,7 @@ use \InvalidArgumentException;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class ProtocolHandlerFactory extends ObjectFactory {
+class ProtocolHandlerFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -62,7 +60,7 @@ class ProtocolHandlerFactory extends ObjectFactory {
                        $handlerInstance = GenericRegistry::getRegistry()->getInstance($protocolType . '_protocol_handler');
                } else {
                        // Now prepare the tags instance
-                       $handlerInstance = self::createObjectByConfiguredName($protocolType . '_protocol_handler_class');
+                       $handlerInstance = ObjectFactory::createObjectByConfiguredName($protocolType . '_protocol_handler_class');
 
                        // Set the instance in registry for further use
                        GenericRegistry::getRegistry()->addInstance($protocolType . '_protocol_handler', $handlerInstance);
@@ -85,7 +83,7 @@ class ProtocolHandlerFactory extends ObjectFactory {
                $protocolType = $helperInstance->determineProtocolType();
 
                // Call super factory method
-               return self::createProtocolHandlerByType($protocolType);
+               return ObjectFactory::createProtocolHandlerByType($protocolType);
        }
 
        /**
@@ -99,7 +97,7 @@ class ProtocolHandlerFactory extends ObjectFactory {
                $protocolType = ProtocolDiscovery::discoverProtocolByPackageInstance($packageInstance);
 
                // Call super factory method
-               return self::createProtocolHandlerByType($protocolType);
+               return ObjectFactory::createProtocolHandlerByType($protocolType);
        }
 
 }
index 614464c3c7109140fd5a1a42259a59c98148b31a..156be16f3b4b752a5a3ed5b018232bd58a7eda20 100644 (file)
@@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Factory\Information\Connection;
 use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
 // Import SPL stuff
@@ -34,7 +34,7 @@ use \InvalidArgumentException;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class ConnectionInfoFactory extends ObjectFactory {
+class ConnectionInfoFactory extends BaseFactory {
        /**
         * Array with all valid types
         */
index 6b09f5f2d7fcb7f55082a6fff461616208005e7d..1cebb9d86c165bbc67510808b86df1d038c7744a 100644 (file)
@@ -3,7 +3,8 @@
 namespace Org\Shipsimu\Hub\Factory\Lists\Recipient;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
 /**
@@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class RecipientListFactory extends ObjectFactory {
+class RecipientListFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -53,7 +54,7 @@ class RecipientListFactory extends ObjectFactory {
                        $listInstance = GenericRegistry::getRegistry()->getInstance('recipient_list');
                } else {
                        // Create a new instance
-                       $listInstance = self::createObjectByConfiguredName('recipient_list_class');
+                       $listInstance = ObjectFactory::createObjectByConfiguredName('recipient_list_class');
 
                        // Set the instance in registry for further use
                        GenericRegistry::getRegistry()->addInstance('recipient_list', $listInstance);
index bb023636746f5766cc24da59c30e44a7922c25f6..de59b16fda8d021e396fcf0f0ad89bbe86362bee 100644 (file)
@@ -3,9 +3,13 @@
 namespace Org\Shipsimu\Hub\Factory\Network\Locator;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
+// Import SPL stuff
+use \InvalidArgumentException;
+
 /**
  * A factory class for LocateableNode
  *
@@ -28,7 +32,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class UniversalNodeLocatorFactory extends ObjectFactory {
+class UniversalNodeLocatorFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -42,12 +46,16 @@ class UniversalNodeLocatorFactory extends ObjectFactory {
        /**
         * Returns a singleton (registry-based) LocateableNode instance
         *
-        * @param       $unl                    UNL address
+        * @param       $unl    UNL address
         * @return      $locatorInstance        An instance of a LocateableNode class
         */
-       public static final function createUnlInstanceFromString ($unl) {
-               // Trace message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('UNL-FACTORY: unl=%s - CALLED!', $unl));
+       public static final function createUnlInstanceFromString (string $unl) {
+               // Validate parameter
+               //* NOISY-DEBUG: */ ObjectFactory::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('UNL-FACTORY: unl=%s - CALLED!', $unl));
+               if (empty($unl)) {
+                       // Throw IAE
+                       throw new InvalidArgumentException('Parameter "unl" is empty');
+               }
 
                // If there is no handler?
                if (GenericRegistry::getRegistry()->instanceExists('unl_' . $unl)) {
@@ -55,7 +63,7 @@ class UniversalNodeLocatorFactory extends ObjectFactory {
                        $locatorInstance = GenericRegistry::getRegistry()->getInstance('unl_' . $unl);
                } else {
                        // Get the handler instance
-                       $locatorInstance = self::createObjectByConfiguredName('universal_node_locator_class');
+                       $locatorInstance = ObjectFactory::createObjectByConfiguredName('universal_node_locator_class');
 
                        // Parse UNL string
                        $locatorInstance->parseStringAsUnl($unl);
@@ -65,7 +73,7 @@ class UniversalNodeLocatorFactory extends ObjectFactory {
                }
 
                // Trace message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('UNL-FACTORY: locatorInstance[]=%s - EXIT!', gettype($locatorInstance)));
+               //* NOISY-DEBUG: */ ObjectFactory::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('UNL-FACTORY: locatorInstance[]=%s - EXIT!', gettype($locatorInstance)));
 
                // Return the instance
                return $locatorInstance;
@@ -79,7 +87,7 @@ class UniversalNodeLocatorFactory extends ObjectFactory {
         */
        public static final function createUnlInstanceFromArray (array $unlData) {
                // No "caching" for now
-               $locatorInstance = self::createObjectByConfiguredName('universal_node_locator_class', array($unlData));
+               $locatorInstance = ObjectFactory::createObjectByConfiguredName('universal_node_locator_class', array($unlData));
 
                // Return it
                return $locatorInstance;
index f580b2a41bb7e8fe022a3326a10b005df2a08696..8beb2a05baf359c83fe95dfe0a17464491160333 100644 (file)
@@ -4,7 +4,8 @@ namespace Org\Shipsimu\Hub\Factory\Node;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Request\Requestable;
@@ -33,7 +34,7 @@ use Org\Mxchange\CoreFramework\Utils\String\StringUtils;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class NodeObjectFactory extends ObjectFactory {
+class NodeObjectFactory extends BaseFactory {
        /**
         * Protected constructor
         *
index 6d6848c49be3d6053c79b1ce7ed187b4a27cec87..c68fec1e3c5525742645e90d939ceaa4344a610d 100644 (file)
@@ -6,7 +6,8 @@ namespace Org\Shipsimu\Hub\Factory\Assembler\Package;
 use Org\Shipsimu\Hub\Network\Receive\Receivable;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
 /**
@@ -31,7 +32,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class PackageAssemblerFactory extends ObjectFactory {
+class PackageAssemblerFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -57,7 +58,7 @@ class PackageAssemblerFactory extends ObjectFactory {
                        $assemblerInstance = GenericRegistry::getRegistry()->getInstance('package_assembler');
                } else {
                        // Get the assembler instance
-                       $assemblerInstance = self::createObjectByConfiguredName('package_assembler_class', array($handlerInstance));
+                       $assemblerInstance = ObjectFactory::createObjectByConfiguredName('package_assembler_class', array($handlerInstance));
 
                        // Add it to the registry
                        GenericRegistry::getRegistry()->addInstance('package_assembler', $assemblerInstance);
index c5d8af6a54655d5b608fed978505b659811938da..b83d7bf8f12c997a78fca5eb973664a91c133917 100644 (file)
@@ -3,7 +3,8 @@
 namespace Org\Shipsimu\Hub\Factory\Network;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
 /**
@@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class NetworkPackageFactory extends ObjectFactory {
+class NetworkPackageFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -57,16 +58,16 @@ class NetworkPackageFactory extends ObjectFactory {
                         * keep it open here so you can experiment with the settings and don't
                         * need to touch this code.
                         */
-                       $compressorInstance = self::createObjectByConfiguredName('raw_package_compressor_class');
+                       $compressorInstance = ObjectFactory::createObjectByConfiguredName('raw_package_compressor_class');
 
                        // Prepare the decorator compressor (for later flawless and easy updates)
-                       $compressorInstance = self::createObjectByConfiguredName('deco_package_compressor_class', array($compressorInstance));
+                       $compressorInstance = ObjectFactory::createObjectByConfiguredName('deco_package_compressor_class', array($compressorInstance));
 
                        /*
                         * Now prepare the network package for delivery so only need to do this
                         * once just before the "big announcement loop".
                         */
-                       $packageInstance = self::createObjectByConfiguredName('network_package_class', array($compressorInstance));
+                       $packageInstance = ObjectFactory::createObjectByConfiguredName('network_package_class', array($compressorInstance));
 
                        // Set the instance in registry for further use
                        GenericRegistry::getRegistry()->addInstance('network_package', $packageInstance);
index 9e759a3498b26fbb669b55a9135347e52fab0871..50b252b2b4be769ea58baf640bb285cc5e843498 100644 (file)
@@ -3,7 +3,8 @@
 namespace Org\Shipsimu\Hub\Factory\Fragmenter;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
 /**
@@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class FragmenterFactory extends ObjectFactory {
+class FragmenterFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -54,7 +55,7 @@ class FragmenterFactory extends ObjectFactory {
                        $fragmenterInstance = GenericRegistry::getRegistry()->getInstance($fragmenterType . '_fragmenter');
                } else {
                        // Get the fragmenter instance
-                       $fragmenterInstance = self::createObjectByConfiguredName($fragmenterType . '_fragmenter_class');
+                       $fragmenterInstance = ObjectFactory::createObjectByConfiguredName($fragmenterType . '_fragmenter_class');
 
                        // Add it to the registry
                        GenericRegistry::getRegistry()->addInstance($fragmenterType . '_fragmenter', $fragmenterInstance);
index 37eff898a6bd35a975a14ac2cd2ce83c9bac2991..37037b75f48cbd62736a07964bee74adf71e836d 100644 (file)
@@ -3,7 +3,8 @@
 namespace Org\Shipsimu\Hub\Factory\Producer;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
 /**
@@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class ProducerFactory extends ObjectFactory {
+class ProducerFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -55,7 +56,7 @@ class ProducerFactory extends ObjectFactory {
                        $producerInstance = GenericRegistry::getRegistry()->getInstance($producerType . '_producer');
                } else {
                        // Get the producer instance
-                       $producerInstance = self::createObjectByConfiguredName($configEntry);
+                       $producerInstance = ObjectFactory::createObjectByConfiguredName($configEntry);
 
                        // Add it to the registry
                        GenericRegistry::getRegistry()->addInstance($producerType . '_producer', $producerInstance);
index 2b1c77e72a06b848081c0a51eac7432b5f0b94f4..e8146441d2917ba706ec1c7f7e5486dde124abbf 100644 (file)
@@ -3,7 +3,8 @@
 namespace Org\Shipsimu\Hub\Factory\Registry\Object;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
 /**
@@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class ObjectTypeRegistryFactory extends ObjectFactory {
+class ObjectTypeRegistryFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -51,7 +52,7 @@ class ObjectTypeRegistryFactory extends ObjectFactory {
                        $registryInstance = GenericRegistry::getRegistry()->getInstance('object_type_registry');
                } else {
                        // Now prepare the tags instance
-                       $registryInstance = self::createObjectByConfiguredName('node_object_type_registry_class');
+                       $registryInstance = ObjectFactory::createObjectByConfiguredName('node_object_type_registry_class');
 
                        // Set the instance in registry for further use
                        GenericRegistry::getRegistry()->addInstance('object_type_registry', $registryInstance);
index 81a84ee7b523eb96c63e85d36a1032c473811aea..1cfe1043aad3b27971c1a98099eff1b405a3ed02 100644 (file)
@@ -4,7 +4,8 @@ namespace Org\Shipsimu\Hub\Factory\Resolver\Protocol;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
 /**
@@ -29,7 +30,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class ProtocolResolverFactory extends ObjectFactory {
+class ProtocolResolverFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -55,7 +56,7 @@ class ProtocolResolverFactory extends ObjectFactory {
                        $resolverInstance = GenericRegistry::getRegistry()->getInstance($protocolName . '_protocol_resolver');
                } else {
                        // Get the handler instance
-                       $resolverInstance = self::createObjectByConfiguredName($protocolName . '_protocol_resolver_class');
+                       $resolverInstance = ObjectFactory::createObjectByConfiguredName($protocolName . '_protocol_resolver_class');
 
                        // Add it to the registry
                        GenericRegistry::getRegistry()->addInstance($protocolName . '_protocol_resolver', $resolverInstance);
index b095b55ecfeec44a793ea9f5f351a0aaec7c0f93..7bac10c43f7b37dfe4454aaaa53376cd30d5d432 100644 (file)
@@ -13,7 +13,8 @@ use Org\Shipsimu\Hub\Pool\Poolable;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Socket\InvalidSocketException;
 
@@ -46,7 +47,7 @@ use \UnexpectedValueException;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class SocketFactory extends ObjectFactory {
+class SocketFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -232,7 +233,7 @@ class SocketFactory extends ObjectFactory {
 
                // Set the option to reuse the port
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Enabling re-use address ...');
-               if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('tcp_socket_enable_reuse_address') && !$socketInstance->enableSocketReuseAddress()) {
+               if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('tcp_socket_enable_reuse_address') == 'Y' && !$socketInstance->enableSocketReuseAddress()) {
                        // Handle this socket error
                        $socketInstance->handleSocketError(__METHOD__, __LINE__);
                }
@@ -269,12 +270,12 @@ class SocketFactory extends ObjectFactory {
                $packageInstance = ObjectFactory::createObjectByConfiguredName('package_data_class');
 
                // Create socket instance
-               $socketInstance = self::createObjectByConfiguredName('socket_container_class', array(
+               $socketInstance = self::createObjectByConfiguredName('socket_container_class', [
                        $socketResource,
                        StorableSocket::SOCKET_PROTOCOL_TCP,
                        $packageInstance,
                        StorableSocket::CONNECTION_TYPE_SERVER,
-               ));
+               ]);
 
                // Set listener instance
                $socketInstance->setListenerInstance($listenerInstance);
index 51476c21b90529987c26b687e741ea7f33da15ca..d8cead4797e61e3e5672347c08f973672b67552e 100644 (file)
@@ -3,9 +3,13 @@
 namespace Org\Shipsimu\Hub\Factory\Crawler\Source\Unit;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
+// Import SPL stuff
+use \InvalidArgumentException;
+
 /**
  * A factory class for unit sources
  *
@@ -28,7 +32,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class UnitSourceFactory extends ObjectFactory {
+class UnitSourceFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -45,14 +49,20 @@ class UnitSourceFactory extends ObjectFactory {
         * @param       $unitType                       Type of the unit source
         * @return      $sourceInstance         A UnitSource class instance
         */
-       public static final function createUnitSourceInstance ($unitType) {
+       public static final function createUnitSourceInstance (string $unitType) {
+               // Validate parameter
+               if (empty($unitType)) {
+                       // Throw IAE
+                       throw new InvalidArgumentException('Parameter "unitType" is empty');
+               }
+
                // Do we have cache?
                if (!GenericRegistry::getRegistry()->instanceExists($unitType . '_unit_source')) {
                        // Then construct the class' configuraton entry
                        $className = '' . $unitType . '_unit_source_class';
 
                        // Get a class from that configuration entry
-                       $sourceInstance = self::createObjectByConfiguredName($className);
+                       $sourceInstance = ObjectFactory::createObjectByConfiguredName($className);
 
                        // Add it to the registry
                        GenericRegistry::getRegistry()->addInstance($unitType . '_unit_source', $sourceInstance);
index 17fa7aba719570e016123f77242ef982475d2fc8..035c7b092cc531f91e34d167da673d28df981b2c 100644 (file)
@@ -3,7 +3,8 @@
 namespace Org\Shipsimu\Hub\Crawler\Source\Url;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Task\Taskable;
 
@@ -29,7 +30,7 @@ use Org\Mxchange\CoreFramework\Task\Taskable;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class UrlSourceObjectFactory extends ObjectFactory {
+class UrlSourceObjectFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -65,7 +66,7 @@ class UrlSourceObjectFactory extends ObjectFactory {
                        $sourceInstance = GenericRegistry::getRegistry()->getInstance('source_' . $sourceType);
                } else {
                        // Get the source instance
-                       $sourceInstance = self::createObjectByConfiguredName($sourceType . '_class');
+                       $sourceInstance = ObjectFactory::createObjectByConfiguredName($sourceType . '_class');
 
                        // Add it to the registry
                        GenericRegistry::getRegistry()->addInstance('source_' . $sourceType, $sourceInstance);
index 2699dd2036f720b51fecdbb48a211aa783f9beb9..7c4aad3cebf0b2e0c4902b822184a0f8d8a28639 100644 (file)
@@ -6,7 +6,8 @@ namespace Org\Shipsimu\Hub\Factory\State\Communicator;
 use Org\ShipSimu\Hub\Communicator\Communicator;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 
 /**
  * A factory class for communicator states
@@ -30,7 +31,7 @@ use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class CommunicatorStateFactory extends ObjectFactory {
+class CommunicatorStateFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -49,12 +50,15 @@ class CommunicatorStateFactory extends ObjectFactory {
         * @param       $communicatorInstance   An instance of a Communicator class
         * @return      $stateInstance                  An instance of a Stateable class
         */
-       public static final function createCommunicatorStateInstanceByName ($stateName, Communicator $communicatorInstance) {
-               // Then construct the class' configuraton entry
-               $className = 'communicator_' . $stateName . '_state_class';
+       public static final function createCommunicatorStateInstanceByName (string $stateName, Communicator $communicatorInstance) {
+               // Validate parameter
+               if (empty($stateName)) {
+                       // Throw IAE
+                       throw new InvalidArgumentException('Parameter "stateName" is empty');
+               }
 
                // Get a class from that configuration entry
-               $stateInstance = self::createObjectByConfiguredName($className, array($communicatorInstance));
+               $stateInstance = ObjectFactory::createObjectByConfiguredName('communicator_' . $stateName . '_state_class', array($communicatorInstance));
 
                // Debug message
                self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('COMMUNICATOR-STATE-FACTORY: Communicator state has changed from ' . $communicatorInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
index 6571d6897ffe821f1c7d17558313c5a5bca8007c..2695e75d3db8332ba21b59c246afdbee4c157a71 100644 (file)
@@ -3,9 +3,13 @@
 namespace Org\Shipsimu\Hub\Crawler\Factory\State;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
+// Import SPL stuff
+use \InvalidArgumentException;
+
 /**
  * A factory class for crawler states
  *
@@ -28,7 +32,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class CrawlerStateFactory extends ObjectFactory {
+class CrawlerStateFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -46,12 +50,15 @@ class CrawlerStateFactory extends ObjectFactory {
         * @param       $stateName                      Name of the state
         * @return      $stateInstance          A Stateable class instance
         */
-       public static final function createCrawlerStateInstanceByName ($stateName) {
-               // Then construct the class' configuraton entry
-               $className = 'crawler_' . $stateName . '_state_class';
+       public static final function createCrawlerStateInstanceByName (string $stateName) {
+               // Validate parameter
+               if (empty($stateName)) {
+                       // Throw IAE
+                       throw new InvalidArgumentException('Parameter "stateName" is empty');
+               }
 
                // Get a class from that configuration entry
-               $stateInstance = self::createObjectByConfiguredName($className);
+               $stateInstance = ObjectFactory::createObjectByConfiguredName('crawler_' . $stateName . '_state_class');
 
                // Get crawler instance
                $crawlerInstance = GenericRegistry::getRegistry()->getInstance('crawler');
index 373ae39c459a94a102f4a3ab6751917a46cba4ec..45bd084d7fcb82e59a61d1bdd19151c40700b79a 100644 (file)
@@ -3,9 +3,13 @@
 namespace Org\Shipsimu\Hub\Factory\State\Cruncher;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
+// Import SPL stuff
+use \InvalidArgumentException;
+
 /**
  * A factory class for cruncher states
  *
@@ -28,7 +32,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class CruncherStateFactory extends ObjectFactory {
+class CruncherStateFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -46,15 +50,18 @@ class CruncherStateFactory extends ObjectFactory {
         * @param       $stateName                      Name of the state
         * @return      $stateInstance          A Stateable class instance
         */
-       public static final function createCruncherStateInstanceByName ($stateName) {
-               // Then construct the class' configuraton entry
-               $className = sprintf('cruncher_%s_state_class', $stateName);
+       public static final function createCruncherStateInstanceByName (string $stateName) {
+               // Validate parameter
+               if (empty($stateName)) {
+                       // Throw IAE
+                       throw new InvalidArgumentException('Parameter "stateName" is empty');
+               }
 
                // Get cruncher instance from registry
                $cruncherInstance = GenericRegistry::getRegistry()->getInstance('cruncher');
 
                // Get a class from that configuration entry
-               $stateInstance = self::createObjectByConfiguredName($className);
+               $stateInstance = ObjectFactory::createObjectByConfiguredName(sprintf('cruncher_%s_state_class', $stateName));
 
                // Debug message
                self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRUNCHER-STATE-FACTORY: Cruncher state has changed from ' . $cruncherInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
index acf81999346ae33aead6e554e5708f2f40ce2fb7..e100869af15e77c637411dd98421b082a9b89e08 100644 (file)
@@ -7,7 +7,11 @@ use Org\Shipsimu\Hub\Dht\Distributable;
 use Org\Shipsimu\Hub\Factory\State\Dht\DhtStateFactory;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+
+// Import SPL stuff
+use \InvalidArgumentException;
 
 /**
  * A factory class for DHT states
@@ -31,7 +35,7 @@ use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class DhtStateFactory extends ObjectFactory {
+class DhtStateFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -50,12 +54,15 @@ class DhtStateFactory extends ObjectFactory {
         * @param       $dhtInstance    A Distributable class instance
         * @return      $stateInstance  A Stateable class instance
         */
-       public static final function createDhtStateInstanceByName ($stateName, Distributable $dhtInstance) {
-               // Then construct the class' configuraton entry
-               $className = 'dht_' . $stateName . '_state_class';
+       public static final function createDhtStateInstanceByName (string $stateName, Distributable $dhtInstance) {
+               // Validate parameter
+               if (empty($stateName)) {
+                       // Throw IAE
+                       throw new InvalidArgumentException('Parameter "stateName" is empty');
+               }
 
                // Get a class from that configuration entry
-               $stateInstance = self::createObjectByConfiguredName($className, array($dhtInstance));
+               $stateInstance = self::createObjectByConfiguredName('dht_' . $stateName . '_state_class', array($dhtInstance));
 
                // Debug message
                self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-STATE-FACTORY: DHT state has changed from ' . $dhtInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
index 3f4efa2b5ea195dafd1cf47bd606b7d713549c00..ac2fc2dde0b1fc90417b01e62fa51dea6fee8d48 100644 (file)
@@ -3,9 +3,13 @@
 namespace Org\Shipsimu\Hub\Factory\State\Miner;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
+// Import SPL stuff
+use \InvalidArgumentException;
+
 /**
  * A factory class for miner states
  *
@@ -28,7 +32,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class MinerStateFactory extends ObjectFactory {
+class MinerStateFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -46,15 +50,18 @@ class MinerStateFactory extends ObjectFactory {
         * @param       $stateName              Name of the state
         * @return      $stateInstance  A Stateable class instance
         */
-       public static final function createMinerStateInstanceByName ($stateName) {
-               // Then construct the class' configuraton entry
-               $className = 'miner_' . $stateName . '_state_class';
+       public static final function createMinerStateInstanceByName (string $stateName) {
+               // Validate parameter
+               if (empty($stateName)) {
+                       // Throw IAE
+                       throw new InvalidArgumentException('Parameter "stateName" is empty');
+               }
 
                // Get miner instance
                $minerInstance = GenericRegistry::getRegistry()->getInstance('miner');
 
                // Get a class from that configuration entry
-               $stateInstance = self::createObjectByConfiguredName($className);
+               $stateInstance = ObjectFactory::createObjectByConfiguredName('miner_' . $stateName . '_state_class');
 
                // Debug message
                self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MINER-STATE-FACTORY: Miner state has changed from ' . $minerInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
index 4f7d809b9a6dba714bf4af1051892132ccdc506a..5da2faedcf01cee60e6f888de9a25cf4c0e332a3 100644 (file)
@@ -7,7 +7,11 @@ use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
 use Org\Shipsimu\Hub\Node\Node;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+
+// Import SPL stuff
+use \InvalidArgumentException;
 
 /**
  * A factory class for node states
@@ -31,7 +35,7 @@ use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class NodeStateFactory extends ObjectFactory {
+class NodeStateFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -50,19 +54,19 @@ class NodeStateFactory extends ObjectFactory {
         * @param       $nodeInstance   An instance of a Node class (optional)
         * @return      $stateInstance  A Stateable class instance
         */
-       public static final function createNodeStateInstanceByName ($stateName, Node $nodeInstance = NULL) {
-               // Then construct the class' configuraton entry
-               $className = 'node_' . $stateName . '_state_class';
-
+       public static final function createNodeStateInstanceByName (string $stateName, Node $nodeInstance = NULL) {
                // Is the node instance set?
-               if (is_null($nodeInstance)) {
+               if (empty($stateName)) {
+                       // Throw IAE
+                       throw new InvalidArgumentException('Parameter "stateName" is empty');
+               } elseif (is_null($nodeInstance)) {
                        // Get node instance from registry
                        /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NOTE-STATE-FACTORY: Creating node instance ...');
                        $nodeInstance = NodeObjectFactory::createNodeInstance();
                }
 
                // Get a class from that configuration entry
-               $stateInstance = self::createObjectByConfiguredName($className, array($nodeInstance));
+               $stateInstance = ObjectFactory::createObjectByConfiguredName('node_' . $stateName . '_state_class', array($nodeInstance));
 
                // Debug message
                self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-STATE-FACTORY: Node state has changed from ' . $nodeInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
index f48c816aa7bfa903d3a4877382e165df7ca19e93..8d5ae6ac1d2651c8ff9ae7c02aeb26bbc5f59be6 100644 (file)
@@ -8,7 +8,8 @@ use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper;
 use Org\Shipsimu\Hub\Network\Package\DeliverablePackage;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Socket\InvalidSocketException;
 
 // Import SPL stuff
@@ -36,7 +37,7 @@ use \InvalidArgumentException;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class PeerStateFactory extends ObjectFactory {
+class PeerStateFactory extends BaseFactory {
        /**
         * Static lookup table instance
         */
@@ -119,7 +120,7 @@ class PeerStateFactory extends ObjectFactory {
                         * It is a new peer so create the state instance based on error
                         * code and get an instance from it.
                         */
-                       $stateInstance = self::createObjectByConfiguredName('peer_' . $errorName . '_state_class');
+                       $stateInstance = ObjectFactory::createObjectByConfiguredName('peer_' . $errorName . '_state_class');
 
                        // And register it with the lookup table
                        $tableInstance->registerPeerState($stateInstance, $packageInstance);
@@ -136,7 +137,7 @@ class PeerStateFactory extends ObjectFactory {
                         * get an instance of the state.
                         */
                        /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-FACTORY: Updating peer state ...');
-                       $stateInstance = self::createObjectByConfiguredName(sprintf('peer_%s_state_class', $errorName));
+                       $stateInstance = ObjectFactory::createObjectByConfiguredName(sprintf('peer_%s_state_class', $errorName));
 
                        // The peer's state has changed, update database now
                        $tableInstance->registerPeerState($stateInstance, $packageInstance);
@@ -168,7 +169,7 @@ class PeerStateFactory extends ObjectFactory {
                }
 
                // Get a class from a configuration entry
-               $stateInstance = self::createObjectByConfiguredName(sprintf('peer_%s_state_class', $stateName), array($helperInstance));
+               $stateInstance = ObjectFactory::createObjectByConfiguredName(sprintf('peer_%s_state_class', $stateName), array($helperInstance));
 
                // Once we have that state, set it in the peer instance
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('PEER-STATE-FACTORY: Peer state has changed from %s to %s (%s).', $helperInstance->getPrintableState(), $stateInstance->getStateName(), $stateInstance->__toString()));
index 723e0d4d7f3ed6c6518bbda8296035dfd66f8099..bec76339e09b426f28a6fef1d57215784247a89d 100644 (file)
@@ -3,7 +3,8 @@
 namespace Org\Shipsimu\Hub\Factory\Tag\Package;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
 /**
@@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class PackageTagsFactory extends ObjectFactory {
+class PackageTagsFactory extends BaseFactory {
        /**
         * Protected constructor
         *
@@ -53,7 +54,7 @@ class PackageTagsFactory extends ObjectFactory {
                        $packageInstance = GenericRegistry::getRegistry()->getInstance('package_tags');
                } else {
                        // Now prepare the tags instance
-                       $packageInstance = self::createObjectByConfiguredName('package_tags_class');
+                       $packageInstance = ObjectFactory::createObjectByConfiguredName('package_tags_class');
 
                        // Set the instance in registry for further use
                        GenericRegistry::getRegistry()->addInstance('package_tags', $packageInstance);
index e036a8519bd4a09f3f0e49b164a434ac4cf4e580..f7c7f40d89f22a24b27286e88f08b06ec08229a3 100644 (file)
@@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Filter\Activation\Node\Announcement;
 use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filter\Filterable;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Request\Requestable;
index ba9c836980b5e8bbceecc799b833f582b5ea8ae1..3ac1e236eab01fb4baff116d2e9550dc3a1c1652 100644 (file)
@@ -3,7 +3,7 @@
 namespace Org\Shipsimu\Hub\AptProxy\Filter\Initialization;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filter\Filterable;
 use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
index 518e8f0ec77eb4a09459208ccab25163f3efb5b2..3610c254acf77d1d13d4330911acf293c4346d42 100644 (file)
@@ -3,7 +3,7 @@
 namespace Org\Shipsimu\Hub\Chat\Filter\Initialization;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filter\Filterable;
 use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
index 4d5b8954d7e3157bbec79317eef09fe370b250c8..3b4d9c7d5ba9c3a5d03e68cc3b326562c0382e4e 100644 (file)
@@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Crawler\Filter\Initialization;
 use Org\Shipsimu\Hub\Crawler\Filter\BaseCrawlerFilter;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filter\Filterable;
 use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
index 561a0aab406b11879fedf542b1e6388704f60b9e..cdbd8014dac4947edfe894a6b1a74d61782d4d51 100644 (file)
@@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Cruncher\Filter\BaseCruncherFilter;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filter\Filterable;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Request\Requestable;
index 839629ba2c5b5581a3ba9de861b5e98f815ccee0..40a9a9e148795c2d2f6cf6953918fbe7bcd88d7b 100644 (file)
@@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Miner\Filter\BaseMinerFilter;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filter\Filterable;
 use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
index 4e94682c048c857edb3c4d99bee764548c4dacc1..ed79417da45c40ff3ea430b37152f3a8a9fa6897 100644 (file)
@@ -3,7 +3,7 @@
 namespace Org\Shipsimu\Hub\Filter\Initializer\AptProxy\Handler\Task;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filter\Filterable;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Request\Requestable;
index 286ee6bdbd11558dc9a0c468d0f841066336cd95..dde2617f4023a0b0bc44dd2901acd806eefa7f91 100644 (file)
@@ -3,7 +3,7 @@
 namespace Org\Shipsimu\Hub\Filter\Initializer\Chat\Handler\Task;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filter\Filterable;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Request\Requestable;
index 34856646fba6fdd9e80a3d7cf2d221e4d825d31b..e8f31f1212287350d73bec6954365e26d09d803e 100644 (file)
@@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Crawler\Filter\BaseCrawlerFilter;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filter\Filterable;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Request\Requestable;
index d902854533c001f4effdada54bd9761d377b2e19..60f8d384ec9cd6bee848d8a134489c97e1091cd0 100644 (file)
@@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Filter\Initializer\Cruncher\Handler\Task;
 use Org\Shipsimu\Hub\Cruncher\Filter\BaseCruncherFilter;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filter\Filterable;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Request\Requestable;
index b0e3317e0138f4d7ff7c2426395c24a63ab1ec17..de20bd4a06a34475caefa450920aa5def5b22569 100644 (file)
@@ -3,7 +3,7 @@
 namespace Org\Shipsimu\Hub\Filter\Initializer\Miner\Handler\Task;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filter\Filterable;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Request\Requestable;
index 5eaf30ee5e45cd536808651624bd7b2d61b3f2bc..f2c4a4ff4b4a554c228d3a53d7cd256f698085db 100644 (file)
@@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
 use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filter\Filterable;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Request\Requestable;
index 0eb123e4447c305632739c79b1a10e48d803e648..a98d016c934b0a145afc26bc233c277af2d62415 100644 (file)
@@ -11,7 +11,7 @@ use Org\Shipsimu\Hub\Traits\Fragmenter\FragmentableTrait;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Assertion\AssertionException;
 use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 use Org\Mxchange\CoreFramework\Utils\String\StringUtils;
 use Org\Mxchange\CoreFramework\Traits\Crypto\CryptoTrait;
index 4b81fae0b78ae5c00d03399f8e50bce56802e785..4b2368c5f8564898b105ddb639394a1854079de3 100644 (file)
@@ -10,7 +10,7 @@ use Org\Shipsimu\Hub\Network\Delivery\Deliverable;
 use Org\Shipsimu\Hub\Network\Message\DeliverableMessage;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Generic\FrameworkException;
 
 /**
index d2f4efedfce34266a776c04016ffc9ccbd85ff29..75134b4d313e5d1143a44dd3b5f052c22184c980 100644 (file)
@@ -33,7 +33,7 @@ use Org\Shipsimu\Hub\Tools\HubTools;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Compressor\Compressor;
 use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Factory\Registry\Socket\SocketRegistryFactory;
 use Org\Mxchange\CoreFramework\Feature\FrameworkFeature;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
index 7ed2c6332b0cfdec6732e04cc7717ea4678d3e06..d602b76ca2c5091b18da04fc76f23ad2d8081523 100644 (file)
@@ -10,7 +10,7 @@ use Org\Shipsimu\Hub\Handler\BaseHubHandler;
 use Org\Shipsimu\Hub\Network\Package\DeliverablePackage;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 
 /**
  * A general Handler for raw data from sockets
index 8bb74a8e627c0f3b13ef4fd2d30875851b451f11..d134999ddf6a07c6ad2d3eee8211858402ca28ff 100644 (file)
@@ -19,7 +19,7 @@ use Org\Shipsimu\Hub\Traits\Fragmenter\FragmentableTrait;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 use Org\Mxchange\CoreFramework\Traits\Stream\Output\OutputStreamTrait;
index 9d740a134e132b2ad907e32e2e08642b4e32c60d..7d658fa7319208fb1924acb511b76b8cff20704a 100644 (file)
@@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Helper\Message\BaseMessageHelper;
 use Org\Shipsimu\Hub\Helper\Message\MessageHelper;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 
 /**
  * A CryptoRandom message helper
index 54180fceeb7a8a37aa9a00d27173f99e296da47e..c7b4b5d193db2debb51d9fba26ac4281b974f7f5 100644 (file)
@@ -18,7 +18,7 @@ use Org\Shipsimu\Hub\Traits\Container\Socket\StorableSocketTrait;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Factory\Registry\Socket\SocketRegistryFactory;
 use Org\Mxchange\CoreFramework\Generic\NullPointerException;
 use Org\Mxchange\CoreFramework\Socket\InvalidServerSocketException;
index 5bd08c4c9900fdeb906b0391ee5107917c9c6259..b71322491702d5c6ff86380b5e2773b6dd584b79 100644 (file)
@@ -12,7 +12,7 @@ use Org\Shipsimu\Hub\Network\Package\DeliverablePackage;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 
 /**
  * A file-based socket listener
index 05397d323294c45b372dd30d26b97b0e5b00e3bc..4eaa42c1bc2e59a3456c7676d3221f572e52dc2d 100644 (file)
@@ -9,7 +9,7 @@ use Org\Shipsimu\Hub\Listener\BaseListener;
 use Org\Shipsimu\Hub\Listener\Listenable;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 
 /**
  * A TCP connection listener
index 298ad34469d944efd292ac238c49bf26c71b524a..9c41cac08d96bacb7873f75b8639e588e19b1b62 100644 (file)
@@ -10,7 +10,7 @@ use Org\Shipsimu\Hub\Listener\Listenable;
 use Org\Shipsimu\Hub\Network\Package\DeliverablePackage;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
 
 /**
index 9c37b29dd7d3eefe828f44306ccef349dbf07d22..7de3ce4ab68770254974a667fc1fdca7e4f307af 100644 (file)
@@ -3,7 +3,7 @@
 namespace Org\Shipsimu\Hub\Lists\Pool;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Lists\BaseList;
 use Org\Mxchange\CoreFramework\Lists\Listable;
 
index d5106794b167a72f7be6ef9c58186fa2e3ecb065..d4bcfe09a1b330b09a629addd50caaae0dcb5301 100644 (file)
@@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Helper\Miner\MinerHelper;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Controller\Controller;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 use Org\Mxchange\CoreFramework\Response\Responseable;
 
index 49f83ae4bbcf729e95a23c843a2af7946d1706a5..14fbafbc927940c3b54f15cbb5be103155a4ad85 100644 (file)
@@ -11,7 +11,7 @@ use Org\Shipsimu\Hub\Producer\Block\BlockProducer;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Database\Updateable;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Traits\State\StateableTrait;
 
index bedb58ef8be6ed5e9bbd05860647e733481a5e5f..50abbdfd7e983be6f9c0ff22879f5c69bc62d67b 100644 (file)
@@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Node\Node;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask;
 use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
index 3478cafe16e070e2ace25ec6975bfbdf8ab45ca9..5d7620ef5e635559994090a00cdd3502355157ab 100644 (file)
@@ -26,7 +26,7 @@ use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
 use Org\Mxchange\CoreFramework\Database\Updateable;
 use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
 use Org\Mxchange\CoreFramework\Factory\Database\Frontend\DatabaseFrontendFactory;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Generic\NullPointerException;
 use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
index ee2aafc12768404465546bc58bba95586827c1ac..072c509496860973632d8cf32bf3168821854f0c 100644 (file)
@@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Node\BaseHubNode;
 use Org\Shipsimu\Hub\Node\Node;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask;
 use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
index c1b18a58c5511ac2245375a101f805fb6fe18f84..d0ba61167ada6201dbcf4ef2bc46db41ec9a96ce 100644 (file)
@@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Node\BaseHubNode;
 use Org\Shipsimu\Hub\Node\Node;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask;
 use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
index a5bf343a6e5f17dd813ea2dd2a635f678eacea05..535f23292a728fc6415d538a134582e980ce797c 100644 (file)
@@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Node\BaseHubNode;
 use Org\Shipsimu\Hub\Node\Node;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask;
 use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
index 7e82fc4aa0d3baf800ed17cb0b460e99fb565c15..c4a7611d7ff89c84f2973a1d5ad1415fd26df672 100644 (file)
@@ -16,7 +16,7 @@ use Org\Shipsimu\Hub\Traits\Network\Package\Delivery\DeliverableTrait;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 use Org\Mxchange\CoreFramework\Traits\Handler\HandleableTrait;
 use Org\Mxchange\CoreFramework\Traits\Stack\StackableTrait;
index 36798c1c0948b924ba3875f44a22233cb5bc1137..17fcb196a3593fbc517b7f722cb1c9fc021d20b0 100644 (file)
@@ -12,7 +12,7 @@ use Org\Shipsimu\Hub\Network\Package\DeliverablePackage;
 use Org\Mxchange\CoreFramework\Assertion\AssertionException;
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 use Org\Mxchange\CoreFramework\Traits\Crypto\CryptoTrait;
 use Org\Mxchange\CoreFramework\Utils\String\StringUtils;
index 246ed2aa70e6ec8ff14c5e6a0ed982adf66e3c6c..fd6841a0fadc2d113f256c59038e37d7ff4793ff 100644 (file)
@@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Pool\Poolable;
 use Org\Shipsimu\Hub\Traits\Listener\ListenableTrait;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Visitor\Visitable;
 use Org\Mxchange\CoreFramework\Visitor\Visitor;
index 2d01f82e642209fb5d9221ab120fda2a8ec8fd07..59d2b28145a1b3ddf09fcdd82178f1d655023fae 100644 (file)
@@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Generic\BaseHubSystem;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Stack\Stackable;
 
 /**
index 70dd64146bcdf63b68d279f7bf5560e3383503c9..c4057641b530b95b8bb79a9f3d80a0884d1de2fc 100644 (file)
@@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Producer\BaseProducer;
 use Org\Shipsimu\Hub\Producer\Key\KeyProducer;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 use Org\Mxchange\CoreFramework\State\Stateable;
 
index a78388bd94881613c0b33e75b3530dec049e4c52..496247ad488a6cc08bce4ddd9656737db82c0f3f 100644 (file)
@@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Producer\Unit\UnitProducer;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Factory\Database\Frontend\DatabaseFrontendFactory;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 use Org\Mxchange\CoreFramework\State\Stateable;
index d6cb88c2c117856b5822541f120d445c6ff9c7f1..7b8401dc323586250bd6673ce7633535d9eca3f5 100644 (file)
@@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Producer\Block\BlockProducer;
 use Org\Shipsimu\Hub\Producer\Miner\Block\BaseBlockProducer;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 use Org\Mxchange\CoreFramework\State\Stateable;
 
index eea02e37693a241ddb66511c340b4ac0071733b3..c33f1ac63f21421b292c1fdcaa1d6625da455cc3 100644 (file)
@@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Producer\Block\BlockProducer;
 use Org\Shipsimu\Hub\Producer\Miner\Block\BaseBlockProducer;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 use Org\Mxchange\CoreFramework\State\Stateable;
 
index 62e8623a0d810e6141bb0b689dee95d70890805a..5fcccba36962482221f067dca031d6d2a6200bd3 100644 (file)
@@ -11,7 +11,7 @@ use Org\Shipsimu\Hub\Network\Recipient\Recipient;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Lists\Listable;
 
 // Import SPL stuff
index 4e513a08686c0e91150e014ca38318ca9d1ff4f5..748d15a2c5cc81622f7032f1a2c26ec1f8d58e8a 100644 (file)
@@ -14,7 +14,7 @@ use Org\Shipsimu\Hub\Registry\Socket\RegisterableSocket;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Registry\BaseRegistry;
 use Org\Mxchange\CoreFramework\Registry\Register;
index af3f3241428d34a36674d75a554604be7de26bdf..f0da95607b4b9506cb23ba32d49a9910d6356998 100644 (file)
@@ -14,7 +14,7 @@ use Org\Shipsimu\Hub\Resolver\Protocol\ProtocolResolver;
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Console\Tools\ConsoleTools;
 use Org\Mxchange\CoreFramework\Criteria\Search\SearchCriteria;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 
 /**
index 95dadcad6cab4418b3cdbcbe5e219248dc9b1c78..5500ad9d2d329a1e8bf0f602c032ac319a530133 100644 (file)
@@ -3,7 +3,7 @@
 namespace Org\Shipsimu\Hub\Resolver\State;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Resolver\BaseResolver;
 use Org\Mxchange\CoreFramework\Utils\String\StringUtils;
 
index d51e6ea7657339bc3fcbee5a75a31ecaf901bdb3..d8920fdea13232e19e5c1d8abc8ae2ce5b0439c1 100644 (file)
@@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Crawler\Source\Url;
 use Org\Shipsimu\Hub\Crawler\Source\BaseSource;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Factory\Stack\FileStackFactory;
 use Org\Mxchange\CoreFramework\Traits\Stack\StackableTrait;
 
index e37653a38a0990cafb91caac2a9facb023c9eddb..822697362490bf1760edf4cbd6c57f5b0f7ee5fc 100644 (file)
@@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Crawler\Source\BaseSource;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Crypto\RandomNumber\RandomNumberGenerator;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 
 /**
index aa6f52a1135803f5cc6fee59430075752f2d08d2..b11bf5771bb5bf1b2c196c65a7fe45e288621045 100644 (file)
@@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Crawler\Source\Url\UrlSource;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filesystem\FrameworkDirectory;
 use Org\Mxchange\CoreFramework\Generic\NullPointerException;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
index e8cbeefec1256574873729c0a078b00616a79544..e0cb5172b57c2098eb1dc08db5f0dcb651d9c985 100644 (file)
@@ -13,7 +13,7 @@ use Org\Shipsimu\Hub\Node\Data\InvalidSessionIdException;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 
 // Import SPL stuff
 use \InvalidArgumentException;
index 44c776f12407d4c590588d4eaaf830e32960b457..9808ba1bc8b63770471d91cad1727ccbef4189c2 100644 (file)
@@ -788,7 +788,7 @@ $cfg->setConfigEntry('tcp_socket_accept_wait_sec', 3);
 $cfg->setConfigEntry('tcp_socket_accept_wait_usec', 0);
 
 // CFG: TCP-SOCKET-ENABLE-REUSE-ADDRESS
-$cfg->setConfigEntry('tcp_socket_enable_reuse_address', true);
+$cfg->setConfigEntry('tcp_socket_enable_reuse_address', 'Y');
 
 // CFG: FILE-SOCKET-LISTEN-BACKLOG
 $cfg->setConfigEntry('file_socket_listen_backlog', 0);
index d670ef5ab99065daf71aacebf16279c6196b3fff..e2d46e12ba4e17cf1cf957d347539eabe5480933 100644 (file)
@@ -3,7 +3,7 @@
 namespace Org\Shipsimu\Hub\Factory\Parameter;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Generic\FrameworkException;
 
 /**
diff --git a/core b/core
index ea4641a1e423961447ad6e0a113278f9d283cbeb..5e0cb5baf0c78f49644b96da6bd7a2821590526d 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit ea4641a1e423961447ad6e0a113278f9d283cbeb
+Subproject commit 5e0cb5baf0c78f49644b96da6bd7a2821590526d
index bc2faf43ddb258a277fbd85e2ab58b31c7660a05..a881011a008250dd45f292ff3c7cc289d70b9d83 100644 (file)
--- a/index.php
+++ b/index.php
@@ -4,7 +4,7 @@ namespace Org\Mxchange\CoreFramework\EntryPoint;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filesystem\FileNotFoundException;
 use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
 use Org\Mxchange\CoreFramework\Localization\LanguageSystem;