final public function run()
    {
        $this->nb_http_server = $this->nb_engine->getHTTPServer();
        if (!($this->nb_http_server instanceof INabuHTTPServerInterface)) {
            throw new ENabuCoreException(ENabuCoreException::ERROR_HTTP_SERVER_NOT_FOUND);
        }

        $this->prepareSecurityManager();
        $this->preparePluginsManager();
        $this->prepareModulesManager();

        $this->nb_session = CNabuHTTPSession::getSession();
        $this->nb_engine->traceLog("Cookies", $_COOKIE);

        // If the request is not allowed then treat it as a redirection or an error
        try {
            if ($this->prepareRequest()) {
                $method = $this->nb_request->getMethod();
                $this->prepareCookies();
                $this->prepareLocale();

                if ($this->validateCORSOrigin()) {
                    if ($method !== 'OPTIONS') {
                        $this->prepareModules();
                    }

                    if ($this->prepareResponse() &&
                        $this->processMethods() &&
                        $this->processCommands()
                    ) {
                        if ($method !== 'OPTIONS' && $method !== 'HEAD') {
                            $this->buildResponse();
                        } else {
                            $this->prepareHeaders();
                        }
                    }
                }
            } else {
                nb_displayErrorPage($this->nb_response->getHTTPResponseCode());
            }
        } catch (ENabuRedirectionException $re) {
            $this->nb_engine->traceLog("Redirection", "Via exception");
            $this->prepareCookies();
            $this->buildRedirection($re->getHTTPResponseCode(), $re->getLocation());
        }

        return true;
    }