Interface NMPIQueueCompat
@Path("/api/v2")
public interface NMPIQueueCompat
The REST API for the HBP Neuromorphic Platform Interface queue.
-
Method Summary
Modifier and TypeMethodDescriptionstatic NMPIQueueCompatcreateClient(String url) Get a client for the API.static com.fasterxml.jackson.jakarta.rs.json.JacksonJsonProviderCreate a JSON provider capable of handling the messages on the NMPI queue.voidfinishJob(String authHeader, int id, JobDoneCompat job) Set a job when done.Gets all jobs in the queue.getNextJob(String authHeader, String hardware) Get the next queue item for a specific hardware system.voidupdateJobLog(String authHeader, int id, NMPILog log) Update the log of a job.voidupdateJobStatus(String authHeader, int id, JobStatusOnlyCompat status) Update the status of a job.
-
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 IDlog- 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 IDstatus- 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 IDjob- The details to update
-
createClient
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.
-