public class BasicObjectRouteMatch extends java.lang.Object implements RouteMatch<java.lang.Object>
EMPTY
Constructor and Description |
---|
BasicObjectRouteMatch(java.lang.Object object) |
Modifier and Type | Method and Description |
---|---|
RouteMatch<java.lang.Object> |
decorate(java.util.function.Function<RouteMatch<java.lang.Object>,java.lang.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(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.
|
java.lang.Object |
execute(java.util.Map<java.lang.String,java.lang.Object> argumentValues)
Execute the route with the given values.
|
RouteMatch<java.lang.Object> |
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.
|
java.util.Optional<Argument<?>> |
getRequiredInput(java.lang.String name)
Return whether the given named input is required by this route.
|
ReturnType<?> |
getReturnType() |
java.util.Map<java.lang.String,java.lang.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(java.lang.Object object)
object
- An objectpublic java.lang.Class<?> getDeclaringType()
RouteMatch
getDeclaringType
in interface RouteMatch<java.lang.Object>
public java.util.Map<java.lang.String,java.lang.Object> getVariableValues()
getVariableValues
in interface RouteMatch<java.lang.Object>
public java.lang.Object execute(java.util.Map<java.lang.String,java.lang.Object> argumentValues)
RouteMatch
RouteMatch.getRequiredArguments()
.execute
in interface RouteMatch<java.lang.Object>
argumentValues
- The argument valuespublic RouteMatch<java.lang.Object> fulfill(java.util.Map<java.lang.String,java.lang.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<java.lang.Object>
argumentValues
- The argument valuespublic RouteMatch<java.lang.Object> decorate(java.util.function.Function<RouteMatch<java.lang.Object>,java.lang.Object> executor)
RouteMatch
decorate
in interface RouteMatch<java.lang.Object>
executor
- The executorpublic java.util.Optional<Argument<?>> getRequiredInput(java.lang.String name)
RouteMatch
getRequiredInput
in interface RouteMatch<java.lang.Object>
name
- The name of the inputpublic java.util.Optional<Argument<?>> getBodyArgument()
getBodyArgument
in interface RouteMatch<java.lang.Object>
public java.util.List<MediaType> getProduces()
RouteMatch
getProduces
in interface RouteMatch<java.lang.Object>
MediaType
that this route can producepublic ReturnType<?> getReturnType()
getReturnType
in interface RouteInfo<java.lang.Object>
getReturnType
in interface RouteMatch<java.lang.Object>
public boolean doesConsume(@Nullable MediaType contentType)
RouteMatch
doesConsume
in interface RouteMatch<java.lang.Object>
contentType
- The content typepublic boolean doesProduce(@Nullable java.util.Collection<MediaType> acceptableTypes)
RouteMatch
doesProduce
in interface RouteMatch<java.lang.Object>
acceptableTypes
- The acceptable typespublic boolean doesProduce(@Nullable MediaType acceptableType)
RouteMatch
doesProduce
in interface RouteMatch<java.lang.Object>
acceptableType
- The acceptable typepublic boolean test(HttpRequest httpRequest)
test
in interface java.util.function.Predicate<HttpRequest>