// 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;
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;
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;
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;
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;
// 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;
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;
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;
// 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;
// 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;
// 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;
/**
// 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;
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;
/**
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;
// 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;
/**
// 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;
// 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;
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;
// 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;
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;
/**
* 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
*
$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) {
* 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);
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;
/**
* 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
*
$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);
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;
/**
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;
/**
* 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
*
}
} 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);
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;
/**
* 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
*
$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);
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;
/**
* 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
*
$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);
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;
/**
* 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
*
$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);
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;
/**
* 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
*
$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);
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;
/**
* 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
*
$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);
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
*
* 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
*
* @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
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;
/**
* 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
*
* 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);
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
*
* 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
*
$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);
$protocolType = $helperInstance->determineProtocolType();
// Call super factory method
- return self::createProtocolHandlerByType($protocolType);
+ return ObjectFactory::createProtocolHandlerByType($protocolType);
}
/**
$protocolType = ProtocolDiscovery::discoverProtocolByPackageInstance($packageInstance);
// Call super factory method
- return self::createProtocolHandlerByType($protocolType);
+ return ObjectFactory::createProtocolHandlerByType($protocolType);
}
}
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
* 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
*/
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;
/**
* 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
*
$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);
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
*
* 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
*
/**
* 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)) {
$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);
}
// 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;
*/
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;
// 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;
* 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
*
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;
/**
* 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
*
$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);
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;
/**
* 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
*
* 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);
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;
/**
* 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
*
$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);
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;
/**
* 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
*
$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);
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;
/**
* 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
*
$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);
// 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;
/**
* 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
*
$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);
// 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;
* 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
*
// 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__);
}
$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);
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
*
* 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
*
* @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);
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;
* 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
*
$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);
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
* 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
*
* @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() . '.');
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
*
* 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
*
* @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');
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
*
* 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
*
* @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() . '.');
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
* 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
*
* @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() . '.');
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
*
* 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
*
* @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() . '.');
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
* 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
*
* @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() . '.');
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
* 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
*/
* 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);
* 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);
}
// 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()));
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;
/**
* 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
*
$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);
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;
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;
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;
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;
// 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;
// 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;
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;
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;
// 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;
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;
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;
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;
// 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;
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;
/**
// 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;
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
// 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;
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
// 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;
// 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
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
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;
/**
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;
// 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;
// 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;
// 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;
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;
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;
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;
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;
// 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;
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;
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;
// 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;
/**
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;
// 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;
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;
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;
// 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
// 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;
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;
/**
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;
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;
// 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;
/**
// 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;
// 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;
$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);
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;
/**
-Subproject commit ea4641a1e423961447ad6e0a113278f9d283cbeb
+Subproject commit 5e0cb5baf0c78f49644b96da6bd7a2821590526d
// 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;