Interface NMPIQueue


public interface NMPIQueue
The REST API for the HBP Neuromorphic Platform Interface queue.
  • Method Details

    • getJobs

      @GET @Path("jobs/") @Produces("application/json") List<QueueJobCompat> getJobs(@HeaderParam("x-api-key") String apiKey, @QueryParam("hardware") String hardware, @QueryParam("status") List<String> status)
      Gets all jobs in the queue.
      Parameters:
      apiKey - The API key to use.
      hardware - The hardware to request the jobs for.
      status - List of accepted statuses.
      Returns:
      The list of jobs that meet the criteria.
    • getNextJob

      @GET @Path("jobs/next/{hardware}") @Produces("application/json") QueueNextResponse getNextJob(@HeaderParam("x-api-key") String apiKey, @PathParam("hardware") String hardware)
      Get the next queue item for a specific hardware system.
      Parameters:
      apiKey - The API key to use.
      hardware - The hardware ID.
      Returns:
      The queue item.
    • updateJobLog

      @PUT @Path("jobs/{id}") @Consumes("application/json") void updateJobLog(@HeaderParam("x-api-key") String apiKey, @PathParam("id") int id, JobLogOnly log)
      Update the log of a job.
      Parameters:
      apiKey - The API key to use.
      id - The queue ID
      log - the Job Log.
    • updateJobStatus

      @PUT @Path("jobs/{id}") @Consumes("application/json") void updateJobStatus(@HeaderParam("x-api-key") String apiKey, @PathParam("id") int id, JobStatusOnly status)
      Update the status of a job.
      Parameters:
      apiKey - The API key to use.
      id - The queue ID
      status - the Job Status.
    • finishJob

      @PUT @Path("jobs/{id}") @Consumes("application/json") void finishJob(@HeaderParam("x-api-key") String apiKey, @PathParam("id") int id, JobDone job)
      Set a job when done.
      Parameters:
      apiKey - The API key to use.
      id - The queue ID
      job - The details to update
    • createClient

      static NMPIQueue createClient(String url)
      Get a client for the API.
      Parameters:
      url - The URL to connect to.
      Returns:
      A proxy of the API.
    • createProvider

      static com.fasterxml.jackson.jakarta.rs.json.JacksonJsonProvider createProvider()
      Create a JSON provider capable of handling the messages on the NMPI queue.
      Returns:
      The provider.