Package com.linecorp.armeria.server
Class Routed<T>
- java.lang.Object
-
- com.linecorp.armeria.server.Routed<T>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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
.String
toString()
T
value()
Returns the value.
-
-
-
Method Detail
-
empty
public static <T> Routed<T> empty()
Returns a singleton instance of aRouted
that represents a non-existent value.
-
isPresent
public boolean isPresent()
Returnstrue
ifRouter
found a matching value.
-
route
public Route route()
Returns theRoute
which matched theRoutingContext
.- Throws:
IllegalStateException
- if there's no match
-
routingResult
public RoutingResult routingResult()
Returns theRoutingResult
.- Throws:
IllegalStateException
- if there's no match
-
value
public T value()
Returns the value.- Throws:
IllegalStateException
- if there's no match
-
-