Class Task

    • Constructor Detail

      • Task

        protected Task​(String name)
        Create a new task with the given name.
        Parameters:
        name - the task's name
      • Task

        protected Task​(String name,
                       @Nullable String responseContentType)
        Create a new task with the given name and response content type
        Parameters:
        name - the task's name
        responseContentType - the task's response content type
        Since:
        2.0
    • Method Detail

      • getName

        public String getName()
        Returns the task's name,
        Returns:
        the task's name
      • getResponseContentType

        public Optional<String> getResponseContentType()
        Returns the task's response content type.
        Returns:
        the task's response content type
        Since:
        2.0
      • execute

        public abstract void execute​(Map<String,​List<String>> parameters,
                                     PrintWriter output)
                              throws Exception
        Executes the task.
        Parameters:
        parameters - the query string parameters
        output - a PrintWriter wrapping the output stream of the task
        Throws:
        Exception - if something goes wrong