public final class RoutingResult extends Object
Route.apply(RoutingContext).| Modifier and Type | Method and Description |
|---|---|
static RoutingResultBuilder |
builder()
Returns a new builder.
|
String |
decodedPath()
Returns the path mapped by the
Route, decoded in UTF-8. |
static RoutingResult |
empty()
The empty
RoutingResult whose type() is RoutingResultType.NOT_MATCHED and
isPresent() returns false. |
boolean |
hasHighestScore()
Returns whether the score of this result is the highest or not.
|
boolean |
hasLowestScore()
Returns whether the score of this result is the lowest or not.
|
boolean |
isPresent()
Returns
true if this result is not empty(). |
MediaType |
negotiatedResponseMediaType()
Returns the negotiated producible media type.
|
String |
path()
Returns the path mapped by the
Route. |
Map<String,String> |
pathParams()
Returns the path parameters extracted by the
Route. |
String |
query()
Returns the query mapped by the
Route. |
int |
score()
Returns the score of this result.
|
String |
toString() |
RoutingResultType |
type()
Returns the type of this result.
|
public static RoutingResult empty()
RoutingResult whose type() is RoutingResultType.NOT_MATCHED and
isPresent() returns false. It is returned by Route.apply(RoutingContext)
when the RoutingContext did not match the conditions in the Route.public static RoutingResultBuilder builder()
public RoutingResultType type()
public boolean isPresent()
true if this result is not empty().public String path()
Route.IllegalStateException - if there's no matchpublic String decodedPath()
Route, decoded in UTF-8.IllegalStateException - if there's no matchpublic String query()
Route.null if there is no query part.IllegalStateException - if there's no matchpublic Map<String,String> pathParams()
Route.IllegalStateException - if there's no matchpublic int score()
Integer.MAX_VALUE is the highest score of the result, and Integer.MIN_VALUE is the
lowest score of the result.public boolean hasHighestScore()
public boolean hasLowestScore()
public MediaType negotiatedResponseMediaType()
Copyright © 2020 LeanCloud. All rights reserved.