public abstract class ConsumerTask extends Object implements Task
Constructor and Description |
---|
ConsumerTask(String purpose,
ProcessingMode outMode,
boolean useOutFilter)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Executable |
createExecutable(Environment env)
Creates an executable object which will do the work of this task
in the given Environment.
|
abstract TableProducer |
createProducer(Environment env)
Returns an object which can produce the effective output table which
will be consumed by this task.
|
static TableProducer |
createProducer(Environment env,
FilterParameter filterParam,
InputTableParameter inParam)
Constructs a table producer given an input parameter and an
input filter parameter.
|
static String |
getIdentity(StarTable table)
Returns an identification string for a table that has been produced
by the TableProducer from this class's
createProducer(uk.ac.starlink.task.Environment) method. |
ProcessingMode |
getOutputMode()
Returns this task's output mode.
|
protected List<Parameter<?>> |
getParameterList()
Returns the parameter list for this task; it may be modified.
|
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.
|
public ConsumerTask(String purpose, ProcessingMode outMode, boolean useOutFilter)
purpose
- one-line description of the taskoutMode
- processing mode which determines the destination of
the processed tableuseOutFilter
- allow specification of filters for output tablepublic String getPurpose()
Task
getPurpose
in interface Task
public Parameter<?>[] getParameters()
Task
getParameters
in interface Task
protected List<Parameter<?>> getParameterList()
public abstract TableProducer createProducer(Environment env) throws TaskException
getIdentity(uk.ac.starlink.table.StarTable)
method.env
- execution environmentTaskException
public Executable createExecutable(Environment env) throws TaskException
Task
env
, though this is not
absolutely prohibited.createExecutable
in interface Task
env
- the environment in which the task will operateTaskException
- if no executable can be created;
this should usually be a UsageException
or
some subclasspublic ProcessingMode getOutputMode()
public static TableProducer createProducer(Environment env, FilterParameter filterParam, InputTableParameter inParam) throws TaskException
env
- execution environmentfilterParam
- parameter giving filter steps (or null)inParam
- parameter giving input tableTaskException
public static String getIdentity(StarTable table)
createProducer(uk.ac.starlink.task.Environment)
method.
This string amalgamates the table location and any filters applied
to produce it, so it should be usable elsewhere, including
in unrelated JVMs, to identify a table.table
- input table produced by this taskCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.