use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
use Org\Mxchange\CoreFramework\Handler\BaseHandler;
use Org\Mxchange\CoreFramework\Handler\Handleable;
-use Org\Mxchange\CoreFramework\Registry\Register;
+use Org\Mxchange\CoreFramework\Traits\Registry\RegisterTrait;
use Org\Mxchange\CoreFramework\Traits\Stacker\StackableTrait;
/**
// Load traits
use ListenableTrait;
use NodeTrait;
+ use RegisterTrait;
use StackableTrait;
/**
*/
private $assemblerInstance = NULL;
- /**
- * Registry instance (implementing Register)
- */
- private $registryInstance = NULL;
-
/**
* Protected constructor
*
return $this->assemblerInstance;
}
- /**
- * Setter for registry instance
- *
- * @param $registryInstance An instance of a Register class
- * @return void
- */
- protected final function setRegistryInstance (Register $registryInstance) {
- $this->registryInstance = $registryInstance;
- }
-
- /**
- * Getter for registry instance
- *
- * @return $registryInstance The debug registry instance
- */
- protected final function getRegistryInstance () {
- return $this->registryInstance;
- }
-
}
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
use Org\Mxchange\CoreFramework\Factory\Registry\Socket\SocketRegistryFactory;
use Org\Mxchange\CoreFramework\Generic\NullPointerException;
-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\Traits\Registry\RegisterTrait;
use Org\Mxchange\CoreFramework\Visitor\Visitable;
use Org\Mxchange\CoreFramework\Visitor\Visitor;
// Load traits
use IteratorTrait;
use HandleableTrait;
+ use RegisterTrait;
use StorableSocketTrait;
// Exception code constants
*/
private $protocolName = 'invalid';
- /**
- * Registry instance (implementing Register)
- */
- private $registryInstance = NULL;
-
/**
* Protected constructor
*
// Call parent constructor
parent::__construct($className);
- // Get a socket registry instance (singleton)
- $registryInstance = SocketRegistryFactory::createSocketRegistryInstance();
-
- // And set it here for later on making lesser calls
- $this->setRegistryInstance($registryInstance);
+ // Set socket registry here for later on making lesser calls
+ $this->setRegistryInstance(SocketRegistryFactory::createSocketRegistryInstance());
}
/**
$this->protocolName = $protocolName;
}
- /**
- * Setter for registry instance
- *
- * @param $registryInstance An instance of a Register class
- * @return void
- */
- protected final function setRegistryInstance (Register $registryInstance) {
- $this->registryInstance = $registryInstance;
- }
-
- /**
- * Getter for registry instance
- *
- * @return $registryInstance The debug registry instance
- */
- protected final function getRegistryInstance () {
- return $this->registryInstance;
- }
-
/**
* Registeres the given socket resource for "this" listener instance. This
* will be done in a seperate class to allow package writers to use it