Interface RouteMatch<R>

Type Parameters:
R - The route
All Superinterfaces:
AnnotationMetadataProvider, AnnotationSource, Callable<R>
All Known Subinterfaces:
MethodBasedRouteMatch<T,R>, UriRouteMatch<T,R>

public interface RouteMatch<R> extends Callable<R>, AnnotationMetadataProvider
A Route that is executable.
Since:
1.0
Author:
Graeme Rocher
  • Method Details

    • getRouteInfo

      RouteInfo<R> getRouteInfo()
      Returns:
      The route info
    • getVariableValues

      Map<String,Object> getVariableValues()
      Returns:
      The variable values following a successful match.
    • fulfill

      void fulfill(Map<String,Object> argumentValues)
      Fulfill argument values.
      Parameters:
      argumentValues - The argument values
    • fulfillBeforeFilters

      void fulfillBeforeFilters(RequestBinderRegistry requestBinderRegistry, HttpRequest<?> request)
      Attempt to satisfy the arguments of the given route with the data from the given request.
      Parameters:
      requestBinderRegistry - The request binder registry
      request - The request
      Since:
      4.0.0
    • fulfillAfterFilters

      void fulfillAfterFilters(RequestBinderRegistry requestBinderRegistry, HttpRequest<?> request)
      Attempt to satisfy the arguments of the given route with the data from the given request.
      Parameters:
      requestBinderRegistry - The request binder registry
      request - The request
      Since:
      4.0.0
    • isFulfilled

      boolean isFulfilled()
      Returns:
      Whether the route match can be executed without passing any additional arguments ie. via execute()
      Since:
      4.0.0
    • getRequiredInput

      Optional<Argument<?>> getRequiredInput(String name)
      Return whether the given named input is required by this route.
      Parameters:
      name - The name of the input
      Returns:
      True if it is
    • getRequiredArguments

      default Collection<Argument<?>> getRequiredArguments()

      Returns the required arguments for this RouteMatch.

      Returns:
      The required arguments in order to invoke this route
    • execute

      R execute()
      Execute the route with the given values. Note if there are required arguments returned from getRequiredArguments() this method will throw an IllegalArgumentException.
      Returns:
      The result
    • call

      default R call() throws Exception
      Same as execute().
      Specified by:
      call in interface Callable<R>
      Returns:
      The result
      Throws:
      Exception - When an exception occurs
    • isSatisfied

      boolean isSatisfied(String name)
      Is the given input satisfied.
      Parameters:
      name - The name of the input
      Returns:
      True if it is