use of com.hotels.styx.common.http.handler.StaticBodyHttpHandler in project styx by ExpediaGroup.
the class AdminServerBuilder method extensionEndpoints.
private static List<Route> extensionEndpoints(String root, String name, Map<String, HttpHandler> endpoints) {
List<AdminEndpointRoute> routes = extensionAdminEndpointRoutes(root, name, endpoints);
List<IndexHandler.Link> endpointLinks = routes.stream().map(AdminEndpointRoute::link).collect(toList());
WebServiceHandler handler = endpointLinks.isEmpty() ? new StaticBodyHttpHandler(HTML, format("This plugin (%s) does not expose any admin interfaces", name)) : new IndexHandler(endpointLinks);
Route indexRoute = new Route(adminPath(root, name), new HttpAggregator(MEGABYTE, handler));
return concatenate(indexRoute, routes);
}
Aggregations