public function handlerIdByClassName($className)
    {
        foreach ($this->handlers() as $id => $class) {
            if ($class->className() === $className) {
                return $id;
            }
        }

        throw new Exception("Handler with classname {$className} not found.");
    }