public function __construct($name, ChannelModelInterface $model, RouterCompositeInterface $router, EncoderInterface $encoder, LoopInterface $loop)
{
parent::__construct($loop);
try {
$router->getBus('input');
$router->getBus('output');
} catch (Exception $ex) {
throw new InstantiationException("Could not construct Kraken\\Channel\\Channel due to Router wrong configuration.");
}
$this->name = $name;
$this->model = $model;
$this->router = $router;
$this->encoder = $encoder;
$this->loop = $loop;
$this->handlers = [];
$this->seed = GeneratorSupport::genId($this->name);
$this->counter = 1000000000.0;
$this->reqsHelperTimer = null;
$this->repsHelperTimer = null;
$this->handledRepsTimeout = 10000.0;
$this->registerEvents();
$this->registerPeriodicTimers();
}