# Interface Task

public interface Task
Defines a user-level task. Each task has a list of parameters, and an `invoke` method.

Author:
  Mark Taylor (Starlink)

## Method Summary

Modifier and Type
Method
Description
`Executable`
`createExecutable(Environment env)`
Creates an executable object which will do the work of this task in the given Environment.
`Parameter<?>[]`
`getParameters()`
Returns the list of parameters which may be used by this task.
`String`
`getPurpose()`
Returns a short (one-line) description of the purpose of this task.

## Method Details

### getParameters

Parameter<?>[] getParameters()
Returns the list of parameters which may be used by this task.

Returns:
  an array of the Parameter objects this task may request values for during its invocation

### createExecutable

Executable createExecutable(Environment env) throws TaskException
Creates an executable object which will do the work of this task in the given Environment. This method should do all of the parameter processing and prepare an object which just executes. The idea is that any communication with the user related to the supplied parameter values can be done before the task starts to execute in earnest. Consequently, the returned Executable object ought not to make any reference to `env`, though this is not absolutely prohibited.

Parameters:
  `env` - the environment in which the task will operate
Throws:
  `TaskException` - if no executable can be created; this should usually be a `UsageException` or some subclass

### getPurpose

String getPurpose()
Returns a short (one-line) description of the purpose of this task.

Returns:
  plain text description of this task's purpose