public function listMethods()
    {
        $methods = array_keys($this->server->getIterator()->getArrayCopy());
        if ($this->whitelist !== null) {
            $methods = array_values(array_intersect($methods, $this->whitelist));
        }
        return $methods;
    }