uk.ac.starlink.task
Interface Task

All Known Implementing Classes:
AbstractPlot2Task, Calc, CdsUploadSkyMatch, ConsumerTask, CubePlot2Task, GenericPlot2Task, MapperTask, MultiCone, MultiCopy, MultiCopyN, MultiOutputTask, PixFootprint, PixSample, PlanePlot2Task, PlotTask, RegQuery, ShowFunctions, SingleMapperTask, SkyConeMatch2, SkyMatch2, SkyPlot2Task, SpherePlot2Task, SqlClient, SqlCone, SqlUpdate, StiltsServer, TableCat, TableCat2, TableCatN, TableCopy, TableCube, TableHistogram, TableJoinN, TableLoop, TableMatch1, TableMatch2, TableMatchN, TableMultiCopy, TablePipe, TablePlot2D, TablePlot3D, TapLint, TapQuerier, TapResume, TapUploadSkyMatch, TimePlot2Task, TypedPlot2Task, VotCopy, VotLint

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
 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 Detail

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


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.