protected function onStop($reason = '')
{
//var_dump(debug_backtrace());
if ($this->_state != self::STATE_STOPPING and $reason == '') {
$reason = 'Unexpected';
}
$this->_state = self::STATE_STOPPED;
$this->onStopped($reason);
}