protected function getHandlerAdapter($handler)
    {
        foreach ($this->handlerAdapters as $ha) {
            if ($ha->supports($handler)) {
                return $ha;
            }
        }
        throw new \Exception("No adapter for handler [".get_class($handler)."]: The DispatcherServlet configuration needs to include a HandlerAdapter that supports this handler.");
    }