Package com.linecorp.armeria.server
Class Routed<T>
java.lang.Object
com.linecorp.armeria.server.Routed<T>
- Type Parameters:
T
- the type of the mapped value
public final class Routed<T> extends Object
A value mapped by
Router
.-
Method Summary
Modifier and Type Method Description static <T> Routed<T>
empty()
Returns a singleton instance of aRouted
that represents a non-existent value.boolean
isPresent()
Returnstrue
ifRouter
found a matching value.Route
route()
Returns theRoute
which matched theRoutingContext
.RoutingResult
routingResult()
Returns theRoutingResult
.RoutingResultType
routingResultType()
Returns the type ofRoutingResult
.String
toString()
T
value()
Returns the value.
-
Method Details
-
empty
Returns a singleton instance of aRouted
that represents a non-existent value. -
isPresent
public boolean isPresent()Returnstrue
ifRouter
found a matching value. -
route
Returns theRoute
which matched theRoutingContext
.- Throws:
IllegalStateException
- if there's no match
-
routingResult
Returns theRoutingResult
.- Throws:
IllegalStateException
- if there's no match
-
routingResultType
Returns the type ofRoutingResult
. -
value
Returns the value.- Throws:
IllegalStateException
- if there's no match
-
toString
-