public boolean isService(String protocol, String pattern) {
        if (services.containsKey(protocol)) {
            Pattern regex = toRegex(pattern);
            for (String service : services.get(protocol)) {
                if (regex.matcher(service).find()) {
                    return true;
                }
            }
        }
        return false;
    }
Determines whether or not the given service pattern matches any of the known services.

@param protocol The protocol whose services to check.
@param pattern  The pattern to match.
@return True if at least one service was found.
messagebus/src/main/java/com/yahoo/messagebus/routing/ApplicationSpec.java