R - The routepublic interface RouteMatch<R> extends java.util.concurrent.Callable<R>, java.util.function.Predicate<HttpRequest>, RouteInfo<R>
Route that is executable.EMPTY| Modifier and Type | Method and Description |
|---|---|
default boolean |
accept(MediaType contentType)
Deprecated.
Use
doesConsume(MediaType) instead. |
default R |
call()
Same as
execute(). |
RouteMatch<R> |
decorate(java.util.function.Function<RouteMatch<R>,R> executor)
Decorates the execution of the route with the given executor.
|
boolean |
doesConsume(MediaType contentType)
Whether the specified content type is an accepted type.
|
boolean |
doesProduce(java.util.Collection<MediaType> acceptableTypes)
Whether the route does produce any of the given types.
|
boolean |
doesProduce(MediaType acceptableType)
Whether the route does produce any of the given types.
|
default R |
execute()
Execute the route with the given values.
|
R |
execute(java.util.Map<java.lang.String,java.lang.Object> argumentValues)
Execute the route with the given values.
|
default boolean |
explicitAccept(MediaType contentType)
Deprecated.
Use
explicitlyConsumes(MediaType) instead |
default boolean |
explicitlyConsumes(MediaType contentType)
Whether the specified content type is explicitly an accepted type.
|
RouteMatch<R> |
fulfill(java.util.Map<java.lang.String,java.lang.Object> argumentValues)
Returns a new
RouteMatch fulfilling arguments required by this route to execute. |
java.util.Optional<Argument<?>> |
getBodyArgument() |
java.lang.Class<?> |
getDeclaringType()
The declaring type of the route.
|
java.util.List<MediaType> |
getProduces()
The media types able to produced by this route.
|
default java.util.Collection<Argument> |
getRequiredArguments()
Returns the required arguments for this RouteMatch.
|
java.util.Optional<Argument<?>> |
getRequiredInput(java.lang.String name)
Return whether the given named input is required by this route.
|
ReturnType<? extends R> |
getReturnType() |
java.util.Map<java.lang.String,java.lang.Object> |
getVariableValues() |
default boolean |
isExecutable() |
default boolean |
isRequiredInput(java.lang.String name)
Return whether the given named input is required by this route.
|
default boolean |
isSatisfied(java.lang.String name)
Is the given input satisfied.
|
isAsync, isAsyncOrReactive, isCompletable, isReactive, isSingleResult, isSpecifiedSingle, isSuspended, isVoidfindAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypegetAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotationjava.lang.Class<?> getDeclaringType()
java.util.Map<java.lang.String,java.lang.Object> getVariableValues()
R execute(java.util.Map<java.lang.String,java.lang.Object> argumentValues)
getRequiredArguments().argumentValues - The argument valuesRouteMatch<R> fulfill(java.util.Map<java.lang.String,java.lang.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(java.util.function.Function<RouteMatch<R>,R> executor)
executor - The executorjava.util.Optional<Argument<?>> getRequiredInput(java.lang.String name)
name - The name of the inputjava.util.Optional<Argument<?>> getBodyArgument()
java.util.List<MediaType> getProduces()
MediaType that this route can producedefault java.util.Collection<Argument> getRequiredArguments()
Returns the required arguments for this RouteMatch.
ReturnType<? extends R> getReturnType()
getReturnType in interface RouteInfo<R>default R execute()
getRequiredArguments() this method will throw an IllegalArgumentException.default R call() throws java.lang.Exception
execute().call in interface java.util.concurrent.Callable<R>java.lang.Exception - When an exception occursdefault boolean isExecutable()
execute()default boolean isRequiredInput(java.lang.String name)
name - The name of the inputboolean doesConsume(@Nullable
MediaType contentType)
contentType - The content typeboolean doesProduce(@Nullable
java.util.Collection<MediaType> acceptableTypes)
acceptableTypes - The acceptable typesboolean doesProduce(@Nullable
MediaType acceptableType)
acceptableType - The acceptable typedefault boolean explicitlyConsumes(@Nullable
MediaType contentType)
contentType - The content type@Deprecated
default boolean explicitAccept(@Nullable
MediaType contentType)
explicitlyConsumes(MediaType) insteadcontentType - The content typedefault boolean isSatisfied(java.lang.String name)
name - The name of the input@Deprecated
default boolean accept(@Nullable
MediaType contentType)
doesConsume(MediaType) instead.contentType - The content type