Package com.linecorp.armeria.server
Interface Router<V>
public interface Router<V>
Finds a mapping that matches a given
RoutingContext.-
Method Summary
Modifier and TypeMethodDescriptionvoiddump(OutputStream output) Dumps the content of thisRouter.find(RoutingContext routingCtx) Finds the value of mapping that matches the specifiedRoutingContext.findAll(RoutingContext routingCtx) Finds all values of mapping that match the specifiedRoutingContext.default booleanregisterMetrics(MeterRegistry registry, MeterIdPrefix idPrefix) Registers the stats of thisRouterto the specifiedMeterRegistry.
-
Method Details
-
find
Finds the value of mapping that matches the specifiedRoutingContext.- Returns:
- a
Routedthat 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
Routedinstances that wrap the matching value.
-
registerMetrics
Registers the stats of thisRouterto the specifiedMeterRegistry.- Returns:
- whether the stats of this
Routerhas been registered.
-
dump
Dumps the content of thisRouter.
-