public void toConfig(StringBuilder cfg, String prefix) {
        cfg.append(prefix).append("name ").append(RoutingSpec.toConfigString(name)).append("\n");
        cfg.append(prefix).append("selector ").append(RoutingSpec.toConfigString(selector)).append("\n");
        if (ignoreResult) {
            cfg.append(prefix).append("ignoreresult true\n");
        }
        int numRecipients = recipients.size();
        if (numRecipients > 0) {
            cfg.append(prefix).append("recipient[").append(numRecipients).append("]\n");
            for (int i = 0; i < numRecipients; ++i) {
                cfg.append(prefix).append("recipient[").append(i).append("] ");
                cfg.append(RoutingSpec.toConfigString(recipients.get(i))).append("\n");
            }
        }
    }
Appends the content of this to the given config string builder.

@param cfg    The config to add to.
@param prefix The prefix to use for each add.
messagebus/src/main/java/com/yahoo/messagebus/routing/HopSpec.java