Interface ApplicationRouter<T>

  • All Known Implementing Classes:
    RuleRouter

    public interface ApplicationRouter<T>
    • Method Detail

      • match

        Optional<RuleMatch<T>> match​(com.spotify.apollo.Request message)
                              throws InvalidUriException
        Match a request to a configured entity. Throws InvalidUriException if the URI of the request is badly formated. Returns absence if there is no match.
        Parameters:
        message - The message to find the entity for
        Throws:
        InvalidUriException
      • getMethodsForValidRules

        Collection<String> getMethodsForValidRules​(com.spotify.apollo.Request message)
        Returns a collection of valid methods (such as GET and POST) for the URI of the provided request. Will return an empty collection if nothing match the URI.
        Parameters:
        message - The message to find the methods for
      • getRuleTargets

        List<T> getRuleTargets()
        Return a list of all target objects that this router handles.
        Returns:
        A list of all targets