Skip to content

Commit

Permalink
handledRoutes -> routes
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymode committed Feb 7, 2020
1 parent 2653271 commit 086a295
Show file tree
Hide file tree
Showing 318 changed files with 335 additions and 335 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
public class RestNoopBulkAction extends BaseRestHandler {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return unmodifiableList(asList(
new Route(POST, "/_noop_bulk"),
new Route(PUT, "/_noop_bulk"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
public class RestNoopSearchAction extends BaseRestHandler {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return unmodifiableList(asList(
new Route(GET, "/_noop_search"),
new Route(POST, "/_noop_search"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ protected void doExecute(Task task, Request request, ActionListener<Response> li
public static class RestAction extends BaseRestHandler {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return singletonList(new Route(GET, "/_ingest/processor/grok"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public RestMultiSearchTemplateAction(Settings settings) {
}

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return unmodifiableList(asList(
new Route(GET, "/_msearch/template"),
new Route(POST, "/_msearch/template"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
public class RestRenderSearchTemplateAction extends BaseRestHandler {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return unmodifiableList(asList(
new Route(GET, "/_render/template"),
new Route(POST, "/_render/template"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class RestSearchTemplateAction extends BaseRestHandler {
}

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return unmodifiableList(asList(
new Route(GET, "/_search/template"),
new Route(POST, "/_search/template"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ protected void doExecute(Task task, Request request, ActionListener<Response> li
public static class RestAction extends BaseRestHandler {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return singletonList(new Route(GET, "/_scripts/painless/_context"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ private static Response prepareRamIndex(Request request,
public static class RestAction extends BaseRestHandler {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return unmodifiableList(asList(
new Route(GET, "/_scripts/painless/_execute"),
new Route(POST, "/_scripts/painless/_execute")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public class RestRankEvalAction extends BaseRestHandler {
public static String ENDPOINT = "_rank_eval";

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return unmodifiableList(asList(
new Route(GET, "/" + ENDPOINT),
new Route(POST, "/" + ENDPOINT),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public RestDeleteByQueryAction() {
}

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return singletonList(new Route(POST, "/{index}/_delete_by_query"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public RestReindexAction() {
}

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return singletonList(new Route(POST, "/_reindex"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public RestRethrottleAction(Supplier<DiscoveryNodes> nodesInCluster) {
}

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return unmodifiableList(asList(
new Route(POST, "/_update_by_query/{taskId}/_rethrottle"),
new Route(POST, "/_delete_by_query/{taskId}/_rethrottle"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public RestUpdateByQueryAction() {
}

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return singletonList(new Route(POST, "/{index}/_update_by_query"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
public class ExampleCatAction extends AbstractCatAction {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return unmodifiableList(asList(
new Route(GET, "/_cat/example"),
new Route(POST, "/_cat/example")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class RestDieWithDignityAction extends BaseRestHandler {
RestDieWithDignityAction() {}

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return singletonList(new Route(GET, "/_die_with_dignity"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public String getName() {
}

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return Collections.emptyList();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
public class TestResponseHeaderRestAction extends BaseRestHandler {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return singletonList(new Route(GET, "/_protected"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public final long getUsageCount() {
* {@inheritDoc}
*/
@Override
public abstract List<Route> handledRoutes();
public abstract List<Route> routes();

@Override
public final void handleRequest(RestRequest request, RestChannel channel, NodeClient client) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ protected void registerHandler(RestRequest.Method method, String path, RestHandl
* and {@code path} combinations.
*/
public void registerHandler(final RestHandler restHandler) {
restHandler.handledRoutes().forEach(route -> registerHandler(route.getMethod(), route.getPath(), restHandler));
restHandler.routes().forEach(route -> registerHandler(route.getMethod(), route.getPath(), restHandler));
restHandler.deprecatedRoutes().forEach(route ->
registerAsDeprecatedHandler(route.getMethod(), route.getPath(), restHandler, route.getDeprecationMessage(), route.getLogger()));
restHandler.replacedRoutes().forEach(route -> registerWithDeprecatedHandler(route.getMethod(), route.getPath(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ default boolean allowsUnsafeBuffers() {
/**
* The list of {@link Route}s that this RestHandler is responsible for handling.
*/
default List<Route> handledRoutes() {
default List<Route> routes() {
return Collections.emptyList();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
public class RestFieldCapabilitiesAction extends BaseRestHandler {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return unmodifiableList(asList(
new Route(GET, "/_field_caps"),
new Route(POST, "/_field_caps"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
public class RestMainAction extends BaseRestHandler {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return unmodifiableList(asList(
new Route(GET, "/"),
new Route(HEAD, "/")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public String getName() {
}

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return singletonList(new Route(POST, "/_cluster/voting_config_exclusions/{node_name}"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public String getName() {
}

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return unmodifiableList(asList(new Route(POST, "/_tasks/_cancel"),
new Route(POST, "/_tasks/{task_id}/_cancel")));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
public class RestCleanupRepositoryAction extends BaseRestHandler {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return singletonList(new Route(POST, "/_snapshot/{repository}/_cleanup"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
public class RestClearVotingConfigExclusionsAction extends BaseRestHandler {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return singletonList(new Route(DELETE, "/_cluster/voting_config_exclusions"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
public class RestClusterAllocationExplainAction extends BaseRestHandler {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return unmodifiableList(asList(
new Route(GET, "/_cluster/allocation/explain"),
new Route(POST, "/_cluster/allocation/explain")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public RestClusterGetSettingsAction(Settings settings, ClusterSettings clusterSe
}

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return singletonList(new Route(GET, "/_cluster/settings"));
}
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
public class RestClusterHealthAction extends BaseRestHandler {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return unmodifiableList(asList(new Route(GET, "/_cluster/health"),
new Route(GET, "/_cluster/health/{index}")));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public RestClusterRerouteAction(SettingsFilter settingsFilter) {
}

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return singletonList(new Route(POST, "/_cluster/reroute"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
public class RestClusterSearchShardsAction extends BaseRestHandler {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return unmodifiableList(asList(
new Route(GET, "/_search_shards"),
new Route(POST, "/_search_shards"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public String getName() {
}

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return unmodifiableList(asList(
new Route(GET, "/_cluster/state"),
new Route(GET, "/_cluster/state/{metric}"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
public class RestClusterStatsAction extends BaseRestHandler {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return unmodifiableList(asList(
new Route(GET, "/_cluster/stats"),
new Route(GET, "/_cluster/stats/nodes/{nodeId}")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class RestClusterUpdateSettingsAction extends BaseRestHandler {
private static final String TRANSIENT = "transient";

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return singletonList(new Route(PUT, "/_cluster/settings"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
public class RestCreateSnapshotAction extends BaseRestHandler {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return unmodifiableList(asList(
new Route(PUT, "/_snapshot/{repository}/{snapshot}"),
new Route(POST, "/_snapshot/{repository}/{snapshot}")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
public class RestDeleteRepositoryAction extends BaseRestHandler {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return singletonList(new Route(DELETE, "/_snapshot/{repository}"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
public class RestDeleteSnapshotAction extends BaseRestHandler {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return singletonList(new Route(DELETE, "/_snapshot/{repository}/{snapshot}"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
public class RestDeleteStoredScriptAction extends BaseRestHandler {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return singletonList(new Route(DELETE, "/_scripts/{id}"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public String getName() {
}

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return unmodifiableList(asList(
new Route(GET, "/_snapshot"),
new Route(GET, "/_snapshot/{repository}")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
public class RestGetScriptContextAction extends BaseRestHandler {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return singletonList(new Route(GET, "/_script_context"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
public class RestGetScriptLanguageAction extends BaseRestHandler {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return singletonList(new Route(GET, "/_script_language"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
public class RestGetSnapshotsAction extends BaseRestHandler {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return singletonList(new Route(GET, "/_snapshot/{repository}/{snapshot}"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
public class RestGetStoredScriptAction extends BaseRestHandler {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return singletonList(new Route(GET, "/_scripts/{id}"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
public class RestGetTaskAction extends BaseRestHandler {

@Override
public List<Route> handledRoutes() {
public List<Route> routes() {
return singletonList(new Route(GET, "/_tasks/{task_id}"));
}

Expand Down
Loading

0 comments on commit 086a295

Please sign in to comment.