public static Route parse(String str) {
        if (str == null || str.length() == 0) {
            return new Route().addHop(new Hop().addDirective(new ErrorDirective("Failed to parse empty string.")));
        }
        RouteParser parser = new RouteParser(str);
        Route route = parser.route();
        route.setRaw(str);
        return route;
    }
Parses the given string as a list of space-separated hops. The {@link #toString()}
method is compatible with this parser.

@param str the string to parse
@return a route that corresponds to the string
messagebus/src/main/java/com/yahoo/messagebus/routing/Route.java