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
A value mapped by
Router
.-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Routed<T>
empty()
Returns a singleton instance of aRouted
that represents a non-existent value.boolean
Returnstrue
ifRouter
found a matching value.route()
Returns theRoute
which matched theRoutingContext
.Returns theRoutingResult
.Returns the type ofRoutingResult
.toString()
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
-