Class RestSmartExecutor

java.lang.Object
org.gcube.vremanagement.executor.rest.RestSmartExecutor

@Path("plugins") public class RestSmartExecutor extends Object
  • Field Details

  • Constructor Details

    • RestSmartExecutor

      public RestSmartExecutor()
  • Method Details

    • setCalledMethod

      protected void setCalledMethod(String calledMethod)
    • addLocation

      protected jakarta.ws.rs.core.Response.ResponseBuilder addLocation(jakarta.ws.rs.core.Response.ResponseBuilder responseBuilder, String id)
    • getAvailablePlugins

      @GET @Produces("application/json") public String getAvailablePlugins() throws org.gcube.vremanagement.executor.exception.ExecutorException
      Returns the definitions of the plugins this instance holds.
      Throws:
      org.gcube.vremanagement.executor.exception.ExecutorException
    • getScheduled

      @GET @Path("/{NAME}/executions") @Produces("application/json") public String getScheduled(@PathParam("NAME") String pluginName) throws org.gcube.vremanagement.executor.exception.ExecutorException
      Returns the scheduled tasks of a plugin.
      Throws:
      org.gcube.vremanagement.executor.exception.ExecutorException
    • launch

      @POST @Path("/{NAME}/executions") @Consumes({"text/plain","application/json"}) @Produces("text/plain") public String launch(@PathParam("NAME") String pluginName, String launchParameterString) throws org.gcube.vremanagement.executor.exception.ExecutorException
      Launches the plugin with the given launch parameter and returns the UUID of the scheduled task.
      Throws:
      org.gcube.vremanagement.executor.exception.ExecutorException
    • getLaunchState

      @GET @Path("/{NAME}/executions/{UUID}") @Produces("application/json") public String getLaunchState(@PathParam("NAME") String pluginName, @PathParam("UUID") String executionIdentifier, @QueryParam("iteration") Integer iteration) throws org.gcube.vremanagement.executor.exception.ExecutorException
      Returns the state of an execution of a scheduled task.
      Throws:
      org.gcube.vremanagement.executor.exception.ExecutorException
    • delete

      @DELETE @Path("/{NAME}/executions/{UUID}") public jakarta.ws.rs.core.Response delete(@PathParam("NAME") String pluginName, @PathParam("UUID") String executionIdentifier, @QueryParam("unschedule") Boolean unschedule) throws org.gcube.vremanagement.executor.exception.ExecutorException
      Stops the running execution of a scheduled task and, on request, removes its scheduling.
      Throws:
      org.gcube.vremanagement.executor.exception.ExecutorException
    • ownerOf

      protected String ownerOf(UUID uuid)
      Parameters:
      uuid - the UUID of a task
      Returns:
      who launched the task, from the scheduler while it is scheduled here or from the persisted scheduled task, null when it is not known
    • purge

      @Path("/{NAME}/executions/{UUID}") public jakarta.ws.rs.core.Response purge(@PathParam("NAME") String pluginName, @PathParam("UUID") String executionIdentifier) throws org.gcube.vremanagement.executor.exception.ExecutorException
      Stops the running execution of a scheduled task and removes its scheduling.
      Throws:
      org.gcube.vremanagement.executor.exception.ExecutorException