ome.util.tasks
Class Run
java.lang.Object
ome.util.tasks.Run
- Direct Known Subclasses:
- Run
public class Run
- extends Object
Command-line adapter which can run any task. ServiceFactory
and
Task
configuration can be specified as arguments in the form
"key=value". The only mandatory argument for all tasks is the task name:
java Run task=org.example.MyTask
However a search for tasks
will also be performed under "ome.util.tasks". E.g.
java Run task=admin.AddUserTask
resolves to ome.util.tasks.admin.AddUserTask.
- Since:
- 3.0-Beta1
- Author:
- Josh Moore, josh.moore at gmx.de
- See Also:
Configuration
,
Task
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
opts
protected Configuration opts
task
protected Task task
Run
public Run(String[] args)
Run
public Run(Configuration config)
Run
public Run(Task taskInstance)
main
public static void main(String[] args)
- Parses the command line into a
Properties
instance which gets
passed to Configuration
. Configuration.createTask()
is
called and the returned Task
instance is run
.
run
public void run()
setup
protected void setup()
cleanup
protected void cleanup()
getProperties
protected static Properties getProperties(String[] args)
readStdin
protected static Properties readStdin()
parseArgs
protected static Properties parseArgs(String[] args)
OmeroJava Api
Version: Beta-4.1.1-r5927-b91
Copyright © 2009 The University of Dundee. All Rights Reserved.