Interface SpallocServiceAPI.JobAPI
- Enclosing interface:
- SpallocServiceAPI
@Path("jobs/{id}") public static interface SpallocServiceAPI.JobAPI
Interface to a particular job.
- Author:
- Donal Fellows
-
Method Summary
Modifier and Type Method Description Response
deleteJob(String reason)
Delete the job, or at least mark it as destroyed.WhereIsResponse
getJobChipLocation(@uk.ac.manchester.spinnaker.machine.ValidX int x, @uk.ac.manchester.spinnaker.machine.ValidY int y)
Get the location description of a board given the job-local coordinates of a chip on that board.SubMachineResponse
getMachine()
Get a description of the (sub-)machine of the job.MachinePower
getMachinePower()
Get the current power state of the job's sub-machine.void
getState(boolean wait, AsyncResponse response)
Describe the basic info about a job.String
keepAlive(String req)
Keep the job alive.void
reportBoardIssue(IssueReportRequest report, AsyncResponse response)
Report an issue with some boards.void
setMachinePower(@NotNull @Valid MachinePower req, AsyncResponse response)
Set the power state of the job's sub-machine.
-
Method Details
-
getState
@GET @Path("/") @Produces("application/json") void getState(@QueryParam("wait") @DefaultValue("false") boolean wait, @Suspended AsyncResponse response)Describe the basic info about a job.- Parameters:
wait
- Whether to wait for a change.response
- Filled out with aJobStateResponse
.
-
keepAlive
@PUT @Path("keepalive") @Consumes("text/plain") @Produces("text/plain") String keepAlive(String req)Keep the job alive.- Parameters:
req
- Arbitrary ignored text- Returns:
- A constant response
-
deleteJob
@DELETE @Path("/") @Produces("application/json") Response deleteJob(@QueryParam("reason") @DefaultValue("") String reason)Delete the job, or at least mark it as destroyed.- Parameters:
reason
- Why the job is destroyed- Returns:
- No content
-
getMachine
Get a description of the (sub-)machine of the job.- Returns:
- An allocated sub-machine description
-
getMachinePower
Get the current power state of the job's sub-machine.- Returns:
- A power descriptor
-
setMachinePower
@POST @Path("machine/power") @Consumes("application/json") @Produces("application/json") void setMachinePower(@NotNull @Valid @NotNull @Valid MachinePower req, @Suspended AsyncResponse response)Set the power state of the job's sub-machine. Note that the actual change may (will!) take time to process.- Parameters:
req
- What to change to.response
- Filled out with aMachinePower
.
-
getJobChipLocation
@GET @Path("chip") @Produces("application/json") WhereIsResponse getJobChipLocation(@QueryParam("x") @DefaultValue("0") @ValidX @uk.ac.manchester.spinnaker.machine.ValidX int x, @QueryParam("y") @DefaultValue("0") @ValidY @uk.ac.manchester.spinnaker.machine.ValidY int y)Get the location description of a board given the job-local coordinates of a chip on that board.- Parameters:
x
- Chip X coordinatey
- Chip Y coordinate- Returns:
- A board location description
-
reportBoardIssue
@POST @Path("report-issue") @Consumes("application/json") @Produces("application/json") void reportBoardIssue(IssueReportRequest report, @Suspended AsyncResponse response)Report an issue with some boards.- Parameters:
report
- The problem description.response
- Filled out with anIssueReportResponse
.
-