R
- The routepublic interface RouteMatch<R> extends Callable<R>, Predicate<HttpRequest>, AnnotationMetadataProvider
Route
that is executable.EMPTY
Modifier and Type | Method and Description |
---|---|
boolean |
accept(MediaType contentType)
Whether the specified content type is an accepted type.
|
default R |
call()
Same as
execute() . |
RouteMatch<R> |
decorate(Function<RouteMatch<R>,R> executor)
Decorates the execution of the route with the given executor.
|
default R |
execute()
Execute the route with the given values.
|
R |
execute(Map<String,Object> argumentValues)
Execute the route with the given values.
|
RouteMatch<R> |
fulfill(Map<String,Object> argumentValues)
Returns a new
RouteMatch fulfilling arguments required by this route to execute. |
Optional<Argument<?>> |
getBodyArgument() |
Class<?> |
getDeclaringType()
The declaring type of the route.
|
List<MediaType> |
getProduces()
The media types able to produced by this route.
|
default Collection<Argument> |
getRequiredArguments()
Returns the required arguments for this RouteMatch.
|
Optional<Argument<?>> |
getRequiredInput(String name)
Return whether the given named input is required by this route.
|
ReturnType<? extends R> |
getReturnType() |
Map<String,Object> |
getVariableValues() |
default boolean |
isExecutable() |
default boolean |
isRequiredInput(String name)
Return whether the given named input is required by this route.
|
default boolean |
isSatisfied(String name)
Is the given input satisfied.
|
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation
Class<?> getDeclaringType()
Map<String,Object> getVariableValues()
R execute(Map<String,Object> argumentValues)
getRequiredArguments()
.argumentValues
- The argument valuesRouteMatch<R> fulfill(Map<String,Object> argumentValues)
RouteMatch
fulfilling arguments required by this route to execute. The new route will not
return the given arguments from the getRequiredArguments()
method.argumentValues
- The argument valuesRouteMatch<R> decorate(Function<RouteMatch<R>,R> executor)
executor
- The executorOptional<Argument<?>> getRequiredInput(String name)
name
- The name of the inputOptional<Argument<?>> getBodyArgument()
List<MediaType> getProduces()
MediaType
that this route can producedefault Collection<Argument> getRequiredArguments()
Returns the required arguments for this RouteMatch.
ReturnType<? extends R> getReturnType()
default R execute()
getRequiredArguments()
this method will throw an IllegalArgumentException
.default boolean isExecutable()
execute()
default boolean isRequiredInput(String name)
name
- The name of the inputboolean accept(@Nullable MediaType contentType)
contentType
- The content typedefault boolean isSatisfied(String name)
name
- The name of the input