public function init(ConnectionInterface $conn = null, $runlevel = ApplicationServerInterface::FULL)
{
// switch to the new runlevel
$this->synchronized(function ($self, $newRunlevel) {
// wait till the previous commands has been finished
while ($self->locked === true) {
sleep(1);
}
// set the command name
$self->command = InitCommand::COMMAND;
// lock process
$self->locked = true;
$self->params = $newRunlevel;
// notify the AS to execute the command
$self->notify();
}, $this, $runlevel);
}