Interface ApplicationRouter<T>

  • All Known Implementing Classes:
    RuleRouter

    public interface ApplicationRouter<T>
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Collection<java.lang.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.
      java.util.List<T> getRuleTargets()
      Return a list of all target objects that this router handles.
      java.util.Optional<RuleMatch<T>> match​(com.spotify.apollo.Request message)
      Match a request to a configured entity.
    • Method Detail

      • match

        java.util.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

        java.util.Collection<java.lang.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

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