Package fr.gouv.vitam.worker.server.rest
Class WorkerResource
- java.lang.Object
-
- fr.gouv.vitam.common.server.application.resources.ApplicationStatusResource
-
- fr.gouv.vitam.worker.server.rest.WorkerResource
-
@Path("/worker/v1") public class WorkerResource extends ApplicationStatusResourceWorker Resource implementation
-
-
Field Summary
Fields Modifier and Type Field Description WorkerFactoryWORKER_FACTORYthe worker factory-
Fields inherited from class fr.gouv.vitam.common.server.application.resources.ApplicationStatusResource
STATUS_URL, TENANTS_URL
-
-
Constructor Summary
Constructors Constructor Description WorkerResource(PluginLoader pluginLoader)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.ResponsegetStepsList()Get a list of running stepsjavax.ws.rs.core.ResponsegetStepStatus(java.lang.String idAsync)Get the status of a stepjavax.ws.rs.core.ResponsemodifyStep(java.lang.String idAsync)Modifying a step (pausing, resuming, prioritizing)javax.ws.rs.core.ResponsesubmitStep(javax.ws.rs.core.HttpHeaders headers, com.fasterxml.jackson.databind.JsonNode descriptionStepJson)Submit a step to be launched-
Methods inherited from class fr.gouv.vitam.common.server.application.resources.ApplicationStatusResource
getServerTenants, status
-
-
-
-
Field Detail
-
WORKER_FACTORY
public final WorkerFactory WORKER_FACTORY
the worker factory
-
-
Constructor Detail
-
WorkerResource
public WorkerResource(PluginLoader pluginLoader)
Constructor- Parameters:
pluginLoader- the plugin loader
-
-
Method Detail
-
getStepsList
@Path("tasks") @GET @Produces("application/json") @Consumes("application/json") public javax.ws.rs.core.Response getStepsList()Get a list of running steps- Returns:
- Response containing the list of steps
-
submitStep
@Path("tasks") @POST @Produces("application/json") @Consumes("application/json") public javax.ws.rs.core.Response submitStep(@Context javax.ws.rs.core.HttpHeaders headers, com.fasterxml.jackson.databind.JsonNode descriptionStepJson)Submit a step to be launched- Parameters:
headers- http headerdescriptionStepJson- the description of the step as a {fr.gouv.vitam.worker.common.DescriptionStep}- Returns:
- Response containing the status of the step
-
getStepStatus
@Path("tasks/{id_async}") @GET @Produces("application/json") public javax.ws.rs.core.Response getStepStatus(@PathParam("id_async") java.lang.String idAsync)Get the status of a step- Parameters:
idAsync- the id of the Async- Returns:
- Response containing the status of a specific step
-
modifyStep
@Path("tasks/{id_async}") @PUT @Produces("application/json") @Consumes("application/json") public javax.ws.rs.core.Response modifyStep(@PathParam("id_async") java.lang.String idAsync)Modifying a step (pausing, resuming, prioritizing)- Parameters:
idAsync- the id of the Async- Returns:
- Response containing the status of the step
-
-