use Org\Shipsimu\Hub\Network\Delivery\Deliverable;
// Import framework stuff
-use Org\Mxchange\CoreFramework\Handler\Handleable;
+use Org\Mxchange\CoreFramework\Traits\Handler\HandleableTrait;
use Org\Mxchange\CoreFramework\Traits\Stacker\StackableTrait;
/**
*/
abstract class BaseDecoder extends BaseHubSystem {
// Load traits
+ use HandleableTrait;
use StackableTrait;
/**
*/
private $packageHandlerInstance = NULL;
- /**
- * Handler instance
- */
- private $handlerInstance = NULL;
-
/**
* Protected constructor
*
return $this->packageHandlerInstance;
}
- /**
- * Setter for handler instance
- *
- * @param $handlerInstance An instance of a Handleable class
- * @return void
- */
- protected final function setHandlerInstance (Handleable $handlerInstance) {
- $this->handlerInstance = $handlerInstance;
- }
-
- /**
- * Getter for handler instance
- *
- * @return $handlerInstance A Handleable instance
- */
- protected final function getHandlerInstance () {
- return $this->handlerInstance;
- }
-
}
// Import framework stuff
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
-use Org\Mxchange\CoreFramework\Handler\Handleable;
+use Org\Mxchange\CoreFramework\Traits\Handler\HandleableTrait;
/**
* A ??? connection helper class
*/
abstract class BaseIpV4ConnectionHelper extends BaseConnectionHelper {
// Load traits
+ use HandleableTrait;
use StorableSocketTrait;
/**
*/
private $protocolName = 'invalid';
- /**
- * Handler instance
- */
- private $handlerInstance = NULL;
-
/**
* Protected constructor
*
return $this->protocolName;
}
- /**
- * Setter for handler instance
- *
- * @param $handlerInstance An instance of a Handleable class
- * @return void
- */
- protected final function setHandlerInstance (Handleable $handlerInstance) {
- $this->handlerInstance = $handlerInstance;
- }
-
- /**
- * Getter for handler instance
- *
- * @return $handlerInstance A Handleable instance
- */
- protected final function getHandlerInstance () {
- return $this->handlerInstance;
- }
-
/**
* Attempts to connect to a peer by given IP number and port from an UNL
* instance with currently configured timeout.
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
use Org\Mxchange\CoreFramework\Factory\Registry\Socket\SocketRegistryFactory;
use Org\Mxchange\CoreFramework\Generic\NullPointerException;
-use Org\Mxchange\CoreFramework\Handler\Handleable;
use Org\Mxchange\CoreFramework\Registry\Register;
use Org\Mxchange\CoreFramework\Socket\InvalidServerSocketException;
use Org\Mxchange\CoreFramework\Socket\SocketAlreadyRegisteredException;
+use Org\Mxchange\CoreFramework\Traits\Handler\HandleableTrait;
use Org\Mxchange\CoreFramework\Traits\Iterator\IteratorTrait;
use Org\Mxchange\CoreFramework\Visitor\Visitable;
use Org\Mxchange\CoreFramework\Visitor\Visitor;
abstract class BaseListener extends BaseHubSystem implements Visitable {
// Load traits
use IteratorTrait;
+ use HandleableTrait;
use StorableSocketTrait;
// Exception code constants
*/
private $registryInstance = NULL;
- /**
- * Handler instance
- */
- private $handlerInstance = NULL;
-
/**
* Protected constructor
*
return $this->registryInstance;
}
- /**
- * Setter for handler instance
- *
- * @param $handlerInstance An instance of a Handleable class
- * @return void
- */
- protected final function setHandlerInstance (Handleable $handlerInstance) {
- $this->handlerInstance = $handlerInstance;
- }
-
- /**
- * Getter for handler instance
- *
- * @return $handlerInstance A Handleable instance
- */
- public final function getHandlerInstance () {
- return $this->handlerInstance;
- }
-
/**
* Registeres the given socket resource for "this" listener instance. This
* will be done in a seperate class to allow package writers to use it
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
-use Org\Mxchange\CoreFramework\Handler\Handleable;
use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Traits\Handler\HandleableTrait;
use Org\Mxchange\CoreFramework\Traits\Stacker\StackableTrait;
use Org\Mxchange\CoreFramework\Traits\Stream\Input\InputStreamTrait;
use Org\Mxchange\CoreFramework\Utils\String\StringUtils;
*/
class PackageAssembler extends BaseHubSystem implements Assembler, Registerable, Visitable {
// Load traits
+ use HandleableTrait;
use InputStreamTrait;
use StackableTrait;
*/
private $packageHandlerInstance = NULL;
- /**
- * Handler instance
- */
- private $handlerInstance = NULL;
-
/**
* Protected constructor
*
// And set it
$assemblerInstance->setInputStreamInstance($streamInstance);
- // Now get a chunk handler instance
- $handlerInstance = ChunkHandlerFactory::createChunkHandlerInstance();
-
- // Set handler instance
- $assemblerInstance->setHandlerInstance($handlerInstance);
+ // Set chunk handler instance
+ $assemblerInstance->setHandlerInstance(ChunkHandlerFactory::createChunkHandlerInstance());
// Get stacker instance
$stackInstance = ObjectFactory::createObjectByConfiguredName('multiple_message_stacker_class');
return $this->packageHandlerInstance;
}
- /**
- * Setter for handler instance
- *
- * @param $handlerInstance An instance of a Handleable class
- * @return void
- */
- protected final function setHandlerInstance (Handleable $handlerInstance) {
- $this->handlerInstance = $handlerInstance;
- }
-
- /**
- * Getter for handler instance
- *
- * @return $handlerInstance A Handleable instance
- */
- protected final function getHandlerInstance () {
- return $this->handlerInstance;
- }
-
/**
* Checks whether the input buffer (stacker to be more preceise) is empty.
*
<?php
// Own namespace
-namespace Org\Shipsimu\Hub\Task\Network\Reader;
+namespace Org\Shipsimu\Hub\Node\Task\Network\Reader;
// Import application-specific stuff
use Org\Shipsimu\Hub\Factory\Handler\Network\NetworkPackageHandlerFactory;
<?php
// Own namespace
-namespace Org\Shipsimu\Hub\Task\Network\Writer;
+namespace Org\Shipsimu\Hub\Node\Task\Network\Writer;
// Import application-specific stuff
use Org\Shipsimu\Hub\Factory\Handler\Network\NetworkPackageHandlerFactory;
use Org\Mxchange\CoreFramework\Handler\Handleable;
use Org\Mxchange\CoreFramework\Task\BaseTask;
use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Traits\Handler\HandleableTrait;
use Org\Mxchange\CoreFramework\Visitor\Visitable;
use Org\Mxchange\CoreFramework\Visitor\Visitor;
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
class NodeChunkAssemblerTask extends BaseHubTask implements Taskable, Visitable {
- /**
- * Handler instance
- */
- private $handlerInstance = NULL;
+ // Load traits
+ use HandleableTrait;
/**
* Protected constructor
parent::__construct(__CLASS__);
}
- /**
- * Setter for handler instance
- *
- * @param $handlerInstance An instance of a Handleable class
- * @return void
- */
- protected final function setHandlerInstance (Handleable $handlerInstance) {
- $this->handlerInstance = $handlerInstance;
- }
-
- /**
- * Getter for handler instance
- *
- * @return $handlerInstance A Handleable instance
- */
- protected final function getHandlerInstance () {
- return $this->handlerInstance;
- }
-
/**
* Creates an instance of this class
*
$cfg->setConfigEntry('node_announcement_task_class', 'Org\Shipsimu\Hub\Filter\Activation\Node\Announcement\NodeAnnouncementTask');
// CFG: NODE-PACKAGE-WRITER-TASK-CLASS
-$cfg->setConfigEntry('node_package_writer_task_class', 'Org\Shipsimu\Hub\Task\Network\Writer\NetworkPackageWriterTask');
+$cfg->setConfigEntry('node_package_writer_task_class', 'Org\Shipsimu\Hub\Node\Task\Network\Writer\NetworkPackageWriterTask');
// CFG: NODE-PACKAGE-READER-TASK-CLASS
-$cfg->setConfigEntry('node_package_reader_task_class', 'Org\Shipsimu\Hub\Task\Network\Reader\NetworkPackageReaderTask');
+$cfg->setConfigEntry('node_package_reader_task_class', 'Org\Shipsimu\Hub\Node\Task\Network\Reader\NetworkPackageReaderTask');
// CFG: NODE-SOCKET-LISTENER-TASK-CLASS
$cfg->setConfigEntry('node_socket_listener_task_class', 'Org\Shipsimu\Hub\Node\Task\Listener\Socket\NodeSocketListenerTask');
-Subproject commit ef7a7e55c59c9e887e6bb09c8c02b8126309f716
+Subproject commit bed2c6a3cf04dd79cbe36186852dd3628d5200a4