public static function factory($classId)
    {
        $className = static::getClassNameFromClassId($classId);

        if (!class_exists($className)) {
            self::sendPlainHeader();
            throw new Exception(static::getInvalidClassIdExceptionMessage($classId));
        }

        return new $className;
    }