Package com.linecorp.armeria.server
Class Routers
java.lang.Object
com.linecorp.armeria.server.Routers
public final class Routers extends Object
A factory that creates a
Router
instance.-
Method Summary
Modifier and Type Method Description static <T extends Service<?, ?>>
Router<T>ofCompositeService(List<CompositeServiceEntry<T>> entries)
Returns the default implementation of theRouter
to find aCompositeServiceEntry
.static Router<com.linecorp.armeria.server.RouteDecoratingService>
ofRouteDecoratingService(List<com.linecorp.armeria.server.RouteDecoratingService> routeDecoratingServices)
Returns the default implementation of theRouter
to find aRouteDecoratingService
.static Router<ServiceConfig>
ofVirtualHost(VirtualHost virtualHost, Iterable<ServiceConfig> configs, RejectedRouteHandler rejectionHandler)
Returns the default implementation of theRouter
to find aServiceConfig
.
-
Method Details
-
ofVirtualHost
public static Router<ServiceConfig> ofVirtualHost(VirtualHost virtualHost, Iterable<ServiceConfig> configs, RejectedRouteHandler rejectionHandler)Returns the default implementation of theRouter
to find aServiceConfig
. It consists of several router implementations which use one of Trie and List. It also includes cache mechanism to improve its performance. -
ofCompositeService
public static <T extends Service<?, ?>> Router<T> ofCompositeService(List<CompositeServiceEntry<T>> entries)Returns the default implementation of theRouter
to find aCompositeServiceEntry
. -
ofRouteDecoratingService
public static Router<com.linecorp.armeria.server.RouteDecoratingService> ofRouteDecoratingService(List<com.linecorp.armeria.server.RouteDecoratingService> routeDecoratingServices)Returns the default implementation of theRouter
to find aRouteDecoratingService
.
-