Package com.linecorp.armeria.server
Interface Router<V>
public interface Router<V>
Finds a mapping that matches a given
RoutingContext
.-
Method Summary
Modifier and Type Method Description void
dump(OutputStream output)
Dumps the content of thisRouter
.Routed<V>
find(RoutingContext routingCtx)
Finds the value of mapping that matches the specifiedRoutingContext
.List<Routed<V>>
findAll(RoutingContext routingCtx)
Finds all values of mapping that match the specifiedRoutingContext
.default boolean
registerMetrics(MeterRegistry registry, MeterIdPrefix idPrefix)
Registers the stats of thisRouter
to the specifiedMeterRegistry
.
-
Method Details
-
find
Finds the value of mapping that matches the specifiedRoutingContext
.- Returns:
- a
Routed
that wraps the matching value if there's a match.Routed.empty()
if there's no match.
-
findAll
Finds all values of mapping that match the specifiedRoutingContext
.- Returns:
- the
Routed
instances that wrap the matching value.
-
registerMetrics
Registers the stats of thisRouter
to the specifiedMeterRegistry
.- Returns:
- whether the stats of this
Router
has been registered.
-
dump
Dumps the content of thisRouter
.
-