All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.iotdb.db.protocol.rest.PingApi Maven / Gradle / Ivy

package org.apache.iotdb.db.protocol.rest;

import org.apache.iotdb.db.protocol.rest.PingApiService;
import org.apache.iotdb.db.protocol.rest.factories.PingApiServiceFactory;

import io.swagger.annotations.ApiParam;
import io.swagger.jaxrs.*;

import org.apache.iotdb.db.protocol.rest.model.ExecutionStatus;

import java.util.Map;
import java.util.List;
import org.apache.iotdb.db.protocol.rest.NotFoundException;

import java.io.InputStream;

import org.glassfish.jersey.media.multipart.FormDataParam;
import org.glassfish.jersey.media.multipart.FormDataBodyPart;

import javax.servlet.ServletConfig;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.*;
import javax.validation.constraints.*;
import javax.validation.Valid;

@Path("/ping")


@io.swagger.annotations.Api(description = "the ping API")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen", date = "2024-04-19T16:43:24.870259+08:00[Asia/Shanghai]")
public class PingApi  {
   private final PingApiService delegate;

   public PingApi(@Context ServletConfig servletContext) {
      PingApiService delegate = null;

      if (servletContext != null) {
         String implClass = servletContext.getInitParameter("PingApi.implementation");
         if (implClass != null && !"".equals(implClass.trim())) {
            try {
               delegate = (PingApiService) Class.forName(implClass).newInstance();
            } catch (Exception e) {
               throw new RuntimeException(e);
            }
         }
      }

      if (delegate == null) {
         delegate = PingApiServiceFactory.getPingApi();
      }

      this.delegate = delegate;
   }

    @javax.ws.rs.GET
    
    
    @Produces({ "application/json" })
    @io.swagger.annotations.ApiOperation(value = "", notes = "", response = ExecutionStatus.class, authorizations = {
        @io.swagger.annotations.Authorization(value = "basic")
    }, tags={  })
    @io.swagger.annotations.ApiResponses(value = {
        @io.swagger.annotations.ApiResponse(code = 200, message = "ExecutionStatus", response = ExecutionStatus.class)
    })
    public Response tryPing(@Context SecurityContext securityContext)
    throws NotFoundException {
        return delegate.tryPing(securityContext);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy