public class BasicObjectRouteMatch extends Object implements RouteMatch<Object>
EMPTY
Constructor and Description |
---|
BasicObjectRouteMatch(Object object) |
Modifier and Type | Method and Description |
---|---|
RouteMatch<Object> |
decorate(Function<RouteMatch<Object>,Object> 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(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.
|
Object |
execute(Map<String,Object> argumentValues)
Execute the route with the given values.
|
RouteMatch<Object> |
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.
|
Optional<Argument<?>> |
getRequiredInput(String name)
Return whether the given named input is required by this route.
|
ReturnType<?> |
getReturnType() |
Map<String,Object> |
getVariableValues() |
boolean |
test(HttpRequest httpRequest) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accept, call, execute, explicitAccept, explicitlyConsumes, getRequiredArguments, isExecutable, isRequiredInput, isSatisfied
isAsync, isAsyncOrReactive, isCompletable, isReactive, isSingleResult, isSpecifiedSingle, isSuspended, isVoid
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation
public BasicObjectRouteMatch(Object object)
object
- An objectpublic Class<?> getDeclaringType()
RouteMatch
getDeclaringType
in interface RouteMatch<Object>
public Map<String,Object> getVariableValues()
getVariableValues
in interface RouteMatch<Object>
public Object execute(Map<String,Object> argumentValues)
RouteMatch
RouteMatch.getRequiredArguments()
.execute
in interface RouteMatch<Object>
argumentValues
- The argument valuespublic RouteMatch<Object> fulfill(Map<String,Object> argumentValues)
RouteMatch
RouteMatch
fulfilling arguments required by this route to execute. The new route will not
return the given arguments from the RouteMatch.getRequiredArguments()
method.fulfill
in interface RouteMatch<Object>
argumentValues
- The argument valuespublic RouteMatch<Object> decorate(Function<RouteMatch<Object>,Object> executor)
RouteMatch
decorate
in interface RouteMatch<Object>
executor
- The executorpublic Optional<Argument<?>> getRequiredInput(String name)
RouteMatch
getRequiredInput
in interface RouteMatch<Object>
name
- The name of the inputpublic Optional<Argument<?>> getBodyArgument()
getBodyArgument
in interface RouteMatch<Object>
public List<MediaType> getProduces()
RouteMatch
getProduces
in interface RouteMatch<Object>
MediaType
that this route can producepublic ReturnType<?> getReturnType()
getReturnType
in interface RouteInfo<Object>
getReturnType
in interface RouteMatch<Object>
public boolean doesConsume(@Nullable MediaType contentType)
RouteMatch
doesConsume
in interface RouteMatch<Object>
contentType
- The content typepublic boolean doesProduce(@Nullable Collection<MediaType> acceptableTypes)
RouteMatch
doesProduce
in interface RouteMatch<Object>
acceptableTypes
- The acceptable typespublic boolean doesProduce(@Nullable MediaType acceptableType)
RouteMatch
doesProduce
in interface RouteMatch<Object>
acceptableType
- The acceptable typepublic boolean test(HttpRequest httpRequest)
test
in interface Predicate<HttpRequest>