ome.util.tasks
Class Run

java.lang.Object
  extended by 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

Field Summary
protected  Configuration opts
           
protected  Task task
           
 
Constructor Summary
Run(Configuration config)
           
Run(String[] args)
           
Run(Task taskInstance)
           
 
Method Summary
protected  void cleanup()
           
protected static Properties getProperties(String[] args)
           
static void main(String[] args)
          Parses the command line into a Properties instance which gets passed to Configuration.
protected static Properties parseArgs(String[] args)
           
protected static Properties readStdin()
           
 void run()
           
protected  void setup()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

opts

protected Configuration opts

task

protected Task task
Constructor Detail

Run

public Run(String[] args)

Run

public Run(Configuration config)

Run

public Run(Task taskInstance)
Method Detail

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.