protected static function modifyScheme($name, $scheme)
    {
        self::validateAgentName($name);
        self::$scheme[$name] = $scheme;
        if (self::isTaskBooted()) {
            $driver = self::getTask()->getDriver($name);
            if ($driver) {
                if (is_array($scheme)) {
                    $higherOrderScheme = self::parseScheme($scheme);
                    $scheme = $higherOrderScheme['scheme'];
                }
                $driver->reset($scheme);
            } else {
                self::registerDriver($name, $scheme);
            }
        }
    }