use Org\Mxchange\CoreFramework\Controller\Controller;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
use Org\Mxchange\CoreFramework\Response\Responseable;
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BOOTSTRAP: Bootstrap finished.');
// Get apt-proxy instance
- $proxyInstance = GenericRegistry::getRegistry()->getInstance('apt_proxy');
+ $proxyInstance = ObjectRegistry::getRegistry('hub')->getInstance('apt_proxy');
// Add some apt-proxy-specific filters
$proxyInstance->addExtraAptProxyFilters();
// Get task handler instance
- $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler');
+ $handlerInstance = ObjectRegistry::getRegistry('generic')->getInstance('task_handler');
// Debug message
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MAIN: --- Entering main loop. ---');
use Org\Mxchange\CoreFramework\Controller\Controller;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
use Org\Mxchange\CoreFramework\Response\Responseable;
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BOOTSTRAP: Bootstrap finished.');
// Get chat instance
- $chatInstance = GenericRegistry::getRegistry()->getInstance('chat');
+ $chatInstance = ObjectRegistry::getRegistry('hub')->getInstance('chat');
// Add some chat-specific filters
$chatInstance->addExtraChatFilters();
// Get task handler instance
- $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler');
+ $handlerInstance = ObjectRegistry::getRegistry('generic')->getInstance('task_handler');
// Debug message
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MAIN: --- Entering main loop. ---');
use Org\Mxchange\CoreFramework\Controller\Controller;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
use Org\Mxchange\CoreFramework\Response\Responseable;
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BOOTSTRAP: Bootstrap finished.');
// Get crawler instance
- $crawlerInstance = GenericRegistry::getRegistry()->getInstance('crawler');
+ $crawlerInstance = ObjectRegistry::getRegistry('hub')->getInstance('crawler');
// Add some crawler-specific filters
$crawlerInstance->addExtraCrawlerFilters();
// Get task handler instance
- $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler');
+ $handlerInstance = ObjectRegistry::getRegistry('generic')->getInstance('task_handler');
// Debug message
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MAIN: --- Entering main loop. ---');
use Org\Mxchange\CoreFramework\Controller\Controller;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
use Org\Mxchange\CoreFramework\Response\Responseable;
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BOOTSTRAP: Bootstrap finished.');
// Get cruncher instance
- $cruncherInstance = GenericRegistry::getRegistry()->getInstance('cruncher');
+ $cruncherInstance = ObjectRegistry::getRegistry('hub')->getInstance('cruncher');
// Add some cruncher-specific filters
$cruncherInstance->addExtraCruncherFilters();
// Get task handler instance
- $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler');
+ $handlerInstance = ObjectRegistry::getRegistry('generic')->getInstance('task_handler');
// Debug message
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MAIN: --- Entering main loop. ---');
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\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
use Org\Mxchange\CoreFramework\Response\Responseable;
$nodeInstance->activateNode($requestInstance, $responseInstance);
// Get task handler instance
- $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler');
+ $handlerInstance = ObjectRegistry::getRegistry('generic')->getInstance('task_handler');
// Debug message
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MAIN: --- Entering main loop. ---');
use Org\Mxchange\CoreFramework\Controller\Controller;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
use Org\Mxchange\CoreFramework\Response\Responseable;
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BOOTSTRAP: Bootstrap finished.');
// Get miner instance
- $minerInstance = GenericRegistry::getRegistry()->getInstance('miner');
+ $minerInstance = ObjectRegistry::getRegistry('hub')->getInstance('miner');
// Add some miner-specific filters
$minerInstance->addExtraMinerFilters();
// Get task handler instance
- $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler');
+ $handlerInstance = ObjectRegistry::getRegistry('generic')->getInstance('task_handler');
// Debug message
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MAIN: --- Entering main loop. ---');
// Import framework stuff
use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\State\Stateable;
use Org\Mxchange\CoreFramework\Traits\State\StateableTrait;
parent::__construct($className);
// Set this crawler instance in registry
- GenericRegistry::getRegistry()->addInstance('crawler', $this);
+ ObjectRegistry::getRegistry('hub')->addInstance('crawler', $this);
// Init state which sets the state to 'init'
$this->initState();
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Response\Responseable;
use Org\Mxchange\CoreFramework\Database\Updateable;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
/**
* A general hub cruncher class
parent::__construct($className);
// Set this cruncher instance in registry
- GenericRegistry::getRegistry()->addInstance('cruncher', $this);
+ ObjectRegistry::getRegistry('hub')->addInstance('cruncher', $this);
// Init this cruncher
$this->initCruncher();
// Import framework stuff
use Org\Mxchange\CoreFramework\Generic\NullPointerException;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Socket\InvalidSocketException;
// Try to resolve the socket resource
try {
// Get the helper instance from registry
- $helperInstance = GenericRegistry::getRegistry()->getInstance('connection');
+ $helperInstance = ObjectRegistry::getRegistry('hub')->getInstance('connection');
// Is a state set and it's name is other than socket's error code?
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('PACKAGE-SOCKET-DISCOVERY: helperInstance->stateInstance[]=%s', gettype($helperInstance->getStateInstance())));
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
/**
* A factory class for network packages
$registryKey = GenericRegistry::getRegistryKeyFromArray('package_filter_chain', $tags);
// Is the registry key there?
- if (GenericRegistry::getRegistry()->instanceExists($registryKey)) {
+ if (ObjectRegistry::getRegistry('factory')->instanceExists($registryKey)) {
// Yes, then use that instance
- $chainInstance = GenericRegistry::getRegistry()->getInstance($registryKey);
+ $chainInstance = ObjectRegistry::getRegistry('factory')->getInstance($registryKey);
} else {
// Initialize a filter chain class
$chainInstance = Object::createObjectByConfiguredName('package_filter_chain_class');
}
// Add the finished chain to the registry
- GenericRegistry::getRegistry()->addInstance($registryKey, $chainInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance($registryKey, $chainInstance);
}
// Return the chain instance
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
/**
* A factory class for chunk handler
*/
public static final function createChunkHandlerInstance () {
// If there is no handler?
- if (GenericRegistry::getRegistry()->instanceExists('chunk_handler')) {
+ if (ObjectRegistry::getRegistry('factory')->instanceExists('chunk_handler')) {
// Get handler from registry
- $handlerInstance = GenericRegistry::getRegistry()->getInstance('chunk_handler');
+ $handlerInstance = ObjectRegistry::getRegistry('factory')->getInstance('chunk_handler');
} else {
// Get the handler instance
$handlerInstance = ObjectFactory::createObjectByConfiguredName('chunk_handler_class');
// Add it to the registry
- GenericRegistry::getRegistry()->addInstance('chunk_handler', $handlerInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance('chunk_handler', $handlerInstance);
}
// Return the instance
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
/**
* A factory class for !!!
*/
public static final function create???Instance () {
// If there is no handler?
- if (GenericRegistry::getRegistry()->instanceExists('|||')) {
+ if (ObjectRegistry::getRegistry('hub')->instanceExists('|||')) {
// Get handler from registry
- $%%%Instance = GenericRegistry::getRegistry()->getInstance('|||');
+ $%%%Instance = ObjectRegistry::getRegistry('hub')->getInstance('|||');
} else {
// Get the handler instance
$%%%Instance = ObjectFactory::createObjectByConfiguredName('|||_class');
// Add it to the registry
- GenericRegistry::getRegistry()->addInstance('|||', $%%%Instance);
+ ObjectRegistry::getRegistry('hub')->addInstance('|||', $%%%Instance);
}
// Return the instance
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
/**
* An object factory for clients
$registryKey = strtolower($protocolInstance->getProtocolName()) . '_client';
// Is the key already in registry?
- if (GenericRegistry::getRegistry()->instanceExists($registryKey)) {
+ if (ObjectRegistry::getRegistry('factory')->instanceExists($registryKey)) {
// Then use that instance
- $clientInstance = GenericRegistry::getRegistry()->getInstance($registryKey);
+ $clientInstance = ObjectRegistry::getRegistry('factory')->getInstance($registryKey);
// Is socket instance given?
if ($socketInstance instanceof StorableSocket) {
$clientInstance = ObjectFactory::createObjectByConfiguredName($registryKey, array($socketInstance));
// Set it in registry for later re-use
- GenericRegistry::getRegistry()->addInstance($registryKey, $clientInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance($registryKey, $clientInstance);
}
// Return the prepared instance
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
// Import SPL stuff
use \InvalidArgumentException;
}
// If there is no communicator?
- if (GenericRegistry::getRegistry()->instanceExists($communicatorType . '_communicator')) {
+ if (ObjectRegistry::getRegistry('factory')->instanceExists($communicatorType . '_communicator')) {
// Get communicator from registry
- $communicatorInstance = GenericRegistry::getRegistry()->getInstance($communicatorType . '_communicator');
+ $communicatorInstance = ObjectRegistry::getRegistry('factory')->getInstance($communicatorType . '_communicator');
} else {
// Get the communicator instance
$communicatorInstance = ObjectFactory::createObjectByConfiguredName($configKey);
// Add it to the registry
- GenericRegistry::getRegistry()->addInstance($communicatorType . '_communicator', $communicatorInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance($communicatorType . '_communicator', $communicatorInstance);
}
// Return the instance
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
/**
* A factory class for Decodeable objects
*/
public static final function createPackageDecoderInstance () {
// If there is no handler?
- if (GenericRegistry::getRegistry()->instanceExists('package_decoder')) {
+ if (ObjectRegistry::getRegistry('factory')->instanceExists('package_decoder')) {
// Get handler from registry
- $decoderInstance = GenericRegistry::getRegistry()->getInstance('package_decoder');
+ $decoderInstance = ObjectRegistry::getRegistry('factory')->getInstance('package_decoder');
} else {
// Get a chunk handler instance
$handlerInstance = ChunkHandlerFactory::createChunkHandlerInstance();
$decoderInstance = ObjectFactory::createObjectByConfiguredName('package_decoder_class', array($handlerInstance));
// Add it to the registry
- GenericRegistry::getRegistry()->addInstance('package_decoder', $decoderInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance('package_decoder', $decoderInstance);
}
// Return the instance
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
// Import SPL stuff
use \InvalidArgumentException;
$name = $prefix . '_dht';
// If there is no handler?
- if (GenericRegistry::getRegistry()->instanceExists($name)) {
+ if (ObjectRegistry::getRegistry('factory')->instanceExists($name)) {
// Get handler from registry
- $dhtInstance = GenericRegistry::getRegistry()->getInstance($name);
+ $dhtInstance = ObjectRegistry::getRegistry('factory')->getInstance($name);
} else {
// Get the handler instance
$dhtInstance = ObjectFactory::createObjectByConfiguredName($name . '_class');
// Add it to the registry
- GenericRegistry::getRegistry()->addInstance($name, $dhtInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance($name, $dhtInstance);
}
// Return the instance
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
/**
* A factory class for package discovery
*/
public static final function createPackageDiscoveryInstance () {
// Do we have an instance in the registry?
- if (GenericRegistry::getRegistry()->instanceExists('package_discovery')) {
+ if (ObjectRegistry::getRegistry('factory')->instanceExists('package_discovery')) {
// Then use this instance
- $discoveryInstance = GenericRegistry::getRegistry()->getInstance('package_discovery');
+ $discoveryInstance = ObjectRegistry::getRegistry('factory')->getInstance('package_discovery');
} else {
// Create a new instance
$discoveryInstance = ObjectFactory::createObjectByConfiguredName('package_recipient_discovery_class');
// Set the instance in registry for further use
- GenericRegistry::getRegistry()->addInstance('package_discovery', $discoveryInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance('package_discovery', $discoveryInstance);
}
// Return the instance
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
/**
* A factory class for socket discovery
*/
public static final function createSocketDiscoveryInstance () {
// Do we have an instance in the registry?
- if (GenericRegistry::getRegistry()->instanceExists('socket_discovery')) {
+ if (ObjectRegistry::getRegistry('factory')->instanceExists('socket_discovery')) {
// Then use this instance
- $discoveryInstance = GenericRegistry::getRegistry()->getInstance('socket_discovery');
+ $discoveryInstance = ObjectRegistry::getRegistry('factory')->getInstance('socket_discovery');
} else {
// Create a new instance
$discoveryInstance = ObjectFactory::createObjectByConfiguredName('socket_discovery_class');
// Set the instance in registry for further use
- GenericRegistry::getRegistry()->addInstance('socket_discovery', $discoveryInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance('socket_discovery', $discoveryInstance);
}
// Return the instance
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
// Import SPL stuff
use \InvalidArgumentException;
$registryKey = sprintf('message_type_%s_handler', $messageType);
// Do we have an instance in the registry?
- if (GenericRegistry::getRegistry()->instanceExists($registryKey)) {
+ if (ObjectRegistry::getRegistry('factory')->instanceExists($registryKey)) {
// Then use this instance
- $handlerInstance = GenericRegistry::getRegistry()->getInstance($registryKey);
+ $handlerInstance = ObjectRegistry::getRegistry('factory')->getInstance($registryKey);
} else {
// Now prepare the tags instance
$handlerInstance = ObjectFactory::createObjectByConfiguredName($registryKey . '_class');
// Set the instance in registry for further use
- GenericRegistry::getRegistry()->addInstance($registryKey, $handlerInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance($registryKey, $handlerInstance);
}
// Return the instance
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
/**
* A factory class for network packages
*/
public static final function createNetworkPackageHandlerInstance () {
// Do we have an instance in the registry?
- if (GenericRegistry::getRegistry()->instanceExists('network_package_handler')) {
+ if (ObjectRegistry::getRegistry('factory')->instanceExists('network_package_handler')) {
// Then use this instance
- $handlerInstance = GenericRegistry::getRegistry()->getInstance('network_package_handler');
+ $handlerInstance = ObjectRegistry::getRegistry('factory')->getInstance('network_package_handler');
} else {
/*
* Prepare the compressor for our package, ZLIB should be fine but we
$handlerInstance = ObjectFactory::createObjectByConfiguredName('network_package_handler_class', array($compressorInstance));
// Set the instance in registry for further use
- GenericRegistry::getRegistry()->addInstance('network_package_handler', $handlerInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance('network_package_handler', $handlerInstance);
}
// Return the instance
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
/**
* A factory class for protocol handlers
*/
private static function createProtocolHandlerByType (string $protocolType) {
// Do we have an instance in the registry?
- if (GenericRegistry::getRegistry()->instanceExists($protocolType . '_protocol_handler')) {
+ if (ObjectRegistry::getRegistry('factory')->instanceExists($protocolType . '_protocol_handler')) {
// Then use this instance
- $handlerInstance = GenericRegistry::getRegistry()->getInstance($protocolType . '_protocol_handler');
+ $handlerInstance = ObjectRegistry::getRegistry('factory')->getInstance($protocolType . '_protocol_handler');
} else {
// Now prepare the tags instance
$handlerInstance = ObjectFactory::createObjectByConfiguredName($protocolType . '_protocol_handler_class');
// Set the instance in registry for further use
- GenericRegistry::getRegistry()->addInstance($protocolType . '_protocol_handler', $handlerInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance($protocolType . '_protocol_handler', $handlerInstance);
}
// Return the instance
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
// Import SPL stuff
use \InvalidArgumentException;
// If there is no info?
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-INFO-FACTORY: key=%s', $key));
- if (GenericRegistry::getRegistry()->instanceExists($key)) {
+ if (ObjectRegistry::getRegistry('factory')->instanceExists($key)) {
// Get info from registry
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-INFO-FACTORY: Getting instance for key=%s ...', $key));
- $infoInstance = GenericRegistry::getRegistry()->getInstance($key);
+ $infoInstance = ObjectRegistry::getRegistry('factory')->getInstance($key);
} else {
// Get the info instance
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-INFO-FACTORY: Creating info instance for connectionType=%s ...', $connectionType));
// Add it to the registry
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-INFO-FACTORY: Adding key=%s,infoInstance=%s ...', $key, $infoInstance->__toString()));
- GenericRegistry::getRegistry()->addInstance($key, $infoInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance($key, $infoInstance);
}
// Return the instance
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
/**
* A factory class for recipient lists
*/
public static final function createRecipientListInstance () {
// Do we have an instance in the registry?
- if (GenericRegistry::getRegistry()->instanceExists('recipient_list')) {
+ if (ObjectRegistry::getRegistry('factory')->instanceExists('recipient_list')) {
// Then use this instance
- $listInstance = GenericRegistry::getRegistry()->getInstance('recipient_list');
+ $listInstance = ObjectRegistry::getRegistry('factory')->getInstance('recipient_list');
} else {
// Create a new instance
$listInstance = ObjectFactory::createObjectByConfiguredName('recipient_list_class');
// Set the instance in registry for further use
- GenericRegistry::getRegistry()->addInstance('recipient_list', $listInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance('recipient_list', $listInstance);
}
// Return the instance
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
// Import SPL stuff
use \InvalidArgumentException;
}
// If there is no handler?
- if (GenericRegistry::getRegistry()->instanceExists('unl_' . $unl)) {
+ if (ObjectRegistry::getRegistry('factory')->instanceExists('unl_' . $unl)) {
// Get handler from registry
- $locatorInstance = GenericRegistry::getRegistry()->getInstance('unl_' . $unl);
+ $locatorInstance = ObjectRegistry::getRegistry('factory')->getInstance('unl_' . $unl);
} else {
// Get the handler instance
$locatorInstance = ObjectFactory::createObjectByConfiguredName('universal_node_locator_class');
$locatorInstance->parseStringAsUnl($unl);
// Add it to the registry
- GenericRegistry::getRegistry()->addInstance('unl_' . $unl, $locatorInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance('unl_' . $unl, $locatorInstance);
}
// Trace message
// Own namespace
namespace Org\Shipsimu\Hub\Factory\Node;
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Factory\Parameter\FactoryRequiredParameterException;
+
// Import framework stuff
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
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\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
use Org\Mxchange\CoreFramework\Utils\Strings\StringUtils;
$factoryInstance = new NodeObjectFactory();
// If there is no handler?
- if (GenericRegistry::getRegistry()->instanceExists('node')) {
+ if (ObjectRegistry::getRegistry('factory')->instanceExists('node')) {
// Get handler from registry
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-FACTORY: Getting node instance from registry ...');
- $nodeInstance = GenericRegistry::getRegistry()->getInstance('node');
+ $nodeInstance = ObjectRegistry::getRegistry('factory')->getInstance('node');
} elseif (($requestInstance instanceof Requestable) && ($responseInstance instanceof Responseable)) {
// The default node-mode is from our configuration
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-FACTORY: requestInstance and responseInstance are both set.');
// Add it to the registry
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NODE-FACTORY: Adding nodeInstance=%s to registry ...', $nodeInstance->__toString()));
- GenericRegistry::getRegistry()->addInstance('node', $nodeInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance('node', $nodeInstance);
} else {
// Throw an exception here
throw new FactoryRequiredParameterException($factoryInstance, self::EXCEPTION_FACTORY_REQUIRE_PARAMETER);
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
/**
* A factory class for package assembler
*/
public static final function createAssemblerInstance (Receivable $handlerInstance) {
// If there is no assembler?
- if (GenericRegistry::getRegistry()->instanceExists('package_assembler')) {
+ if (ObjectRegistry::getRegistry('factory')->instanceExists('package_assembler')) {
// Get assembler from registry
- $assemblerInstance = GenericRegistry::getRegistry()->getInstance('package_assembler');
+ $assemblerInstance = ObjectRegistry::getRegistry('factory')->getInstance('package_assembler');
} else {
// Get the assembler instance
$assemblerInstance = ObjectFactory::createObjectByConfiguredName('package_assembler_class', array($handlerInstance));
// Add it to the registry
- GenericRegistry::getRegistry()->addInstance('package_assembler', $assemblerInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance('package_assembler', $assemblerInstance);
}
// Return the instance
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
/**
* A factory class for network packages
*/
public static final function createNetworkPackageHandlerInstance () {
// Do we have an instance in the registry?
- if (GenericRegistry::getRegistry()->instanceExists('network_package')) {
+ if (ObjectRegistry::getRegistry('factory')->instanceExists('network_package')) {
// Then use this instance
- $packageInstance = GenericRegistry::getRegistry()->getInstance('network_package');
+ $packageInstance = ObjectRegistry::getRegistry('factory')->getInstance('network_package');
} else {
/*
* Prepare the compressor for our package, ZLIB should be fine but we
$packageInstance = ObjectFactory::createObjectByConfiguredName('network_package_class', array($compressorInstance));
// Set the instance in registry for further use
- GenericRegistry::getRegistry()->addInstance('network_package', $packageInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance('network_package', $packageInstance);
}
// Return the instance
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
// Import SPL stuff
use \InvalidArgumentException;
}
// If there is no fragmenter?
- if (GenericRegistry::getRegistry()->instanceExists($fragmenterType . '_fragmenter')) {
+ if (ObjectRegistry::getRegistry('factory')->instanceExists($fragmenterType . '_fragmenter')) {
// Get fragmenter from registry
- $fragmenterInstance = GenericRegistry::getRegistry()->getInstance($fragmenterType . '_fragmenter');
+ $fragmenterInstance = ObjectRegistry::getRegistry('factory')->getInstance($fragmenterType . '_fragmenter');
} else {
// Get the fragmenter instance
$fragmenterInstance = ObjectFactory::createObjectByConfiguredName($fragmenterType . '_fragmenter_class');
// Add it to the registry
- GenericRegistry::getRegistry()->addInstance($fragmenterType . '_fragmenter', $fragmenterInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance($fragmenterType . '_fragmenter', $fragmenterInstance);
}
// Return the instance
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
/**
* A factory class for producer
*/
public static final function createProducerInstance (string $configEntry, string $producerType) {
// If there is no producer?
- if (GenericRegistry::getRegistry()->instanceExists($producerType . '_producer')) {
+ if (ObjectRegistry::getRegistry('factory')->instanceExists($producerType . '_producer')) {
// Get producer from registry
- $producerInstance = GenericRegistry::getRegistry()->getInstance($producerType . '_producer');
+ $producerInstance = ObjectRegistry::getRegistry('factory')->getInstance($producerType . '_producer');
} else {
// Get the producer instance
$producerInstance = ObjectFactory::createObjectByConfiguredName($configEntry);
// Add it to the registry
- GenericRegistry::getRegistry()->addInstance($producerType . '_producer', $producerInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance($producerType . '_producer', $producerInstance);
}
// Return the instance
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
/**
* A factory class for network packages
*/
public static final function createObjectTypeRegistryInstance () {
// Do we have an instance in the registry?
- if (GenericRegistry::getRegistry()->instanceExists('object_type_registry')) {
+ if (ObjectRegistry::getRegistry('factory')->instanceExists('object_type_registry')) {
// Then use this instance
- $registryInstance = GenericRegistry::getRegistry()->getInstance('object_type_registry');
+ $registryInstance = ObjectRegistry::getRegistry('factory')->getInstance('object_type_registry');
} else {
// Now prepare the tags instance
$registryInstance = ObjectFactory::createObjectByConfiguredName('node_object_type_registry_class');
// Set the instance in registry for further use
- GenericRegistry::getRegistry()->addInstance('object_type_registry', $registryInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance('object_type_registry', $registryInstance);
}
// Return the instance
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
/**
* A factory class for ProtocolResolver
$protocolName = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('hub_communication_protocol_type');
// If there is no handler?
- if (GenericRegistry::getRegistry()->instanceExists($protocolName . '_protocol_resolver')) {
+ if (ObjectRegistry::getRegistry('factory')->instanceExists($protocolName . '_protocol_resolver')) {
// Get handler from registry
- $resolverInstance = GenericRegistry::getRegistry()->getInstance($protocolName . '_protocol_resolver');
+ $resolverInstance = ObjectRegistry::getRegistry('factory')->getInstance($protocolName . '_protocol_resolver');
} else {
// Get the handler instance
$resolverInstance = ObjectFactory::createObjectByConfiguredName($protocolName . '_protocol_resolver_class');
// Add it to the registry
- GenericRegistry::getRegistry()->addInstance($protocolName . '_protocol_resolver', $resolverInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance($protocolName . '_protocol_resolver', $resolverInstance);
}
// Return the instance
use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Socket\InvalidSocketException;
// Import SPL stuff
// Is the key there?
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SOCKET-FACTORY: Trying to find a socket with registryKey=%s', $registryKey));
- if (GenericRegistry::getRegistry()->instanceExists($registryKey)) {
+ if (ObjectRegistry::getRegistry('factory')->instanceExists($registryKey)) {
// Get container instance
- $socketInstance = GenericRegistry::getRegistry()->getInstance($registryKey);
+ $socketInstance = ObjectRegistry::getRegistry('factory')->getInstance($registryKey);
// Debug message
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SOCKET-FACTORY: Using socketResource[%s]=%s from registry.', gettype($socketInstance->getSocketResource()), $socketInstance->getSocketResource()));
$socketInstance = ObjectFactory::createObjectByConfiguredName(sprintf('%s_connection_helper_class', $protocolInstance->getProtocolName()), array($packageInstance));
// Register it with the registry
- GenericRegistry::getRegistry()->addInstance($registryKey, $socketInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance($registryKey, $socketInstance);
// Debug message
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Socket is now registered in registry.');
$socketProtocol = $socketInstance->getSocketProtocol();
// Is the an iterator instance?
- if (!GenericRegistry::getRegistry()->instanceExists('pool_iterator_' . $socketProtocol)) {
+ if (!ObjectRegistry::getRegistry('factory')->instanceExists('pool_iterator_' . $socketProtocol)) {
// Create iterator instance
$iteratorInstance = $poolInstance->createListIteratorInstance($socketProtocol . '_pool');
// Now store it in registry
- GenericRegistry::getRegistry()->addInstance('pool_iterator', $iteratorInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance('pool_iterator', $iteratorInstance);
} else {
// Get iterator from registry
- $iteratorInstance = GenericRegistry::getRegistry()->getInstance('pool_iterator_' . $socketProtocol);
+ $iteratorInstance = ObjectRegistry::getRegistry('factory')->getInstance('pool_iterator_' . $socketProtocol);
}
// Is it valid?
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
// Import SPL stuff
use \InvalidArgumentException;
}
// Do we have cache?
- if (!GenericRegistry::getRegistry()->instanceExists($unitType . '_unit_source')) {
+ if (!ObjectRegistry::getRegistry('factory')->instanceExists($unitType . '_unit_source')) {
// Then construct the class' configuraton entry
$className = '' . $unitType . '_unit_source_class';
$sourceInstance = ObjectFactory::createObjectByConfiguredName($className);
// Add it to the registry
- GenericRegistry::getRegistry()->addInstance($unitType . '_unit_source', $sourceInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance($unitType . '_unit_source', $sourceInstance);
} else {
// Get it from registry
- $sourceInstance = GenericRegistry::getRegistry()->getInstance($unitType . '_unit_source');
+ $sourceInstance = ObjectRegistry::getRegistry('factory')->getInstance($unitType . '_unit_source');
}
// For any purposes, return the source instance
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Task\Taskable;
/**
$factoryInstance = new UrlSourceObjectFactory();
// Get task handler instance
- $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler');
+ $handlerInstance = ObjectRegistry::getRegistry('factory')->getInstance('task_handler');
// Get source type by looking for given task instance in task handler
$sourceType = $handlerInstance->searchTask($taskInstance);
assert(!empty($sourceType));
// If there is no handler?
- if (GenericRegistry::getRegistry()->instanceExists('source_' . $sourceType)) {
+ if (ObjectRegistry::getRegistry('factory')->instanceExists('source_' . $sourceType)) {
// Get handler from registry
- $sourceInstance = GenericRegistry::getRegistry()->getInstance('source_' . $sourceType);
+ $sourceInstance = ObjectRegistry::getRegistry('factory')->getInstance('source_' . $sourceType);
} else {
// Get the source instance
$sourceInstance = ObjectFactory::createObjectByConfiguredName($sourceType . '_class');
// Add it to the registry
- GenericRegistry::getRegistry()->addInstance('source_' . $sourceType, $sourceInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance('source_' . $sourceType, $sourceInstance);
}
// Return the instance
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
// Import SPL stuff
use \InvalidArgumentException;
$stateInstance = ObjectFactory::createObjectByConfiguredName('crawler_' . $stateName . '_state_class');
// Get crawler instance
- $crawlerInstance = GenericRegistry::getRegistry()->getInstance('crawler');
+ $crawlerInstance = ObjectRegistry::getRegistry('factory')->getInstance('crawler');
// Debug message
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-STATE-FACTORY: Crawler state has changed from ' . $crawlerInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
// Import SPL stuff
use \InvalidArgumentException;
}
// Get cruncher instance from registry
- $cruncherInstance = GenericRegistry::getRegistry()->getInstance('cruncher');
+ $cruncherInstance = ObjectRegistry::getRegistry('factory')->getInstance('cruncher');
// Get a class from that configuration entry
$stateInstance = ObjectFactory::createObjectByConfiguredName(sprintf('cruncher_%s_state_class', $stateName));
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
// Import SPL stuff
use \InvalidArgumentException;
}
// Get miner instance
- $minerInstance = GenericRegistry::getRegistry()->getInstance('miner');
+ $minerInstance = ObjectRegistry::getRegistry('factory')->getInstance('miner');
// Get a class from that configuration entry
$stateInstance = ObjectFactory::createObjectByConfiguredName('miner_' . $stateName . '_state_class');
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
/**
* A factory class for network packages
*/
public static final function createPackageTagsInstance () {
// Do we have an instance in the registry?
- if (GenericRegistry::getRegistry()->instanceExists('package_tags')) {
+ if (ObjectRegistry::getRegistry('factory')->instanceExists('package_tags')) {
// Then use this instance
- $packageInstance = GenericRegistry::getRegistry()->getInstance('package_tags');
+ $packageInstance = ObjectRegistry::getRegistry('factory')->getInstance('package_tags');
} else {
// Now prepare the tags instance
$packageInstance = ObjectFactory::createObjectByConfiguredName('package_tags_class');
// Set the instance in registry for further use
- GenericRegistry::getRegistry()->addInstance('package_tags', $packageInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance('package_tags', $packageInstance);
}
// Return the instance
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get task handler instance
- $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler');
+ $handlerInstance = ObjectRegistry::getRegistry('generic')->getInstance('task_handler');
// Prepare a self-test task for the listeners
$taskInstance = ObjectFactory::createObjectByConfiguredName('node_announcement_task_class');
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\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
$proxyInstance->addExtraFilters($applicationInstance->getControllerInstance(), $responseInstance);
// Set the apt_proxy instance in registry
- GenericRegistry::getRegistry()->addInstance('apt_proxy', $proxyInstance);
+ ObjectRegistry::getRegistry('hub')->addInstance('apt_proxy', $proxyInstance);
}
}
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get node instance
- $proxyInstance = GenericRegistry::getRegistry()->getInstance('apt_proxy');
+ $proxyInstance = ObjectRegistry::getRegistry('hub')->getInstance('apt_proxy');
// Now output the teaser
$proxyInstance->outputConsoleTeaser();
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get apt-proxy instance
- $proxyInstance = GenericRegistry::getRegistry()->getInstance('apt_proxy');
+ $proxyInstance = ObjectRegistry::getRegistry('hub')->getInstance('apt_proxy');
// Now do something
DebugMiddleware::getSelfInstance()->partialStub('Please implement this step.');
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get apt-proxy instance
- $proxyInstance = GenericRegistry::getRegistry()->getInstance('apt_proxy');
+ $proxyInstance = ObjectRegistry::getRegistry('hub')->getInstance('apt_proxy');
// Do some extra bootstrapping steps
$proxyInstance->doBootstrapping();
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get a apt-proxy instance
- $proxyInstance = GenericRegistry::getRegistry()->getInstance('apt_proxy');
+ $proxyInstance = ObjectRegistry::getRegistry('hub')->getInstance('apt_proxy');
// Set the flag
$proxyInstance->enableIsActive();
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get chat instance
- $chatInstance = GenericRegistry::getRegistry()->getInstance('chat');
+ $chatInstance = ObjectRegistry::getRegistry('hub')->getInstance('chat');
// Now do something
DebugMiddleware::getSelfInstance()->partialStub('Please implement this step.');
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get chat instance
- $chatInstance = GenericRegistry::getRegistry()->getInstance('chat');
+ $chatInstance = ObjectRegistry::getRegistry('hub')->getInstance('chat');
// Do some extra bootstrapping steps
$chatInstance->doBootstrapping();
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get a chat instance
- $chatInstance = GenericRegistry::getRegistry()->getInstance('chat');
+ $chatInstance = ObjectRegistry::getRegistry('hub')->getInstance('chat');
// Set the flag
$chatInstance->enableIsActive();
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get crawler instance
- $crawlerInstance = GenericRegistry::getRegistry()->getInstance('crawler');
+ $crawlerInstance = ObjectRegistry::getRegistry('hub')->getInstance('crawler');
// Now do something
DebugMiddleware::getSelfInstance()->partialStub('Please implement this step.');
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get crawler instance
- $crawlerInstance = GenericRegistry::getRegistry()->getInstance('crawler');
+ $crawlerInstance = ObjectRegistry::getRegistry('hub')->getInstance('crawler');
// Do some extra bootstrapping steps
$crawlerInstance->doBootstrapping();
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get a crawler instance
- $crawlerInstance = GenericRegistry::getRegistry()->getInstance('crawler');
+ $crawlerInstance = ObjectRegistry::getRegistry('hub')->getInstance('crawler');
// Set the flag
$crawlerInstance->enableIsActive();
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get cruncher instance
- $cruncherInstance = GenericRegistry::getRegistry()->getInstance('cruncher');
+ $cruncherInstance = ObjectRegistry::getRegistry('hub')->getInstance('cruncher');
// Now do something
DebugMiddleware::getSelfInstance()->partialStub('Please implement this step.');
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get cruncher instance
- $cruncherInstance = GenericRegistry::getRegistry()->getInstance('cruncher');
+ $cruncherInstance = ObjectRegistry::getRegistry('hub')->getInstance('cruncher');
// Init all buffer queues
$cruncherInstance->initBufferQueues();
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get cruncher instance
- $cruncherInstance = GenericRegistry::getRegistry()->getInstance('cruncher');
+ $cruncherInstance = ObjectRegistry::getRegistry('hub')->getInstance('cruncher');
// Do some extra bootstrapping steps
$cruncherInstance->doBootstrapping();
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get a cruncher instance
- $cruncherInstance = GenericRegistry::getRegistry()->getInstance('cruncher');
+ $cruncherInstance = ObjectRegistry::getRegistry('hub')->getInstance('cruncher');
// Set the flag
$cruncherInstance->enableIsActive();
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get miner instance
- $minerInstance = GenericRegistry::getRegistry()->getInstance('miner');
+ $minerInstance = ObjectRegistry::getRegistry('hub')->getInstance('miner');
// Now do something
DebugMiddleware::getSelfInstance()->partialStub('Please implement this step.');
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get miner instance
- $minerInstance = GenericRegistry::getRegistry()->getInstance('miner');
+ $minerInstance = ObjectRegistry::getRegistry('hub')->getInstance('miner');
// Init all buffer queues
$minerInstance->initBufferQueues();
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get miner instance
- $minerInstance = GenericRegistry::getRegistry()->getInstance('miner');
+ $minerInstance = ObjectRegistry::getRegistry('hub')->getInstance('miner');
// Do some extra bootstrapping steps
$minerInstance->doBootstrapping();
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get a miner instance
- $minerInstance = GenericRegistry::getRegistry()->getInstance('miner');
+ $minerInstance = ObjectRegistry::getRegistry('hub')->getInstance('miner');
// Set the flag
$minerInstance->enableIsActive();
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\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
$chatInstance->addExtraFilters($applicationInstance->getControllerInstance(), $responseInstance);
// Set the chat instance in registry
- GenericRegistry::getRegistry()->addInstance('chat', $chatInstance);
+ ObjectRegistry::getRegistry('hub')->addInstance('chat', $chatInstance);
}
}
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get node instance
- $chatInstance = GenericRegistry::getRegistry()->getInstance('chat');
+ $chatInstance = ObjectRegistry::getRegistry('hub')->getInstance('chat');
// Now output the teaser
$chatInstance->outputConsoleTeaser();
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\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get node instance
- $crawlerInstance = GenericRegistry::getRegistry()->getInstance('crawler');
+ $crawlerInstance = ObjectRegistry::getRegistry('hub')->getInstance('crawler');
// Now output the teaser
$crawlerInstance->outputConsoleTeaser();
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get node instance
- $cruncherInstance = GenericRegistry::getRegistry()->getInstance('cruncher');
+ $cruncherInstance = ObjectRegistry::getRegistry('hub')->getInstance('cruncher');
// Now output the teaser
$cruncherInstance->outputConsoleTeaser();
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\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get node instance
- $minerInstance = GenericRegistry::getRegistry()->getInstance('miner');
+ $minerInstance = ObjectRegistry::getRegistry('hub')->getInstance('miner');
// Now output the teaser
$minerInstance->outputConsoleTeaser();
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get node instance
- $proxyInstance = GenericRegistry::getRegistry()->getInstance('apt_proxy');
+ $proxyInstance = ObjectRegistry::getRegistry('hub')->getInstance('apt_proxy');
// Shutdown the apt-proxy. This should be the last line
$proxyInstance->doShutdown();
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get node instance
- $chatInstance = GenericRegistry::getRegistry()->getInstance('chat');
+ $chatInstance = ObjectRegistry::getRegistry('hub')->getInstance('chat');
// Shutdown the chat. This should be the last line
$chatInstance->doShutdown();
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get node instance
- $crawlerInstance = GenericRegistry::getRegistry()->getInstance('crawler');
+ $crawlerInstance = ObjectRegistry::getRegistry('hub')->getInstance('crawler');
// Shutdown the crawler. This should be the last line
$crawlerInstance->doShutdown();
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get node instance
- $cruncherInstance = GenericRegistry::getRegistry()->getInstance('cruncher');
+ $cruncherInstance = ObjectRegistry::getRegistry('hub')->getInstance('cruncher');
// Shutdown the cruncher. This should be the last line
$cruncherInstance->doShutdown();
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get node instance
- $minerInstance = GenericRegistry::getRegistry()->getInstance('miner');
+ $minerInstance = ObjectRegistry::getRegistry('hub')->getInstance('miner');
// Shutdown the miner. This should be the last line
$minerInstance->doShutdown();
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get task handler instance
- $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler');
+ $handlerInstance = ObjectRegistry::getRegistry('generic')->getInstance('task_handler');
// Shutdown the task manager and all its registered tasks
$handlerInstance->doShutdown();
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get apt-proxy instance
- //$chatInstance = GenericRegistry::getRegistry()->getInstance('chat');
+ //$chatInstance = ObjectRegistry::getRegistry('hub')->getInstance('chat');
// Get a new task handler instance
$handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class');
// Put the task handler in registry
- GenericRegistry::getRegistry()->addInstance('task_handler', $handlerInstance);
+ ObjectRegistry::getRegistry('generic')->addInstance('task_handler', $handlerInstance);
/*
* Register all tasks:
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get chat instance
- //$chatInstance = GenericRegistry::getRegistry()->getInstance('chat');
+ //$chatInstance = ObjectRegistry::getRegistry('hub')->getInstance('chat');
// Get a new task handler instance
$handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class');
// Put the task handler in registry
- GenericRegistry::getRegistry()->addInstance('task_handler', $handlerInstance);
+ ObjectRegistry::getRegistry('generic')->addInstance('task_handler', $handlerInstance);
/*
* Register all tasks:
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
$handlerInstance->registerTask('crawler_snippet_extractor', $taskInstance);
// Add handler instance to registry
- GenericRegistry::getRegistry()->addInstance('task_handler', $handlerInstance);
+ ObjectRegistry::getRegistry('hub')->addInstance('task_handler', $handlerInstance);
}
}
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
parent::execute($requestInstance, $responseInstance);
// Get task handler instance
- $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler');
+ $handlerInstance = ObjectRegistry::getRegistry('generic')->getInstance('task_handler');
/*
* Register all tasks for a distributed crawler:
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get cruncher instance
- //$cruncherInstance = GenericRegistry::getRegistry()->getInstance('cruncher');
+ //$cruncherInstance = ObjectRegistry::getRegistry('hub')->getInstance('cruncher');
// Get a new task handler instance
$handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class');
// Put the task handler in registry
- GenericRegistry::getRegistry()->addInstance('task_handler', $handlerInstance);
+ ObjectRegistry::getRegistry('generic')->addInstance('task_handler', $handlerInstance);
// Register all tasks:
//
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get miner instance
- //$minerInstance = GenericRegistry::getRegistry()->getInstance('miner');
+ //$minerInstance = ObjectRegistry::getRegistry('hub')->getInstance('miner');
// Get a new task handler instance
$handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class');
// Put the task handler in registry
- GenericRegistry::getRegistry()->addInstance('task_handler', $handlerInstance);
+ ObjectRegistry::getRegistry('generic')->addInstance('task_handler', $handlerInstance);
// Register all tasks:
//
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Filter\Filterable;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
$handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class');
// Put the task handler in registry
- GenericRegistry::getRegistry()->addInstance('task_handler', $handlerInstance);
+ ObjectRegistry::getRegistry('generic')->addInstance('task_handler', $handlerInstance);
// Prepare a package-tags initialization task for the listeners
$taskInstance = ObjectFactory::createObjectByConfiguredName('node_package_tags_init_task_class');
// Import framework stuff
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
DhtObjectFactory::createDhtInstance('node')->registerNodeByMessageInstance($messageInstance, $this, TRUE);
// Get handler instance
- $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler');
+ $handlerInstance = ObjectRegistry::getRegistry('generic')->getInstance('task_handler');
// Generate DHT bootstrap task
$taskInstance = ObjectFactory::createObjectByConfiguredName('node_dht_late_bootstrap_task_class');
use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Generic\NullPointerException;
use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Socket\InvalidSocketException;
use Org\Mxchange\CoreFramework\State\UnexpectedStateException;
// Get the connection helper from registry
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-HANDLER: Getting helperInstance for connection from registry ...');
- $helperInstance = GenericRegistry::getRegistry()->getInstance('connection');
+ $helperInstance = ObjectRegistry::getRegistry('hub')->getInstance('connection');
// Get connection info class
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-HANDLER: stateInstance=%s', $helperInstance->getStateInstance()));
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Traits\Stream\Output\OutputStreamTrait;
use Org\Mxchange\CoreFramework\Traits\State\StateableTrait;
$this->setPackageHandlerInstance($handlerInstance);
// Register this connection helper
- GenericRegistry::getRegistry()->addInstance('connection', $this);
+ ObjectRegistry::getRegistry('hub')->addInstance('connection', $this);
// Get the fragmenter instance
$fragmenterInstance = FragmenterFactory::createFragmenterInstance('package');
use Org\Mxchange\CoreFramework\Database\Updateable;
use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Traits\State\StateableTrait;
/**
*/
private function initMiner () {
// Add own instance to registry
- GenericRegistry::getRegistry()->addInstance('miner', $this);
+ ObjectRegistry::getRegistry('hub')->addInstance('miner', $this);
// Init the state
MinerStateFactory::createMinerStateInstanceByName('init');
use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask;
use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
use Org\Mxchange\CoreFramework\Generic\NullPointerException;
use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
use Org\Mxchange\CoreFramework\Result\Search\SearchableResult;
$this->setCryptoInstance($cryptoInstance);
// Set the node instance in registry
- GenericRegistry::getRegistry()->addInstance('node', $this);
+ ObjectRegistry::getRegistry('hub')->addInstance('node', $this);
// Init state which sets the state to 'init'
$this->initState();
}
// Get the controller here
- $controllerInstance = GenericRegistry::getRegistry()->getInstance('controller');
+ $controllerInstance = ObjectRegistry::getRegistry('hub')->getInstance('controller');
// Run all filters for the hub activation
$controllerInstance->executeActivationFilters($requestInstance, $responseInstance);
use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask;
use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask;
use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask;
use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Visitor\Visitable;
use Org\Mxchange\CoreFramework\Visitor\Visitor;
$visitorInstance->visitPool($this);
// Do we have a registry instance for this visitor's iterator?
- if (GenericRegistry::getRegistry()->instanceExists($visitorInstance->getVisitorMode() . '_pool_iterator')) {
+ if (ObjectRegistry::getRegistry('hub')->instanceExists($visitorInstance->getVisitorMode() . '_pool_iterator')) {
// Get the instance from registry
- $iteratorInstance = GenericRegistry::getRegistry()->getInstance($visitorInstance->getVisitorMode() . '_pool_iterator');
+ $iteratorInstance = ObjectRegistry::getRegistry('hub')->getInstance($visitorInstance->getVisitorMode() . '_pool_iterator');
} else {
// Get a new iterator instance
$iteratorInstance = ObjectFactory::createObjectByConfiguredName($visitorInstance->getVisitorMode() . '_pool_iterator_class', array($this->getPoolEntriesInstance()));
// Add it to the registry
- GenericRegistry::getRegistry()->addInstance($visitorInstance->getVisitorMode() . '_pool_iterator', $iteratorInstance);
+ ObjectRegistry::getRegistry('hub')->addInstance($visitorInstance->getVisitorMode() . '_pool_iterator', $iteratorInstance);
}
// Is it valid?
use Org\Shipsimu\Hub\Producer\BaseProducer;
// Import framework stuff
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
/**
* A generic cruncher producer class
parent::__construct($className);
// Get cruncher instance
- $cruncherInstance = GenericRegistry::getRegistry()->getInstance('cruncher');
+ $cruncherInstance = ObjectRegistry::getRegistry('hub')->getInstance('cruncher');
// Change state to next state
$cruncherInstance->blockProducerHasInitialized($this);
use Org\Shipsimu\Hub\Producer\BaseProducer;
// Import framework stuff
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
/**
* A generic miner producer class
parent::__construct($className);
// Get miner instance
- $minerInstance = GenericRegistry::getRegistry()->getInstance('miner');
+ $minerInstance = ObjectRegistry::getRegistry('hub')->getInstance('miner');
// Change state to next state
$minerInstance->blockProducerHasInitialized($this);
use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
/**
* A Package tags class
use Org\Shipsimu\Hub\Task\BaseHubTask;
// Import framework stuff
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Task\BaseTask;
use Org\Mxchange\CoreFramework\Task\Taskable;
use Org\Mxchange\CoreFramework\Visitor\Visitable;
$communicatorInstance = CommunicatorFactory::createCommunicatorInstance('crawler_node_communicator_class', 'node');
// Get the current crawler state from registry
- $stateInstance = GenericRegistry::getRegistry()->getInstance('crawler')->getStateInstance();
+ $stateInstance = ObjectRegistry::getRegistry('hub')->getInstance('crawler')->getStateInstance();
// Debug message
/* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-NODE-COMMUNICATOR-TASK: Executing stateInstance=' . $stateInstance->__toString());
use Org\Shipsimu\Hub\Task\BaseHubTask;
// Import framework stuff
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Task\BaseTask;
use Org\Mxchange\CoreFramework\Task\Taskable;
use Org\Mxchange\CoreFramework\Visitor\Visitable;
$producerInstance = ProducerFactory::createProducerInstance('cruncher_key_producer_class', 'key');
// Get the current cruncher state from registry
- $stateInstance = GenericRegistry::getRegistry()->getInstance('cruncher')->getStateInstance();
+ $stateInstance = ObjectRegistry::getRegistry('hub')->getInstance('cruncher')->getStateInstance();
// Debug message
/* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRUNCHER-KEY-PRODUCER-TASK: Executing stateInstance=' . $stateInstance->__toString());
use Org\Shipsimu\Hub\Task\BaseHubTask;
// Import framework stuff
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Task\BaseTask;
use Org\Mxchange\CoreFramework\Task\Taskable;
use Org\Mxchange\CoreFramework\Visitor\Visitable;
$producerInstance = ProducerFactory::createProducerInstance('cruncher_test_unit_producer_class', 'test_unit');
// Get the current cruncher state from registry
- $stateInstance = GenericRegistry::getRegistry()->getInstance('cruncher')->getStateInstance();
+ $stateInstance = ObjectRegistry::getRegistry('hub')->getInstance('cruncher')->getStateInstance();
// Debug message
/* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRUNCHER-TEST-UNIT-PRODUCER-TASK: Executing stateInstance=' . $stateInstance->__toString());
use Org\Shipsimu\Hub\Task\BaseHubTask;
// Import framework stuff
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Task\BaseTask;
use Org\Mxchange\CoreFramework\Task\Taskable;
use Org\Mxchange\CoreFramework\Visitor\Visitable;
*
* Please report any bugs you encounter to me.
*/
- GenericRegistry::getRegistry()->getInstance('cruncher')->doFetchWorkUnits();
+ ObjectRegistry::getRegistry('hub')->getInstance('cruncher')->doFetchWorkUnits();
}
/**
use Org\Shipsimu\Hub\Task\BaseHubTask;
// Import framework stuff
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Task\BaseTask;
use Org\Mxchange\CoreFramework\Task\Taskable;
use Org\Mxchange\CoreFramework\Visitor\Visitable;
*
* Please report any bugs you encounter to me.
*/
- GenericRegistry::getRegistry()->getInstance('miner')->doSearchForBlocks();
+ ObjectRegistry::getRegistry('hub')->getInstance('miner')->doSearchForBlocks();
}
/**
use Org\Shipsimu\Hub\Task\BaseHubTask;
// Import framework stuff
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Task\BaseTask;
use Org\Mxchange\CoreFramework\Task\Taskable;
use Org\Mxchange\CoreFramework\Visitor\Visitable;
$producerInstance = ProducerFactory::createProducerInstance('miner_real_genesis_block_producer_class', 'real_unit');
// Get the current miner state from registry
- $stateInstance = GenericRegistry::getRegistry()->getInstance('miner')->getStateInstance();
+ $stateInstance = ObjectRegistry::getRegistry('hub')->getInstance('miner')->getStateInstance();
// Debug message
/* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MINER-GENESIS-BLOCK-PRODUCER-TASK: Executing stateInstance=' . $stateInstance->__toString());
use Org\Shipsimu\Hub\Task\BaseHubTask;
// Import framework stuff
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Task\BaseTask;
use Org\Mxchange\CoreFramework\Task\Taskable;
use Org\Mxchange\CoreFramework\Visitor\Visitable;
$producerInstance = ProducerFactory::createProducerInstance('miner_test_genesis_block_producer_class', 'test_unit');
// Get the current miner state from registry
- $stateInstance = GenericRegistry::getRegistry()->getInstance('miner')->getStateInstance();
+ $stateInstance = ObjectRegistry::getRegistry('hub')->getInstance('miner')->getStateInstance();
// Debug message
/* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MINER-TEST-GENESIS-BLOCK-PRODUCER-TASK: Executing stateInstance=' . $stateInstance->__toString());
// Import framework stuff
use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Template\Engine\Xml\BaseXmlTemplateEngine;
use Org\Mxchange\CoreFramework\Template\Xml\CompileableXmlTemplate;
-Subproject commit bfe1b8bbcc74881eb34f03922f29c6e2d642bc6b
+Subproject commit d80aa06027f7eafcabc7c5e307d2126456a6dc0a