use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
use Org\Mxchange\CoreFramework\Loader\ClassLoader;
use Org\Mxchange\CoreFramework\Manager\ManageableApplication;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
// Import application-specific stuff
use Org\Shipsimu\Hub\Generic\BaseHubSystem;
-// Import framework-specific stuff
+// Import framework stuff
use Org\Mxchange\CoreFramework\Compressor\Compressor;
/**
namespace Org\Shipsimu\Hub\Cruncher;
// Import application-specific stuff
+use Org\Shipsimu\Hub\Factory\State\Cruncher\CruncherStateFactory;
use Org\Shipsimu\Hub\Generic\BaseHubSystem;
// Import framework stuff
+++ /dev/null
-Deny from all
+++ /dev/null
-<?php
-// Own namespace
-namespace Org\Shipsimu\Hub\Cruncher\Mcrypt;
-
-// Import framework stuff
-use Org\Mxchange\CoreFramework\Controller\Controller;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\Registerable;
-use Org\Mxchange\CoreFramework\Response\Responseable;
-
-/**
- * A hub-mcrypt cruncher class
- *
- * @author Roland Haeder <webmaster@shipsimu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2011 - 2014 - 2018 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.shipsimu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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 HubMcryptCruncher extends BaseHubCruncher implements CruncherHelper, Registerable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
-
- // Set version number
- $this->setVersion('0.0.0');
- }
-
- /**
- * Creates an instance of this hub-cruncher class
- *
- * @return $cruncherInstance An instance of this hub-cruncher class
- */
- public final static function createHubMcryptCruncher () {
- // Get a new instance
- $cruncherInstance = new HubMcryptCruncher();
-
- // Return the instance
- return $cruncherInstance;
- }
-
- /**
- * This method fills the in-buffer with (a) test unit(s) which are mainly
- * used for development of the crunching part. They must be enabled in
- * configuration, or else your cruncher runs out of WUs and waits for more
- * to show up.
- *
- * In this method we already know that the in-buffer is going depleted so
- * no need to double-check it here.
- *
- * @return void
- */
- protected function fillInBufferQueueWithTestUnits () {
- // Are test units enabled?
- if ($this->getConfigInstance()->getConfigEntry('cruncher_test_units_enabled') == 'N') {
- // They are disabled, so skip any further steps
- return;
- } elseif ($this->getStateInstance()->isCruncherStateVirgin()) {
- // No virgin crunchers please, because they usually have no test units ready for crunching
- return;
- }
-
- // Get a test-unit generator instance
- $generatorInstance = ObjectFactory::createObjectByConfiguredName('cruncher_test_unit_generator_class');
-
- // We don't need an iterator here because we just need to generate some test units
- for ($idx = 0; $idx < $this->getConfigInstance()->getConfigEntry('cruncher_max_text_unit_amount'); $idx++) {
- // Get a test unit from it
- $unitInstance = $generatorInstance->generateNextUnitInstance();
-
- // ... and finally queue it to the in-buffer queue
- $this->queueUnitInstanceToInBuffer($unitInstance);
- } // END - for
- }
-
- /**
- * This method fills the in-buffer with (real) WUs which will be crunched
- * and the result be sent back to the key producer instance.
- *
- * @return void
- */
- protected function fillInBufferQueueWithWorkUnits () {
- // This cruncher's state must not be one of these: 'virgin'
- if ($this->getStateInstance()->isCruncherStateVirgin()) {
- // We can silently skip here, until the generation is finished
- return;
- } // END - if
-
- // @TODO Implement this method
- $this->partialStub('Please implement this method.');
- }
-
- /**
- * Method to "bootstrap" the cruncher. This step does also apply provided
- * command-line arguments stored in the request instance. No buffer queue
- * will be initialized here, we only do "general" things here.
- *
- * @return void
- * @todo Implement this method
- */
- public function doBootstrapping () {
- $this->partialStub('Please implement this method.');
- }
-
- /**
- * Outputs the console teaser. This should only be executed on startup or
- * full restarts. This method generates some space around the teaser.
- *
- * @return void
- */
- public function outputConsoleTeaser () {
- // Output all lines
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(' ');
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MCrypt Cruncher v' . $this->getVersion() . ' is starting ...');
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Copyright (c) 2011 - 2014 - 2018 Hub Developer Team');
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(' ');
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('This program comes with ABSOLUTELY NO WARRANTY; for details see docs/COPYING.');
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('This is free software, and you are welcome to redistribute it under certain');
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('conditions; see docs/COPYING for details.');
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(' ');
- }
-
- /**
- * Add some cruncher-specific filters
- *
- * @param $controllerInstance An object of a Controller instance
- * @param $responseInstance An object of a Responseable instance
- * @return void
- * @todo 0% done
- */
- public function addExtraFilters (Controller $controllerInstance, Responseable $responseInstance) {
- // Add some filters here
- $this->partialStub('Please add some cruncher-specific filters, if required.');
- }
-}
-
-// [EOF]
-?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+// Own namespace
+namespace Org\Shipsimu\Hub\Cruncher\OpenSsl;
+
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Cruncher\BaseHubCruncher;
+use Org\Shipsimu\Hub\Helper\Cruncher\CruncherHelper;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
+
+/**
+ * A hub-coin cruncher class
+ *
+ * @author Roland Haeder <webmaster@shipsimu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2011 - 2014 - 2018 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.shipsimu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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 HubOpenSslCruncher extends BaseHubCruncher implements CruncherHelper, Registerable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+
+ // Set version number
+ $this->setVersion('0.0.0');
+ }
+
+ /**
+ * Creates an instance of this hub-cruncher class
+ *
+ * @return $cruncherInstance An instance of this hub-cruncher class
+ */
+ public final static function createHubOpenSslCruncher () {
+ // Get a new instance
+ $cruncherInstance = new HubOpenSslCruncher();
+
+ // Return the instance
+ return $cruncherInstance;
+ }
+
+ /**
+ * This method fills the in-buffer with (a) test unit(s) which are mainly
+ * used for development of the crunching part. They must be enabled in
+ * configuration, or else your cruncher runs out of WUs and waits for more
+ * to show up.
+ *
+ * In this method we already know that the in-buffer is going depleted so
+ * no need to double-check it here.
+ *
+ * @return void
+ */
+ protected function fillInBufferQueueWithTestUnits () {
+ // Are test units enabled?
+ if ($this->getConfigInstance()->getConfigEntry('cruncher_test_units_enabled') == 'N') {
+ // They are disabled, so skip any further steps
+ return;
+ } elseif ($this->getStateInstance()->isCruncherStateVirgin()) {
+ // No virgin crunchers please, because they usually have no test units ready for crunching
+ return;
+ }
+
+ // Get a test-unit generator instance
+ $generatorInstance = ObjectFactory::createObjectByConfiguredName('cruncher_test_unit_generator_class');
+
+ // We don't need an iterator here because we just need to generate some test units
+ for ($idx = 0; $idx < $this->getConfigInstance()->getConfigEntry('cruncher_max_text_unit_amount'); $idx++) {
+ // Get a test unit from it
+ $unitInstance = $generatorInstance->generateNextUnitInstance();
+
+ // ... and finally queue it to the in-buffer queue
+ $this->queueUnitInstanceToInBuffer($unitInstance);
+ } // END - for
+ }
+
+ /**
+ * This method fills the in-buffer with (real) WUs which will be crunched
+ * and the result be sent back to the key producer instance.
+ *
+ * @return void
+ */
+ protected function fillInBufferQueueWithWorkUnits () {
+ // This cruncher's state must not be one of these: 'virgin'
+ if ($this->getStateInstance()->isCruncherStateVirgin()) {
+ // We can silently skip here, until the generation is finished
+ return;
+ } // END - if
+
+ // @TODO Implement this method
+ $this->partialStub('Please implement this method.');
+ }
+
+ /**
+ * Method to "bootstrap" the cruncher. This step does also apply provided
+ * command-line arguments stored in the request instance. No buffer queue
+ * will be initialized here, we only do "general" things here.
+ *
+ * @return void
+ * @todo Implement this method
+ */
+ public function doBootstrapping () {
+ $this->partialStub('Please implement this method.');
+ }
+
+ /**
+ * Outputs the console teaser. This should only be executed on startup or
+ * full restarts. This method generates some space around the teaser.
+ *
+ * @return void
+ */
+ public function outputConsoleTeaser () {
+ // Output all lines
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(' ');
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('OpenSSL Cruncher v' . $this->getVersion() . ' is starting ...');
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Copyright (c) 2011 - 2014 - 2018 Hub Developer Team');
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(' ');
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('This program comes with ABSOLUTELY NO WARRANTY; for details see docs/COPYING.');
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('This is free software, and you are welcome to redistribute it under certain');
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('conditions; see docs/COPYING for details.');
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(' ');
+ }
+
+ /**
+ * Add some cruncher-specific filters
+ *
+ * @param $controllerInstance An object of a Controller instance
+ * @param $responseInstance An object of a Responseable instance
+ * @return void
+ * @todo 0% done
+ */
+ public function addExtraFilters (Controller $controllerInstance, Responseable $responseInstance) {
+ // Add some filters here
+ $this->partialStub('Please add some cruncher-specific filters, if required.');
+ }
+
+}
// Import application-specific stuff
use Org\Shipsimu\Hub\Database\Frontend\BaseHubDatabaseWrapper;
+use Org\Shipsimu\Hub\Database\Frontend\Unit\UnitDatabaseWrapper;
+use Org\Shipsimu\Hub\Producer\Cruncher\Unit\BaseUnitProducer;
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
// Own namespace
namespace Org\Shipsimu\Hub\Discovery\Recipient;
-// Import framework-specific stuff
+// Import framework stuff
use Org\Shipsimu\Hub\Discovery\Node\BaseNodeDiscovery;
use Org\Shipsimu\Hub\Discovery\Recipient\DiscoverableRecipient;
use Org\Shipsimu\Hub\Factory\Lists\Recipient\RecipientListFactory;
<?php
// Own namespace
-namespace Org\Shipsimu\Hub\Crawler\Source\Unit;
+namespace Org\Shipsimu\Hub\Factory\Crawler\Source\Unit;
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
* given cruncher instance.
*
* @param $stateName Name of the state
- * @param $cruncherInstance A CruncherHelper class instance
* @return $stateInstance A Stateable class instance
*/
public static final function createCruncherStateInstanceByName ($stateName) {
// Then construct the class' configuraton entry
- $className = 'cruncher_' . $stateName . '_state_class';
+ $className = sprintf('cruncher_%s_state_class', $stateName);
// Get cruncher instance from registry
$cruncherInstance = GenericRegistry::getRegistry()->getInstance('cruncher');
// Own namespace
namespace Org\Shipsimu\Hub\Filter\Bootstrap\Cruncher\Queue;
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Cruncher\Filter\BaseCruncherFilter;
+
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
// Own namespace
namespace Org\Shipsimu\Hub\Filter\Bootstrap\Cruncher\Extra;
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Cruncher\Filter\BaseCruncherFilter;
+
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
// Own namespace
namespace Org\Shipsimu\Hub\Filter\Bootstrap\Cruncher\Activation;
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Cruncher\Filter\BaseCruncherFilter;
+
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
// Own namespace
namespace Org\Shipsimu\Hub\Cruncher\Filter\Initialization;
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Cruncher\Filter\BaseCruncherFilter;
+
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
use Org\Mxchange\CoreFramework\Filter\Filterable;
}
// Now convert the cruncher-mode in a class name
- $className = 'Hub' . self::convertToClassName($cruncherMode) . 'Cruncher';
+ $configEntry = sprintf('hub_%s_cruncher_mode_class', $cruncherMode);
// And try to instance it
try {
// Get an instance
- $cruncherInstance = ObjectFactory::createObjectByName($className);
+ $cruncherInstance = ObjectFactory::createObjectByConfiguredName($configEntry);
// Get a registry
$applicationInstance = GenericRegistry::getRegistry()->getInstance('application');
// Own namespace
namespace Org\Shipsimu\Hub\Cruncher\Filter\Requirements;
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Cruncher\Filter\BaseCruncherFilter;
+
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
use Org\Mxchange\CoreFramework\Request\Requestable;
// Own namespace
namespace Org\Shipsimu\Hub\Cruncher\Filter\WelcomeTeaser;
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Cruncher\Filter\BaseCruncherFilter;
+
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
// Own namespace
namespace Org\Shipsimu\Hub\Filter\Shutdown\Cruncher;
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Cruncher\Filter\BaseCruncherFilter;
+
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
// Own namespace
namespace Org\Shipsimu\Hub\Filter\Initializer\Cruncher\Handler\Task;
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Cruncher\Filter\BaseCruncherFilter;
+
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
use Org\Mxchange\CoreFramework\Filter\Filterable;
// Own namespace
namespace Org\Shipsimu\Hub\Handler\Status\Answer;
-// Import framework-specific stuff
+// Import framework stuff
use Org\Shipsimu\Hub\Handler\Data\BaseDataHandler;
/**
namespace Org\Shipsimu\Hub\Helper\Crypto\Message\RandomUnit;
// Import application-specific stuff
-use Org\Shipsimu\Hub\Factory\Source\Unit\UnitSourceFactory;
+use Org\Shipsimu\Hub\Factory\Crawler\Source\Unit\UnitSourceFactory;
+use Org\Shipsimu\Hub\Helper\Message\BaseMessageHelper;
+use Org\Shipsimu\Hub\Helper\Message\MessageHelper;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
/**
* A CryptoRandom message helper
* Creates an instance of this class
*
* @param $sourceType Type of the source
- * @return $messageInstance An instance of a UnitHelper class
+ * @return $messageInstance An instance of a MessageHelper class
*/
public final static function createCryptoRandomUnitMessageHelper ($sourceType) {
// Get new instance
<?php
+// Own namespace
+namespace Org\Shipsimu\Hub\Cruncher\Helper\WorkUnit\Test;
+
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Helper\Unit\UnitHelper;
+use Org\Shipsimu\Hub\Helper\WorkUnit\BaseWorkUnitHelper;
+
/**
* A test unit helper for cruncher
*
<?php
// Own namespace
-namespace Org\Shipsimu\Hub\Iterator\Producer\TestUnitKey;
+namespace Org\Shipsimu\Hub\Iterator\Producer\Key\TestUnit;
// Import framework stuff
use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
use Org\Mxchange\CoreFramework\Response\Responseable;
/**
- * A hub-mcrypt miner class
+ * A hub-coin miner class
*
* @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
// Initialize all producers
$this->initProducer();
- // Get miner instance
- $minerInstance = GenericRegistry::getRegistry()->getInstance('miner');
-
- // Change state to next state
- $minerInstance->blockProducerHasInitialized($this);
-
// Initialize work queue (out-going, produced items)
$this->initWorkQueue();
}
--- /dev/null
+<?php
+// Own namespace
+namespace Org\Shipsimu\Hub\Producer\Cruncher;
+
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Producer\BaseProducer;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+
+/**
+ * A generic cruncher producer class
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2018 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+abstract class BaseCruncherProducer extends BaseProducer {
+ /**
+ * Protected constructor
+ *
+ * @param $className Complete class name
+ * @return void
+ */
+ protected function __construct ($className) {
+ // Call parent constructor
+ parent::__construct($className);
+
+ // Get cruncher instance
+ $cruncherInstance = GenericRegistry::getRegistry()->getInstance('cruncher');
+
+ // Change state to next state
+ $cruncherInstance->blockProducerHasInitialized($this);
+ }
+
+}
+++ /dev/null
-<?php
-// Own namespace
-namespace Org\Shipsimu\Hub\Producer\Key;
-
-// Import application-specific stuff
-use Org\Shipsimu\Hub\Producer\BaseProducer;
-
-/**
- * A general KeyProducer class
- *
- * @author Roland Haeder <webmaster@shipsimu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2018 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.shipsimu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-abstract class BaseKeyProducer extends BaseProducer {
- /**
- * Protected constructor
- *
- * @param $className Name of the class
- * @return void
- */
- protected function __construct ($className) {
- // Call parent constructor
- parent::__construct($className);
-
- // Init key producer
- }
-
-}
+++ /dev/null
-<?php
-// Own namespace
-namespace Org\Shipsimu\Hub\Producer\Unit;
-
-// Import application-specific stuff
-use Org\Shipsimu\Hub\Producer\BaseProducer;
-
-/**
- * A general UnitProducer class
- *
- * @author Roland Haeder <webmaster@shipsimu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2018 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.shipsimu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-abstract class BaseUnitProducer extends BaseProducer {
- /**
- * Work/test unit status
- */
- const UNIT_STATUS_AVAILABLE = 'available'; // Available for crunching
- const UNIT_STATUS_PENDING = 'pending'; // Is being crunched at the moment
- const UNIT_STATUS_DONE = 'done'; // Is already crunched/finished
-
- /**
- * Work or test unit?
- */
- const UNIT_TYPE_TEST_UNIT = 'test_unit';
- const UNIT_TYPE_TEST_WORK = 'work_unit';
-
- /**
- * Protected constructor
- *
- * @param $className Name of the class
- * @return void
- */
- protected function __construct ($className) {
- // Call parent constructor
- parent::__construct($className);
- }
-
-}
--- /dev/null
+<?php
+// Own namespace
+namespace Org\Shipsimu\Hub\Producer\Cruncher\Key;
+
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Producer\Cruncher\BaseCruncherProducer;
+
+/**
+ * A general KeyProducer class
+ *
+ * @author Roland Haeder <webmaster@shipsimu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2018 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.shipsimu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+abstract class BaseKeyProducer extends BaseCruncherProducer {
+ /**
+ * Protected constructor
+ *
+ * @param $className Name of the class
+ * @return void
+ */
+ protected function __construct ($className) {
+ // Call parent constructor
+ parent::__construct($className);
+
+ // Init key producer
+ }
+
+}
+++ /dev/null
-<?php
-// Own namespace
-namespace Org\Shipsimu\Hub\Producer\Cruncher\Key;
-
-// Import application-specific stuff
-use Org\Shipsimu\Hub\Producer\BaseProducer;
-
-// Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\Registerable;
-use Org\Mxchange\CoreFramework\State\Stateable;
-
-/**
- * A CruncherKey producer class
- *
- * @author Roland Haeder <webmaster@shipsimu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2011 - 2014 - 2018 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.shipsimu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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 CruncherKeyProducer extends BaseKeyProducer implements KeyProducer, Registerable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this class
- *
- * @return $producerInstance An instance of a Producer class
- */
- public final static function createCruncherKeyProducer () {
- // Get new instance
- $producerInstance = new CruncherKeyProducer();
-
- // Get a helper instance, we now only need this for the key iterator
- $helperInstance = ObjectFactory::createObjectByConfiguredName('crypto_random_message_helper_class', array('test'));
-
- // Next get an iterator, again the helper will do that for us
- $iteratorInstance = $helperInstance->getKeyIterator();
-
- // Set it in the producer
- $producerInstance->setIteratorInstance($iteratorInstance);
-
- // Return the prepared instance
- return $producerInstance;
- }
-
- /**
- * Initializes the producer. This method satisfies the abstract BaseProducer
- * class.
- *
- * @return void
- * @todo Find something for init phase of this key producer
- */
- protected function initProducer () {
- }
-
- /**
- * Initializes the executor, whatever it does.
- *
- * @return void
- * @todo 0% done
- */
- public function initExecutor (Stateable $stateInstance) {
- $this->partialStub('Maybe implement this method?');
- }
-
- /**
- * Produces some keys and pushes them onto the queue
- *
- * @param $stateInstance An instance of a Stateable instance
- * @return void
- * @todo ~30% done
- */
- public function produceKeys (Stateable $stateInstance) {
- // Is this cruncher virgin?
- if (!$stateInstance->isCruncherStateVirgin()) {
- // This cruncher is not virgin, so skip it
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PRODUCER: The cruncher is not virgin. stateInstance=' . $stateInstance->__toString() . '');
- return;
- } elseif (!$this->getIteratorInstance()->valid()) {
- // This producer's iterator has finished its assignment
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PRODUCER: Finished creating keys. iteratorInstance=' . $this->getIteratorInstance()->__toString() . '');
- return;
- }
-
- /*
- * Now we need to create an iterator, just as for the work units,
- * to create new keys from the encrypted message. The iterator will
- * not iterate over an object nor a collection. It will instead
- * encapsulate the "key production" into a class and not in a simple
- * for() loop. These keys then needs to be bundled into test units
- * and stored to database for later re-usage.
- */
-
- /*
- * Get current key (which is not the key of the iterator) This is always
- * an ASCII string.
- */
- $currentKey = $this->getIteratorInstance()->current();
-
- // Add it to the out-going work queue
- $this->addValueToOutgoingQueue($currentKey);
-
- // Is the per-work unit limit reached?
- if ($this->isOutgoingQueueLimitReached('cruncher_per_unit_key_limit')) {
- // @TODO Send the produced key bundle to the unit producer's input queue
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('currentKey(b64)="' . base64_encode($currentKey) . '" needs to be processed.');
-
- // At last re-init the stack
- $this->initOutgoingQueue();
- } // END - if
-
- // Continue with next one
- $this->getIteratorInstance()->next();
- }
-}
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+// Own namespace
+namespace Org\Shipsimu\Hub\Producer\Cruncher\Key;
+
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Producer\BaseProducer;
+use Org\Shipsimu\Hub\Producer\Key\KeyProducer;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\State\Stateable;
+
+/**
+ * A CruncherKey producer class
+ *
+ * @author Roland Haeder <webmaster@shipsimu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2011 - 2014 - 2018 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.shipsimu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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 CruncherKeyProducer extends BaseKeyProducer implements KeyProducer, Registerable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this class
+ *
+ * @return $producerInstance An instance of a Producer class
+ */
+ public final static function createCruncherKeyProducer () {
+ // Get new instance
+ $producerInstance = new CruncherKeyProducer();
+
+ // Get a helper instance, we now only need this for the key iterator
+ $helperInstance = ObjectFactory::createObjectByConfiguredName('crypto_random_message_helper_class', array('test'));
+
+ // Next get an iterator, again the helper will do that for us
+ $iteratorInstance = $helperInstance->getKeyIterator();
+
+ // Set it in the producer
+ $producerInstance->setIteratorInstance($iteratorInstance);
+
+ // Return the prepared instance
+ return $producerInstance;
+ }
+
+ /**
+ * Initializes the producer. This method satisfies the abstract BaseProducer
+ * class.
+ *
+ * @return void
+ * @todo Find something for init phase of this key producer
+ */
+ protected function initProducer () {
+ $this->partialStub('Maybe add something here?');
+ }
+
+ /**
+ * Initializes the executor, whatever it does.
+ *
+ * @return void
+ * @todo 0% done
+ */
+ public function initExecutor (Stateable $stateInstance) {
+ $this->partialStub('Maybe implement this method?');
+ }
+
+ /**
+ * Produces some keys and pushes them onto the queue
+ *
+ * @param $stateInstance An instance of a Stateable instance
+ * @return void
+ * @todo ~30% done
+ */
+ public function produceKeys (Stateable $stateInstance) {
+ // Is this cruncher virgin?
+ if (!$stateInstance->isCruncherStateVirgin()) {
+ // This cruncher is not virgin, so skip it
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PRODUCER: The cruncher is not virgin. stateInstance=' . $stateInstance->__toString() . '');
+ return;
+ } elseif (!$this->getIteratorInstance()->valid()) {
+ // This producer's iterator has finished its assignment
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PRODUCER: Finished creating keys. iteratorInstance=' . $this->getIteratorInstance()->__toString() . '');
+ return;
+ }
+
+ /*
+ * Now we need to create an iterator, just as for the work units,
+ * to create new keys from the encrypted message. The iterator will
+ * not iterate over an object nor a collection. It will instead
+ * encapsulate the "key production" into a class and not in a simple
+ * for() loop. These keys then needs to be bundled into test units
+ * and stored to database for later re-usage.
+ */
+
+ /*
+ * Get current key (which is not the key of the iterator) This is always
+ * an ASCII string.
+ */
+ $currentKey = $this->getIteratorInstance()->current();
+
+ // Add it to the out-going work queue
+ $this->addValueToOutgoingQueue($currentKey);
+
+ // Is the per-work unit limit reached?
+ if ($this->isOutgoingQueueLimitReached('cruncher_per_unit_key_limit')) {
+ // @TODO Send the produced key bundle to the unit producer's input queue
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('currentKey(b64)="' . base64_encode($currentKey) . '" needs to be processed.');
+
+ // At last re-init the stack
+ $this->initOutgoingQueue();
+ } // END - if
+
+ // Continue with next one
+ $this->getIteratorInstance()->next();
+ }
+}
--- /dev/null
+<?php
+// Own namespace
+namespace Org\Shipsimu\Hub\Producer\Cruncher\Unit;
+
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Producer\Cruncher\BaseCruncherProducer;
+
+/**
+ * A general UnitProducer class
+ *
+ * @author Roland Haeder <webmaster@shipsimu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2018 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.shipsimu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+abstract class BaseUnitProducer extends BaseCruncherProducer {
+ /**
+ * Work/test unit status
+ */
+ const UNIT_STATUS_AVAILABLE = 'available'; // Available for crunching
+ const UNIT_STATUS_PENDING = 'pending'; // Is being crunched at the moment
+ const UNIT_STATUS_DONE = 'done'; // Is already crunched/finished
+
+ /**
+ * Work or test unit?
+ */
+ const UNIT_TYPE_TEST_UNIT = 'test_unit';
+ const UNIT_TYPE_TEST_WORK = 'work_unit';
+
+ /**
+ * Protected constructor
+ *
+ * @param $className Name of the class
+ * @return void
+ */
+ protected function __construct ($className) {
+ // Call parent constructor
+ parent::__construct($className);
+ }
+
+}
+++ /dev/null
-<?php
-// Own namespace
-namespace Org\Shipsimu\Hub\Cruncher\Producer\Unit;
-
-// Import application-specific stuff
-use Org\Shipsimu\Hub\Producer\BaseProducer;
-
-// Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
-use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
-use Org\Mxchange\CoreFramework\Registry\Registerable;
-use Org\Mxchange\CoreFramework\State\Stateable;
-
-/**
- * A CruncherTestUnit producer class
- *
- * @author Roland Haeder <webmaster@shipsimu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2011 - 2014 - 2018 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.shipsimu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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 CruncherTestUnitProducer extends BaseUnitProducer implements UnitProducer, Registerable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this class
- *
- * @return $producerInstance An instance of a Producer class
- */
- public final static function createCruncherTestUnitProducer () {
- // Get new instance
- $producerInstance = new CruncherTestUnitProducer();
-
- // Test units have a helper class that wraps the source
- $helperInstance = ObjectFactory::createObjectByConfiguredName('crypto_random_message_helper_class', array('test'));
-
- // So set it in the producer
- $producerInstance->setHelperInstance($helperInstance);
-
- // Return the prepared instance
- return $producerInstance;
- }
-
- /**
- * Initializes the producer. This method satisfies the abstract BaseProducer
- * class.
- *
- * @return void
- */
- protected function initProducer () {
- // Get a XML template instance
- $templateInstance = XmlTemplateEngineFactory::createXmlTemplateEngineInstance('cruncher_test_unit_producer_template_class');
-
- // Load the template
- $templateInstance->loadXmlTemplate();
-
- // Render the XML content
- $templateInstance->renderXmlContent();
-
- // And set it in this cruncher
- $this->setTemplateInstance($templateInstance);
- }
-
- /**
- * Prepares the produces of some test units and pushes them onto the queue
- *
- * @param $stateInstance An instance of a Stateable instance
- * @return void
- * @todo ~60% done
- */
- public function initUnitProduction (Stateable $stateInstance) {
- // First get a database wrapper because we want to permanently store test units
- $wrapperInstance = DatabaseWrapperFactory::createWrapperByConfiguredName('cruncher_unit_db_wrapper_class');
-
- // Do we have some entries?
- if ($wrapperInstance->isTestUnitProduced()) {
- // Entries found
- // @TODO Unfinished work here
- $this->debugInstance(sprintf('[%s:%d]: stateInstance=%s - Unfinished!', __METHOD__, __LINE__, $stateInstance->__toString()));
-
- // The state must be changed because ...
- $stateInstance->someFooStateChange();
- } else {
- // Get an encrypted, random message from our source
- $encryptedMessage = $this->getHelperInstance()->generateRandomMessage();
-
- // Debug message
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PRODUCER: An encrypted, random message has been generated. Generating keys ...');
-
- // Set the encrypted message in the template instance
- $this->getTemplateInstance()->assignVariable('encrypted_message', $encryptedMessage);
-
- // The state must be changed because we have a new message
- $stateInstance->encryptedMessageGenerated();
- }
- }
-
- /**
- * Initializes the executor, whatever it does.
- *
- * @return void
- * @todo Maybe unfinished
- */
- public function initExecutor (Stateable $stateInstance) {
- $this->partialStub('Maybe implement this method?');
- }
-}
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+// Own namespace
+namespace Org\Shipsimu\Hub\Cruncher\Producer\Cruncher\Unit;
+
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Producer\Cruncher\Unit\BaseUnitProducer;
+use Org\Shipsimu\Hub\Producer\Unit\UnitProducer;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\State\Stateable;
+
+/**
+ * A CruncherTestUnit producer class
+ *
+ * @author Roland Haeder <webmaster@shipsimu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2011 - 2014 - 2018 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.shipsimu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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 CruncherTestUnitProducer extends BaseUnitProducer implements UnitProducer, Registerable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this class
+ *
+ * @return $producerInstance An instance of a Producer class
+ */
+ public final static function createCruncherTestUnitProducer () {
+ // Get new instance
+ $producerInstance = new CruncherTestUnitProducer();
+
+ // Test units have a helper class that wraps the source
+ $helperInstance = ObjectFactory::createObjectByConfiguredName('crypto_random_message_helper_class', array('test'));
+
+ // So set it in the producer
+ $producerInstance->setHelperInstance($helperInstance);
+
+ // Return the prepared instance
+ return $producerInstance;
+ }
+
+ /**
+ * Initializes the producer. This method satisfies the abstract BaseProducer
+ * class.
+ *
+ * @return void
+ */
+ protected function initProducer () {
+ // Get a XML template instance
+ $templateInstance = XmlTemplateEngineFactory::createXmlTemplateEngineInstance('cruncher_test_unit_producer_template_class');
+
+ // Load the template
+ $templateInstance->loadXmlTemplate();
+
+ // Render the XML content
+ $templateInstance->renderXmlContent();
+
+ // And set it in this cruncher
+ $this->setTemplateInstance($templateInstance);
+ }
+
+ /**
+ * Prepares the produces of some test units and pushes them onto the queue
+ *
+ * @param $stateInstance An instance of a Stateable instance
+ * @return void
+ * @todo ~60% done
+ */
+ public function initUnitProduction (Stateable $stateInstance) {
+ // First get a database wrapper because we want to permanently store test units
+ $wrapperInstance = DatabaseWrapperFactory::createWrapperByConfiguredName('cruncher_unit_db_wrapper_class');
+
+ // Do we have some entries?
+ if ($wrapperInstance->isTestUnitProduced()) {
+ // Entries found
+ // @TODO Unfinished work here
+ $this->debugInstance(sprintf('[%s:%d]: stateInstance=%s - Unfinished!', __METHOD__, __LINE__, $stateInstance->__toString()));
+
+ // The state must be changed because ...
+ $stateInstance->someFooStateChange();
+ } else {
+ // Get an encrypted, random message from our source
+ $encryptedMessage = $this->getHelperInstance()->generateRandomMessage();
+
+ // Debug message
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PRODUCER: An encrypted, random message has been generated. Generating keys ...');
+
+ // Set the encrypted message in the template instance
+ $this->getTemplateInstance()->assignVariable('encrypted_message', $encryptedMessage);
+
+ // The state must be changed because we have a new message
+ $stateInstance->encryptedMessageGenerated();
+ }
+ }
+
+ /**
+ * Initializes the executor, whatever it does.
+ *
+ * @return void
+ * @todo Maybe unfinished
+ */
+ public function initExecutor (Stateable $stateInstance) {
+ $this->partialStub('Maybe implement this method?');
+ }
+}
--- /dev/null
+<?php
+// Own namespace
+namespace Org\Shipsimu\Hub\Producer\Miner\Block;
+
+// Import application-specific stuff
+
+/**
+ * A general BlockProducer class
+ *
+ * @author Roland Haeder <webmaster@shipsimu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2014 - 2018 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.shipsimu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+abstract class BaseBlockProducer extends BaseMinerProducer {
+ /**
+ * Block status
+ */
+
+ /**
+ * Protected constructor
+ *
+ * @param $className Name of the class
+ * @return void
+ */
+ protected function __construct ($className) {
+ // Call parent constructor
+ parent::__construct($className);
+ }
+
+}
+++ /dev/null
-<?php
-// Own namespace
-namespace Org\Shipsimu\Hub\Miner\Producer\Block\Genesis;
-
-// Import application-specific stuff
-use Org\Shipsimu\Hub\Producer\BaseProducer;
-use Org\Shipsimu\Hub\Producer\Block\BaseBlockProducer;
-use Org\Shipsimu\Hub\Producer\Block\BlockProducer;
-
-// Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\Registerable;
-use Org\Mxchange\CoreFramework\State\Stateable;
-
-/**
- * A MinerRealGenesisBlock producer class
- *
- * @author Roland Haeder <webmaster@shipsimu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2011 - 2014 - 2018 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.shipsimu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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 MinerRealGenesisBlockProducer extends BaseBlockProducer implements BlockProducer, Registerable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this class
- *
- * @return $producerInstance An instance of a Producer class
- */
- public final static function createMinerRealGenesisBlockProducer () {
- // Get new instance
- $producerInstance = new MinerRealGenesisBlockProducer();
-
- // Get a (minable) hash block instance
- $minableInstance = ObjectFactory::createObjectByConfiguredName('miner_real_hash_block_class');
-
- // Set it here
- $producerInstance->setMinableInstance($minableInstance);
-
- // Return the prepared instance
- return $producerInstance;
- }
-
- /**
- * Initializes the producer. This method satisfies the abstract BaseProducer
- * class.
- *
- * @return void
- * @todo 0% done
- */
- protected function initProducer () {
- $this->partialStub('Please implement this method.');
- }
-
- /**
- * Initializes the executor, whatever it does.
- *
- * @return void
- * @todo 0% done
- */
- public function initExecutor (Stateable $stateInstance) {
- $this->partialStub('Please implement this method.');
- }
-
- /**
- * Prepares the produces of some test units and pushes them onto the queue
- *
- * @param $stateInstance An instance of a Stateable instance
- * @return void
- * @todo ~5% done
- */
- public function prepareBlockProduction (Stateable $stateInstance) {
- // The state must be 'booting'
- $stateInstance->validateMinerStateIsBooting();
-
- /*
- * Now that the miner is booting a genesis block for real mining can be
- * created.
- */
- }
-}
-
-// [EOF]
-?>
+++ /dev/null
-<?php
-// Own namespace
-namespace Org\Shipsimu\Hub\miner\Producer\Block\Genesis;
-
-// Import application-specific stuff
-use Org\Shipsimu\Hub\Producer\BaseProducer;
-use Org\Shipsimu\Hub\Producer\Block\BaseBlockProducer;
-use Org\Shipsimu\Hub\Producer\Block\BlockProducer;
-
-// Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\Registerable;
-use Org\Mxchange\CoreFramework\State\Stateable;
-
-/**
- * A MinerTestGenesisBlock producer class
- *
- * @author Roland Haeder <webmaster@shipsimu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2011 - 2014 - 2018 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.shipsimu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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 MinerTestGenesisBlockProducer extends BaseBlockProducer implements BlockProducer, Registerable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this class
- *
- * @return $producerInstance An instance of a Producer class
- */
- public final static function createMinerTestGenesisBlockProducer () {
- // Get new instance
- $producerInstance = new MinerTestGenesisBlockProducer();
-
- // Get a (minable) hash block instance
- $minableInstance = ObjectFactory::createObjectByConfiguredName('miner_test_hash_block_class');
-
- // Set it here
- $producerInstance->setMinableInstance($minableInstance);
-
- // Return the prepared instance
- return $producerInstance;
- }
-
- /**
- * Initializes the producer. This method satisfies the abstract BaseProducer
- * class.
- *
- * @return void
- * @todo 0% done
- */
- protected function initProducer () {
- $this->partialStub('Please implement this method.');
- }
-
- /**
- * Initializes the executor, whatever it does.
- *
- * @return void
- * @todo 0% done
- */
- public function initExecutor (Stateable $stateInstance) {
- $this->partialStub('Please implement this method.');
- }
-
- /**
- * Prepares the produces of some test units and pushes them onto the queue
- *
- * @param $stateInstance An instance of a Stateable instance
- * @return void
- * @todo ~5% done
- */
- public function prepareBlockProduction (Stateable $stateInstance) {
- // The state must be 'booting'
- $stateInstance->validateMinerStateIsBooting();
-
- /*
- * Now that the miner is booting a "genesis" block for testing purposes
- * can be created. The real "genesis" block will be created differently
- * to this.
- */
- }
-
-}
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+// Own namespace
+namespace Org\Shipsimu\Hub\Miner\Producer\Miner\Block\Genesis;
+
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Producer\BaseProducer;
+use Org\Shipsimu\Hub\Producer\Block\BaseBlockProducer;
+use Org\Shipsimu\Hub\Producer\Block\BlockProducer;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\State\Stateable;
+
+/**
+ * A MinerRealGenesisBlock producer class
+ *
+ * @author Roland Haeder <webmaster@shipsimu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2011 - 2014 - 2018 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.shipsimu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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 MinerRealGenesisBlockProducer extends BaseBlockProducer implements BlockProducer, Registerable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this class
+ *
+ * @return $producerInstance An instance of a Producer class
+ */
+ public final static function createMinerRealGenesisBlockProducer () {
+ // Get new instance
+ $producerInstance = new MinerRealGenesisBlockProducer();
+
+ // Get a (minable) hash block instance
+ $minableInstance = ObjectFactory::createObjectByConfiguredName('miner_real_hash_block_class');
+
+ // Set it here
+ $producerInstance->setMinableInstance($minableInstance);
+
+ // Return the prepared instance
+ return $producerInstance;
+ }
+
+ /**
+ * Initializes the producer. This method satisfies the abstract BaseProducer
+ * class.
+ *
+ * @return void
+ * @todo 0% done
+ */
+ protected function initProducer () {
+ $this->partialStub('Please implement this method.');
+ }
+
+ /**
+ * Initializes the executor, whatever it does.
+ *
+ * @return void
+ * @todo 0% done
+ */
+ public function initExecutor (Stateable $stateInstance) {
+ $this->partialStub('Please implement this method.');
+ }
+
+ /**
+ * Prepares the produces of some test units and pushes them onto the queue
+ *
+ * @param $stateInstance An instance of a Stateable instance
+ * @return void
+ * @todo ~5% done
+ */
+ public function prepareBlockProduction (Stateable $stateInstance) {
+ // The state must be 'booting'
+ $stateInstance->validateMinerStateIsBooting();
+
+ /*
+ * Now that the miner is booting a genesis block for real mining can be
+ * created.
+ */
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+// Own namespace
+namespace Org\Shipsimu\Hub\miner\Producer\Miner\Block\Genesis;
+
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Producer\BaseProducer;
+use Org\Shipsimu\Hub\Producer\Block\BaseBlockProducer;
+use Org\Shipsimu\Hub\Producer\Block\BlockProducer;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\State\Stateable;
+
+/**
+ * A MinerTestGenesisBlock producer class
+ *
+ * @author Roland Haeder <webmaster@shipsimu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2011 - 2014 - 2018 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.shipsimu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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 MinerTestGenesisBlockProducer extends BaseBlockProducer implements BlockProducer, Registerable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this class
+ *
+ * @return $producerInstance An instance of a Producer class
+ */
+ public final static function createMinerTestGenesisBlockProducer () {
+ // Get new instance
+ $producerInstance = new MinerTestGenesisBlockProducer();
+
+ // Get a (minable) hash block instance
+ $minableInstance = ObjectFactory::createObjectByConfiguredName('miner_test_hash_block_class');
+
+ // Set it here
+ $producerInstance->setMinableInstance($minableInstance);
+
+ // Return the prepared instance
+ return $producerInstance;
+ }
+
+ /**
+ * Initializes the producer. This method satisfies the abstract BaseProducer
+ * class.
+ *
+ * @return void
+ * @todo 0% done
+ */
+ protected function initProducer () {
+ $this->partialStub('Please implement this method.');
+ }
+
+ /**
+ * Initializes the executor, whatever it does.
+ *
+ * @return void
+ * @todo 0% done
+ */
+ public function initExecutor (Stateable $stateInstance) {
+ $this->partialStub('Please implement this method.');
+ }
+
+ /**
+ * Prepares the produces of some test units and pushes them onto the queue
+ *
+ * @param $stateInstance An instance of a Stateable instance
+ * @return void
+ * @todo ~5% done
+ */
+ public function prepareBlockProduction (Stateable $stateInstance) {
+ // The state must be 'booting'
+ $stateInstance->validateMinerStateIsBooting();
+
+ /*
+ * Now that the miner is booting a "genesis" block for testing purposes
+ * can be created. The real "genesis" block will be created differently
+ * to this.
+ */
+ }
+
+}
+++ /dev/null
-<?php
-// Own namespace
-namespace Org\Shipsimu\Hub\Producer\Block;
-
-// Import application-specific stuff
-use Org\Shipsimu\Hub\Producer\BaseProducer;
-
-/**
- * A general BlockProducer class
- *
- * @author Roland Haeder <webmaster@shipsimu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2014 - 2018 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.shipsimu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-abstract class BaseBlockProducer extends BaseProducer {
- /**
- * Block status
- */
-
- /**
- * Protected constructor
- *
- * @param $className Name of the class
- * @return void
- */
- protected function __construct ($className) {
- // Call parent constructor
- parent::__construct($className);
- }
-
-}
--- /dev/null
+<?php
+// Own namespace
+namespace Org\Shipsimu\Hub\Producer\Miner;
+
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Producer\BaseProducer;
+
+/**
+ * A generic miner producer class
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2018 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+abstract class BaseMinerProducer extends BaseProducer {
+ /**
+ * Protected constructor
+ *
+ * @param $className Complete class name
+ * @return void
+ */
+ protected function __construct ($className) {
+ // Call parent constructor
+ parent::__construct($className);
+
+ // Get miner instance
+ $minerInstance = GenericRegistry::getRegistry()->getInstance('miner');
+
+ // Change state to next state
+ $minerInstance->blockProducerHasInitialized($this);
+ }
+
+}
<?php
// Own namespace
-namespace Org\Shipsimu\Hub\State\Cruncher;
+namespace Org\Shipsimu\Hub\Cruncher\State\Initialization;
+
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Cruncher\State\BaseCruncherState;
+use Org\Shipsimu\Hub\Factory\State\Cruncher\CruncherStateFactory;
// Import framework stuff
use Org\Mxchange\CoreFramework\Executor\Executor;
<?php
// Own namespace
-namespace Org\Shipsimu\Hub\State\Cruncher;
+namespace Org\Shipsimu\Hub\Cruncher\State\Virgin;
+
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Cruncher\State\BaseCruncherState;
// Import framework stuff
use Org\Mxchange\CoreFramework\Executor\Executor;
$cfg->setConfigEntry('task_miner_block_fetcher_max_runs', 0);
// CFG: MINER-TEST-GENESIS-BLOCK-PRODUCER-TASK-CLASS
-$cfg->setConfigEntry('miner_test_genesis_block_producer_task_class', 'Org\Shipsimu\Hub\Miner\Task\Producer\Block\Genesis\MinerTestGenesisBlockProducerTask');
+$cfg->setConfigEntry('miner_test_genesis_block_producer_task_class', 'Org\Shipsimu\Hub\Miner\Task\Producer\Miner\Block\Genesis\MinerTestGenesisBlockProducerTask');
// CFG: TASK-MINER-TEST-GENESIS-BLOCK-PRODUCER-STARTUP-DELAY
$cfg->setConfigEntry('task_miner_test_genesis_block_producer_startup_delay', 1000);
$cfg->setConfigEntry('task_miner_test_genesis_block_producer_max_runs', 0);
// CFG: MINER-REAL-GENESIS-BLOCK-PRODUCER-TASK-CLASS
-$cfg->setConfigEntry('miner_real_genesis_block_producer_task_class', 'Org\Shipsimu\Hub\Miner\Task\Producer\Block\Genesis\MinerRealGenesisBlockProducerTask');
+$cfg->setConfigEntry('miner_real_genesis_block_producer_task_class', 'Org\Shipsimu\Hub\Miner\Task\Producer\Miner\Block\Genesis\MinerRealGenesisBlockProducerTask');
// CFG: TASK-MINER-REAL-GENESIS-BLOCK-PRODUCER-STARTUP-DELAY
$cfg->setConfigEntry('task_miner_real_genesis_block_producer_startup_delay', 500);
$cfg->setConfigEntry('task_miner_node_communicator_max_runs', 0);
// CFG: MINER-TEST-GENESIS-BLOCK-PRODUCER-CLASS
-$cfg->setConfigEntry('miner_test_genesis_block_producer_class', 'Org\Shipsimu\Hub\miner\Producer\Block\Genesis\MinerTestGenesisBlockProducer');
+$cfg->setConfigEntry('miner_test_genesis_block_producer_class', 'Org\Shipsimu\Hub\miner\Producer\Miner\Block\Genesis\MinerTestGenesisBlockProducer');
// CFG: MINER-REAL-GENESIS-BLOCK-PRODUCER-CLASS
-$cfg->setConfigEntry('miner_real_genesis_block_producer_class', 'Org\Shipsimu\Hub\Miner\Producer\Block\Genesis\MinerRealGenesisBlockProducer');
+$cfg->setConfigEntry('miner_real_genesis_block_producer_class', 'Org\Shipsimu\Hub\Miner\Producer\Miner\Block\Genesis\MinerRealGenesisBlockProducer');
// CFG: MINER-NODE-COMMUNICATOR-CLASS
$cfg->setConfigEntry('miner_node_communicator_class', 'Org\Shipsimu\Hub\Miner\Communicator\Node\MinerNodeCommunicator');
// Cruncher configuration
///////////////////////////////////////////////////////////////////////////////
-// CFG: CRUNCHER-DEFAULT-MODE (can be only 'mcrypt' at the moment)
-$cfg->setConfigEntry('cruncher_default_mode', 'mcrypt');
+// CFG: CRUNCHER-DEFAULT-MODE (can be only 'openssl' at the moment)
+$cfg->setConfigEntry('cruncher_default_mode', 'openssl');
+
+// CFG: HUB-OPENSSL-CRUNCHER-MODE-CLASS
+$cfg->setConfigEntry('hub_openssl_cruncher_mode_class', 'Org\Shipsimu\Hub\Cruncher\OpenSsl\HubOpenSslCruncher');
// CFG: CRUNCHER-BUFFER-STACKER-CLASS
$cfg->setConfigEntry('cruncher_buffer_stacker_class', 'Org\Mxchange\CoreFramework\Stacker\FiFoStacker');
$cfg->setConfigEntry('hub_console_cmd_cruncher_resolver_class', 'Org\Shipsimu\Hub\Resolver\Command\HubConsoleCommandResolver');
// CFG: CRUNCHER-PHP-REQUIREMENTS-FILTER
-$cfg->setConfigEntry('cruncher_php_requirements_filter_class', 'CruncherPhpRequirementsFilter');
+$cfg->setConfigEntry('cruncher_php_requirements_filter_class', 'Org\Shipsimu\Hub\Cruncher\Filter\Requirements\CruncherPhpRequirementsFilter');
// CFG: CRUNCHER-INITIALIZER-FILTER
-$cfg->setConfigEntry('cruncher_initializer_filter_class', 'CruncherInitializationFilter');
+$cfg->setConfigEntry('cruncher_initializer_filter_class', 'Org\Shipsimu\Hub\Cruncher\Filter\Initialization\CruncherInitializationFilter');
// CFG: CRUNCHER-BOOTSTRAP-TASK-HANDLER-INITIALIZER-FILTER
-$cfg->setConfigEntry('cruncher_bootstrap_task_handler_initializer_filter_class', 'CruncherTaskHandlerInitializerFilter');
+$cfg->setConfigEntry('cruncher_bootstrap_task_handler_initializer_filter_class', 'Org\Shipsimu\Hub\Filter\Initializer\Cruncher\Handler\Task\CruncherTaskHandlerInitializerFilter');
// CFG: CRUNCHER-BOOTSTRAP-EXTRA-BOOTSTRAPPING-FILTER
-$cfg->setConfigEntry('cruncher_bootstrap_extra_bootstrapping_filter_class', 'CruncherBootstrapExtraBootstrappingFilter');
+$cfg->setConfigEntry('cruncher_bootstrap_extra_bootstrapping_filter_class', 'Org\Shipsimu\Hub\Filter\Bootstrap\Cruncher\Extra\CruncherBootstrapExtraBootstrappingFilter');
// CFG: CRUNCHER-BOOTSTRAP-BUFFER-QUEUE-INITIALIZER-FILTER
-$cfg->setConfigEntry('cruncher_bootstrap_buffer_queue_initializer_filter_class', 'CruncherBootstrapBufferQueueInitializerFilter');
+$cfg->setConfigEntry('cruncher_bootstrap_buffer_queue_initializer_filter_class', 'Org\Shipsimu\Hub\Filter\Bootstrap\Cruncher\Queue\CruncherBootstrapBufferQueueInitializerFilter');
// CFG: CRUNCHER-BOOTSTRAP-GENERIC-ACTIVATION-FILTER
-$cfg->setConfigEntry('cruncher_bootstrap_generic_activation_filter_class', 'CruncherBootstrapGenericActivationFilter');
+$cfg->setConfigEntry('cruncher_bootstrap_generic_activation_filter_class', 'Org\Shipsimu\Hub\Filter\Bootstrap\Cruncher\Activation\CruncherBootstrapGenericActivationFilter');
// CFG: CRUNCHER-WELCOME-TEASER-FILTER
-$cfg->setConfigEntry('cruncher_welcome_teaser_filter_class', 'CruncherWelcomeTeaserFilter');
+$cfg->setConfigEntry('cruncher_welcome_teaser_filter_class', 'Org\Shipsimu\Hub\Cruncher\Filter\WelcomeTeaser\CruncherWelcomeTeaserFilter');
// CFG: CRUNCHER-SHUTDOWN-FILTER
-$cfg->setConfigEntry('cruncher_shutdown_filter_class', 'CruncherShutdownFilter');
+$cfg->setConfigEntry('cruncher_shutdown_filter_class', 'Org\Shipsimu\Hub\Filter\Shutdown\Cruncher\CruncherShutdownFilter');
// CFG: CRUNCHER-WORK-UNIT-FETCHER-TASK-CLASS
-$cfg->setConfigEntry('cruncher_work_unit_fetcher_task_class', 'CruncherWorkUnitFetcherTask');
+$cfg->setConfigEntry('cruncher_work_unit_fetcher_task_class', 'Org\Shipsimu\Hub\Cruncher\Task\Fetcher\WorkUnit\CruncherWorkUnitFetcherTask');
// CFG: TASK-CRUNCHER-WORK-UNIT-FETCHER-STARTUP-DELAY
$cfg->setConfigEntry('task_cruncher_work_unit_fetcher_startup_delay', 1000);
$cfg->setConfigEntry('task_cruncher_work_unit_fetcher_max_runs', 0);
// CFG: CRUNCHER-TEST-UNIT-PRODUCER-TASK-CLASS
-$cfg->setConfigEntry('cruncher_test_unit_producer_task_class', 'CruncherTestUnitProducerTask');
+$cfg->setConfigEntry('cruncher_test_unit_producer_task_class', 'Org\Shipsimu\Hub\Cruncher\Task\Producer\Unit\CruncherTestUnitProducerTask');
// CFG: TASK-CRUNCHER-TEST-UNIT-PRODUCER-STARTUP-DELAY
$cfg->setConfigEntry('task_cruncher_test_unit_producer_startup_delay', 500);
$cfg->setConfigEntry('task_cruncher_test_unit_producer_max_runs', 0);
// CFG: CRUNCHER-KEY-PRODUCER-TASK-CLASS
-$cfg->setConfigEntry('cruncher_key_producer_task_class', 'CruncherKeyProducerTask');
+$cfg->setConfigEntry('cruncher_key_producer_task_class', 'Org\Shipsimu\Hub\Cruncher\Producer\Key\CruncherKeyProducerTask');
// CFG: TASK-CRUNCHER-KEY-PRODUCER-STARTUP-DELAY
$cfg->setConfigEntry('task_cruncher_key_producer_startup_delay', 750);
$cfg->setConfigEntry('cruncher_in_buffer_min_threshold', 3);
// CFG: CRUNCHER-TEST-UNIT-GENERATOR-CLASS
-$cfg->setConfigEntry('cruncher_test_unit_generator_class', 'CruncherTestUnitHelper');
+$cfg->setConfigEntry('cruncher_test_unit_generator_class', 'Org\Shipsimu\Hub\Cruncher\Helper\WorkUnit\Test\CruncherTestUnitHelper');
// CFG: CRUNCHER-MAX-TEST-UNIT-AMOUNT
$cfg->setConfigEntry('cruncher_max_text_unit_amount', 10);
// CFG: CRUNCHER-TEST-UNIT-PRODUCER-CLASS
-$cfg->setConfigEntry('cruncher_test_unit_producer_class', 'CruncherTestUnitProducer');
+$cfg->setConfigEntry('cruncher_test_unit_producer_class', 'Org\Shipsimu\Hub\Cruncher\Producer\Cruncher\Unit\CruncherTestUnitProducer');
// CFG: CRUNCHER-KEY-PRODUCER-CLASS
-$cfg->setConfigEntry('cruncher_key_producer_class', 'CruncherKeyProducer');
+$cfg->setConfigEntry('cruncher_key_producer_class', 'Org\Shipsimu\Hub\Producer\Cruncher\Key\CruncherKeyProducer');
// CFG: CRUNCHER-TEST-UNIT-PRODUCER-TEMPLATE-CLASS
-$cfg->setConfigEntry('cruncher_test_unit_producer_template_class', 'XmlCruncherTestUnitTemplateEngine');
+$cfg->setConfigEntry('cruncher_test_unit_producer_template_class', 'Org\Shipsimu\Hub\Cruncher\Template\Engine\Xml\TestUnit\XmlCruncherTestUnitTemplateEngine');
// CFG: CRUNCHER-MESSAGE-TEMPLATE-EXTENSION
$cfg->setConfigEntry('cruncher_message_template_extension', '.xml');
$cfg->setConfigEntry('cruncher_test_unit_max_count', 1000);
// CFG: CRUNCHER-UNIT-DB-WRAPPER-CLASS
-$cfg->setConfigEntry('cruncher_unit_db_wrapper_class', 'CruncherUnitDatabaseWrapper');
+$cfg->setConfigEntry('cruncher_unit_db_wrapper_class', 'Org\Shipsimu\Hub\Database\Frontend\Cruncher\Unit\CruncherUnitDatabaseWrapper');
// CFG: CRUNCHER-RANDOM-SECRET-MESSAGE-LENGTH
$cfg->setConfigEntry('random_secret_message_length', 100);
// CFG: TEST-UNIT-PRODUCER-KEY-ITERATOR-CLASS
-$cfg->setConfigEntry('test_unit_producer_key_iterator_class', 'TestUnitKeyProducerIterator');
+$cfg->setConfigEntry('test_unit_producer_key_iterator_class', 'Org\Shipsimu\Hub\Iterator\Producer\Key\TestUnit\TestUnitKeyProducerIterator');
// CFG: WORK-UNIT-PRODUCER-KEY-ITERATOR-CLASS
$cfg->setConfigEntry('work_unit_producer_key_iterator_class', 'WorkUnitKeyProducerIterator');
$cfg->setConfigEntry('test_unit_random_secret_key_length', 8 * 32);
// CFG: TEST-UNIT-SOURCE-CLASS
-$cfg->setConfigEntry('test_unit_source_class', 'TestUnitSource');
+$cfg->setConfigEntry('test_unit_source_class', 'Org\Shipsimu\Hub\Crawler\Source\Unit\TestUnitSource');
// CFG: CRYPTO-RANDOM-MESSAGE-HELPER-CLASS
-$cfg->setConfigEntry('crypto_random_message_helper_class', 'CryptoRandomUnitMessageHelper');
+$cfg->setConfigEntry('crypto_random_message_helper_class', 'Org\Shipsimu\Hub\Helper\Crypto\Message\RandomUnit\CryptoRandomUnitMessageHelper');
// CFG: CRUNCHER-INIT-STATE-CLASS
-$cfg->setConfigEntry('cruncher_init_state_class', 'CruncherInitState');
+$cfg->setConfigEntry('cruncher_init_state_class', 'Org\Shipsimu\Hub\Cruncher\State\Initialization\CruncherInitState');
// CFG: CRUNCHER-VIRGIN-STATE-CLASS
-$cfg->setConfigEntry('cruncher_virgin_state_class', 'CruncherVirginState');
+$cfg->setConfigEntry('cruncher_virgin_state_class', 'Org\Shipsimu\Hub\Cruncher\State\Virgin\CruncherVirginState');
// CFG: CRUNCHER-PER-UNIT-KEY-LIMIT
$cfg->setConfigEntry('cruncher_per_unit_key_limit', 1000);
// Own namespace
namespace Org\Shipsimu\Hub\Producer\Key;
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Producer\Producer;
+
// Import framework stuff
use Org\Mxchange\CoreFramework\Executor\Executor;
use Org\Mxchange\CoreFramework\State\Stateable;
// Own namespace
namespace Org\Shipsimu\Hub\Producer\Unit;
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Producer\Producer;
+
// Import framework stuff
use Org\Mxchange\CoreFramework\Executor\Executor;
use Org\Mxchange\CoreFramework\State\Stateable;