Package com.spotify.apollo.route
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 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.List<T>
getRuleTargets()
Return a list of all target objects that this router handles.Optional<RuleMatch<T>>
match(com.spotify.apollo.Request message)
Match a request to a configured entity.
-
-
-
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
-
-