Class LongTaskResource


  • public class LongTaskResource
    extends Object
    REST wrapper for the LongTaskService.
    • Constructor Detail

      • LongTaskResource

        public LongTaskResource​(LongTaskService longTaskService)
    • Method Detail

      • getTasks

        public RestList<LongTaskStatus> getTasks​(String expand,
                                                 int start,
                                                 int limit,
                                                 @Context
                                                 javax.ws.rs.core.UriInfo uriInfo)

        Returns information about all tracked long-running tasks.

        Parameters:
        expand - a comma separated list of properties to expand on the tasks
        Returns:
        a JSON representation of a list of tasks, may be empty.
        Throws:
        ServiceException
      • getTask

        @PublicApi
        public LongTaskStatus getTask​(String idStr,
                                      String expand)

        Returns information about a long-running task.

        Parameters:
        idStr - the key of the task to be returned
        expand - a comma separated list of properties to expand on the task
        Returns:
        a JSON representation of a long task, or a 404 if not found.
        Throws:
        ServiceException
      • submissionResponse

        public static javax.ws.rs.core.Response submissionResponse​(LongTaskSubmission taskSubmission)
        Produce a HTTP Accept 202 response from some other resource pointing to this class's LongTaskStatus resource.