コード例 #1
0
 @Inject
 public RestMainAction(
     Settings settings, Version version, Client client, RestController controller) {
   super(settings, client);
   this.version = version;
   controller.registerHandler(GET, "/", this);
   controller.registerHandler(HEAD, "/", this);
 }
コード例 #2
0
 @Inject
 public RestAnalyzeAction(Settings settings, Client client, RestController controller) {
   super(settings, client);
   controller.registerHandler(GET, "/_analyze", this);
   controller.registerHandler(GET, "/{index}/_analyze", this);
   controller.registerHandler(POST, "/_analyze", this);
   controller.registerHandler(POST, "/{index}/_analyze", this);
 }
コード例 #3
0
 @Inject
 public RestGetAliasesAction(Settings settings, Client client, RestController controller) {
   super(settings, client);
   controller.registerHandler(GET, "/_alias/", this);
   controller.registerHandler(GET, "/_alias/{name}", this);
   controller.registerHandler(GET, "/{index}/_alias/{name}", this);
   controller.registerHandler(GET, "/{index}/_alias", this);
 }
コード例 #4
0
  @Inject
  public RestGetSettingsAction(
      Settings settings, Client client, RestController controller, SettingsFilter settingsFilter) {
    super(settings, client);
    controller.registerHandler(GET, "/_settings", this);
    controller.registerHandler(GET, "/{index}/_settings", this);

    this.settingsFilter = settingsFilter;
  }
コード例 #5
0
 @Inject
 public RestIndicesStatsAction(Settings settings, RestController controller, Client client) {
   super(settings, controller, client);
   controller.registerHandler(GET, "/_stats", this);
   controller.registerHandler(GET, "/_stats/{metric}", this);
   controller.registerHandler(GET, "/_stats/{metric}/{indexMetric}", this);
   controller.registerHandler(GET, "/{index}/_stats", this);
   controller.registerHandler(GET, "/{index}/_stats/{metric}", this);
 }
コード例 #6
0
 @Override
 public final void handleRequest(RestRequest request, RestChannel channel) throws Exception {
   handleRequest(
       request,
       channel,
       new HeadersAndContextCopyClient(client, request, controller.relevantHeaders()));
 }
コード例 #7
0
  @Inject
  public DropboxHelpAction(Settings settings, Client client, RestController controller) {
    super(settings, client);

    // Define Dropbox REST Endpoints
    controller.registerHandler(Method.GET, "/_dropbox/", this);
  }
コード例 #8
0
  @Inject
  public RestGetIndexTemplateAction(
      Settings settings, Client client, RestController controller, SettingsFilter settingsFilter) {
    super(settings, client);
    this.settingsFilter = settingsFilter;

    controller.registerHandler(GET, "/_template/{name}", this);
  }
コード例 #9
0
  @Inject
  public RestIndicesExistsAction(
      Settings settings, Client client, RestController controller, SettingsFilter settingsFilter) {
    super(settings, client);
    controller.registerHandler(HEAD, "/{index}", this);

    this.settingsFilter = settingsFilter;
  }
コード例 #10
0
 protected RestDeleteIndexedScriptAction(
     Settings settings,
     RestController controller,
     boolean registerDefaultHandlers,
     Client client) {
   super(settings, controller, client);
   if (registerDefaultHandlers) {
     controller.registerHandler(DELETE, "/_scripts/{lang}/{id}", this);
   }
 }
コード例 #11
0
  @Inject
  public RestNodesStatsAction(Settings settings, Client client, RestController controller) {
    super(settings, client);
    controller.registerHandler(GET, "/_nodes/stats", this);
    controller.registerHandler(GET, "/_nodes/{nodeId}/stats", this);

    controller.registerHandler(GET, "/_nodes/stats/{metric}", this);
    controller.registerHandler(GET, "/_nodes/{nodeId}/stats/{metric}", this);

    controller.registerHandler(GET, "/_nodes/stats/{metric}/{indexMetric}", this);
    controller.registerHandler(GET, "/_nodes/stats/{metric}/{indexMetric}/{fields}", this);

    controller.registerHandler(GET, "/_nodes/{nodeId}/stats/{metric}/{indexMetric}", this);
    controller.registerHandler(GET, "/_nodes/{nodeId}/stats/{metric}/{indexMetric}/{fields}", this);
  }
コード例 #12
0
 @Inject
 public RestClusterSearchShardsAction(
     Settings settings, Client client, RestController controller) {
   super(settings, client);
   controller.registerHandler(GET, "/_search_shards", this);
   controller.registerHandler(POST, "/_search_shards", this);
   controller.registerHandler(GET, "/{index}/_search_shards", this);
   controller.registerHandler(POST, "/{index}/_search_shards", this);
   controller.registerHandler(GET, "/{index}/{type}/_search_shards", this);
   controller.registerHandler(POST, "/{index}/{type}/_search_shards", this);
 }
コード例 #13
0
  @Inject
  public RestMultiSearchAction(Settings settings, Client client, RestController controller) {
    super(settings, client);

    controller.registerHandler(GET, "/_msearch", this);
    controller.registerHandler(POST, "/_msearch", this);
    controller.registerHandler(GET, "/{index}/_msearch", this);
    controller.registerHandler(POST, "/{index}/_msearch", this);
    controller.registerHandler(GET, "/{index}/{type}/_msearch", this);
    controller.registerHandler(POST, "/{index}/{type}/_msearch", this);

    this.allowExplicitIndex = settings.getAsBoolean("rest.action.multi.allow_explicit_index", true);
  }
コード例 #14
0
 @Inject
 public RestNodesAction(Settings settings, RestController controller, Client client) {
   super(settings, controller, client);
   controller.registerHandler(GET, "/_cat/nodes", this);
 }
コード例 #15
0
 @Inject
 public RestUpdateAction(Settings settings, Client client, RestController controller) {
   super(settings, client);
   controller.registerHandler(POST, "/{index}/{type}/{id}/_update", this);
 }
コード例 #16
0
 @Inject
 public RestPutRepositoryAction(Settings settings, RestController controller, Client client) {
   super(settings, controller, client);
   controller.registerHandler(PUT, "/_snapshot/{repository}", this);
   controller.registerHandler(POST, "/_snapshot/{repository}", this);
 }
コード例 #17
0
 @Inject
 public RestIndicesAliasesAction(Settings settings, Client client, RestController controller) {
   super(settings, client);
   controller.registerHandler(POST, "/_aliases", this);
 }
コード例 #18
0
 @Inject
 public RestExplainAction(Settings settings, Client client, RestController controller) {
   super(settings, client);
   controller.registerHandler(GET, "/{index}/{type}/{id}/_explain", this);
 }
コード例 #19
0
 @Inject
 public RestDeleteMappingAction(Settings settings, Client client, RestController controller) {
   super(settings, client);
   controller.registerHandler(DELETE, "/{index}/{type}/_mapping", this);
   controller.registerHandler(DELETE, "/{index}/{type}", this);
 }
コード例 #20
0
 @Inject
 public RestDeleteIndexAction(Settings settings, Client client, RestController controller) {
   super(settings, client);
   controller.registerHandler(RestRequest.Method.DELETE, "/", this);
   controller.registerHandler(RestRequest.Method.DELETE, "/{index}", this);
 }
コード例 #21
0
 @Inject
 public RestTypesExistsAction(Settings settings, Client client, RestController controller) {
   super(settings, client);
   controller.registerHandler(HEAD, "/{index}/{type}", this);
 }
コード例 #22
0
 @Inject
 public RestPutWarmerAction(Settings settings, Client client, RestController controller) {
   super(settings, client);
   controller.registerHandler(PUT, "/{index}/_warmer/{name}", this);
   controller.registerHandler(PUT, "/{index}/{type}/_warmer/{name}", this);
 }
コード例 #23
0
 @Inject
 public RestClusterGetSettingsAction(Settings settings, Client client, RestController controller) {
   super(settings, client);
   controller.registerHandler(RestRequest.Method.GET, "/_cluster/settings", this);
 }
コード例 #24
0
 @Inject
 public RestPutIndexTemplateAction(Settings settings, Client client, RestController controller) {
   super(settings, client);
   controller.registerHandler(RestRequest.Method.PUT, "/_template/{name}", this);
   controller.registerHandler(RestRequest.Method.POST, "/_template/{name}", new CreateHandler());
 }
コード例 #25
0
 @Inject
 public RestBroadcastPingAction(Settings settings, Client client, RestController controller) {
   super(settings, client);
   controller.registerHandler(RestRequest.Method.GET, "/{index}/_ping/broadcast", this);
   controller.registerHandler(RestRequest.Method.GET, "/_cluster/{index}/_ping/broadcast", this);
 }