Package fr.gouv.vitam.ihmrecette.appserver.performance

# Class PerformanceResource

java.lang.Object
fr.gouv.vitam.ihmrecette.appserver.performance.PerformanceResource

@Path("/v1/api/performances") public class PerformanceResource extends Object
resource defining performance

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PerformanceResource(PerformanceService performanceService)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `jakarta.ws.rs.core.Response`
  `launchPerformanceTest(int tenantId, PerformanceModel model)`
  `jakarta.ws.rs.core.Response`
  `listReport()`
  return the list of report
  `jakarta.ws.rs.core.Response`
  `listSip()`
  return the list of sip
  `jakarta.ws.rs.core.Response`
  `report(String fileName)`
  return the report
  `jakarta.ws.rs.core.Response`
  `status()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PerformanceResource

    public PerformanceResource(PerformanceService performanceService)

- ## Method Details

  - ### launchPerformanceTest

    @POST @Consumes("application/json") public jakarta.ws.rs.core.Response launchPerformanceTest(@HeaderParam("X-Tenant-Id") int tenantId, PerformanceModel model)
    Parameters:
      `model` -
    Returns:
      Response
    Throws:
      `InterruptedException`
      `FileNotFoundException`

  - ### status

    @HEAD public jakarta.ws.rs.core.Response status()
    Returns:
      202 if test are in progress, 200 if the previous test are done

  - ### listReport

    @GET @Path("/reports") @Produces("application/json") public jakarta.ws.rs.core.Response listReport() throws IOException
    return the list of report
    Returns:
      Response 200 if get list of report
    Throws:
      `IOException`

  - ### listSip

    @GET @Path("/sips") @Produces("application/json") public jakarta.ws.rs.core.Response listSip() throws IOException
    return the list of sip
    Returns:
      list of sip with relative path
    Throws:
      `IOException`

  - ### report

    @GET @Path("/reports/{fileName}") @Produces("text/plain") public jakarta.ws.rs.core.Response report(@PathParam("fileName") String fileName)
    return the report
    Parameters:
      `fileName` - report fileName
    Returns:
      200 if report is ok, 404 if exception occurs
    Throws:
      `IOException`