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 aRoutedthat represents a non-existent value.booleanReturnstrueifRouterfound a matching value.route()Returns theRoutewhich matched theRoutingContext.Returns theRoutingResult.Returns the type ofRoutingResult.toString()value()Returns the value.
-
Method Details
-
empty
Returns a singleton instance of aRoutedthat represents a non-existent value. -
isPresent
public boolean isPresent()ReturnstrueifRouterfound a matching value. -
route
Returns theRoutewhich 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
-