Interface NMPIQueueCompat


@Path("/api/v2") public interface NMPIQueueCompat
The REST API for the HBP Neuromorphic Platform Interface queue.
  • Method Details

    • getJobs

      @GET @Path("queue/") @Produces("application/json") JobListCompat getJobs(@HeaderParam("Authorization") String authHeader, @QueryParam("hardware") String hardware, @QueryParam("status") String status)
      Gets all jobs in the queue.
      Parameters:
      authHeader - The authorization header.
      hardware - The hardware to request the jobs for.
      status - The accepted status.
      Returns:
      The list of jobs that meet the criteria.
    • getNextJob

      @GET @Path("queue/submitted/next/{hardware}/") @Produces("application/json") QueueNextResponse getNextJob(@HeaderParam("Authorization") String authHeader, @PathParam("hardware") String hardware)
      Get the next queue item for a specific hardware system.
      Parameters:
      authHeader - The authorization header.
      hardware - The hardware ID.
      Returns:
      The queue item.
    • updateJobLog

      @PUT @Path("log/{id}") @Consumes("application/json") void updateJobLog(@HeaderParam("Authorization") String authHeader, @PathParam("id") int id, NMPILog log)
      Update the log of a job.
      Parameters:
      authHeader - The authorization header.
      id - The queue ID
      log - the Job Log.
    • updateJobStatus

      @PUT @Path("queue/{id}") @Consumes("application/json") void updateJobStatus(@HeaderParam("Authorization") String authHeader, @PathParam("id") int id, JobStatusOnlyCompat status)
      Update the status of a job.
      Parameters:
      authHeader - The authorization header.
      id - The queue ID
      status - the Job Status.
    • finishJob

      @PUT @Path("queue/{id}") @Consumes("application/json") void finishJob(@HeaderParam("Authorization") String authHeader, @PathParam("id") int id, JobDoneCompat job)
      Set a job when done.
      Parameters:
      authHeader - The authorization header.
      id - The queue ID
      job - The details to update
    • createClient

      static NMPIQueueCompat 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.