public abstract class Task extends Object
TaskServlet
Modifier | Constructor and Description |
---|---|
protected |
Task(String name)
Create a new task with the given name.
|
protected |
Task(String name,
String responseContentType)
Create a new task with the given name and response content type
|
Modifier and Type | Method and Description |
---|---|
abstract void |
execute(Map<String,List<String>> parameters,
PrintWriter output)
Executes the task.
|
String |
getName()
Returns the task's name,
|
Optional<String> |
getResponseContentType()
Returns the task's response content type.
|
protected Task(String name)
name
- the task's namepublic String getName()
public Optional<String> getResponseContentType()
public abstract void execute(Map<String,List<String>> parameters, PrintWriter output) throws Exception
parameters
- the query string parametersoutput
- a PrintWriter
wrapping the output stream of the taskException
- if something goes wrongCopyright © 2020. All rights reserved.